Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/geeky-hamster/Quizmaster/llms.txt

Use this file to discover all available pages before exploring further.

Quizzes belong to chapters and contain a set of questions with a time limit. Listing and viewing quizzes is open to all visitors without authentication. Creating, updating, and deleting quizzes requires an admin bearer token.

GET /api/quizzes

List all quizzes with their associated chapter. This endpoint is public. No request body. Response — 200 OK Returns an array of quiz objects, each including a nested chapter object.
id
number
Quiz ID.
chapter_id
number
ID of the parent chapter.
name
string
Quiz title.
date_of_quiz
string
Scheduled date of the quiz.
time_duration
string
Time limit string as set by the admin (e.g. "30" for 30 minutes).
remarks
string
Optional remarks or description.
createdAt
string
Creation timestamp.
updatedAt
string
Last updated timestamp.
chapter
object
The parent chapter object.
cURL
curl --request GET \
  --url https://your-domain.com/api/quizzes

GET /api/quizzes/chapter/:chapterId

List all quizzes for a specific chapter. This endpoint is public.
chapterId
number
required
The ID of the chapter whose quizzes to retrieve.
Response — 200 OK Returns an array of quiz objects for the given chapter.
cURL
curl --request GET \
  --url https://your-domain.com/api/quizzes/chapter/7

GET /api/quizzes/:id

Retrieve a single quiz by ID, including its chapter and questions. This endpoint is public.
id
number
required
The ID of the quiz to retrieve.
Response — 200 OK Returns the quiz object with nested chapter and questions arrays. Errors
StatusMessage
404Quiz not found
cURL
curl --request GET \
  --url https://your-domain.com/api/quizzes/12

POST /api/quizzes

Create a new quiz. Requires a valid bearer token with admin role.
chapterId
number
required
ID of the chapter this quiz belongs to.
title
string
required
Title of the quiz.
description
string
Optional description or remarks for the quiz.
timeLimit
string
required
Duration of the quiz as a string (e.g. "30" for 30 minutes).
Response fields — 201 Created
message
string
Confirmation message: Quiz created successfully.
quiz
object
cURL
curl --request POST \
  --url https://your-domain.com/api/quizzes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "chapterId": 7,
    "title": "Linear Algebra Basics",
    "description": "Covers vectors, matrices, and determinants.",
    "timeLimit": "30"
  }'

PUT /api/quizzes/:id

Update an existing quiz. Requires a valid bearer token with admin role.
id
number
required
The ID of the quiz to update.
title
string
Updated quiz title.
description
string
Updated description.
timeLimit
string
Updated time limit string.
chapterId
number
Move the quiz to a different chapter.
Response fields — 200 OK
message
string
Confirmation message: Quiz updated successfully.
quiz
object
Updated quiz object.
cURL
curl --request PUT \
  --url https://your-domain.com/api/quizzes/12 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "title": "Linear Algebra — Foundations",
    "timeLimit": "45"
  }'

DELETE /api/quizzes/:id

Delete a quiz by ID. Requires a valid bearer token with admin role.
id
number
required
The ID of the quiz to delete.
Response fields — 200 OK
message
string
Confirmation message: Quiz deleted successfully.
cURL
curl --request DELETE \
  --url https://your-domain.com/api/quizzes/12 \
  --header 'Authorization: Bearer <token>'

Build docs developers (and LLMs) love