Subjects are the top-level content categories in Quizmaster. Each subject contains one or more chapters, and chapters in turn contain quizzes. Reading subjects and chapters is open to everyone, while creating, updating, and deleting records requires an admin bearer token.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.
GET /api/subjects
List all subjects. This endpoint is public and does not require authentication. No request body. Response — 200 OK Returns an array of subject objects, each including a nestedchapters array.
Subject ID.
Subject name.
Optional description.
Chapters belonging to this subject.
Creation timestamp.
Last updated timestamp.
cURL
GET /api/subjects/:id
Retrieve a single subject along with its chapters. This endpoint is public.The ID of the subject to retrieve.
chapters array.
Errors
| Status | Message |
|---|---|
| 404 | Subject not found |
cURL
POST /api/subjects
Create a new subject. Requires a valid bearer token with admin role.Name of the subject.
Optional description of the subject.
Confirmation message.
| Status | Message |
|---|---|
| 400 | Subject already exists |
cURL
PUT /api/subjects/:id
Update an existing subject. Requires a valid bearer token with admin role.The ID of the subject to update.
Updated subject name.
Updated description.
Confirmation message.
Updated subject object.
cURL
DELETE /api/subjects/:id
Delete a subject by ID. Requires a valid bearer token with admin role.The ID of the subject to delete.
Confirmation message:
Subject deleted successfully.cURL
GET /api/chapters
List all chapters with their associated subject. Requires a valid bearer token. No request body. Response — 200 OK Returns an array of chapter objects, each including a nestedsubject object.
Chapter ID.
ID of the parent subject.
Chapter name.
Optional description.
Creation timestamp.
Last updated timestamp.
The parent subject object.
cURL
GET /api/chapters/subject/:subjectId
List all chapters belonging to a specific subject. Requires a valid bearer token.The ID of the subject whose chapters to retrieve.
cURL
GET /api/chapters/:id
Retrieve a single chapter by ID. Requires a valid bearer token.The ID of the chapter to retrieve.
cURL
POST /api/chapters
Create a new chapter. Requires a valid bearer token with admin role.ID of the parent subject.
Name of the chapter.
Optional description of the chapter.
Confirmation message.
| Status | Message |
|---|---|
| 404 | Subject not found |
| 400 | Chapter already exists in this subject |
cURL
PUT /api/chapters/:id
Update an existing chapter. Requires a valid bearer token with admin role.The ID of the chapter to update.
Updated chapter name.
Updated description.
Move the chapter to a different subject.
Confirmation message.
Updated chapter object.
cURL
DELETE /api/chapters/:id
Delete a chapter by ID. Requires a valid bearer token with admin role.The ID of the chapter to delete.
Confirmation message:
Chapter deleted successfully.cURL