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.

The Quizmaster REST API gives you programmatic access to all platform resources — subjects, chapters, quizzes, questions, users, and scores. Every request and response uses JSON. The API is served from a single base URL, and all routes are mounted under the /api prefix.

Base URL

http://your-server:5000/api
Replace your-server with the hostname or IP address where Quizmaster is running. When running locally, this is localhost.

Available resources

The API exposes seven resource groups:
ResourceDescription
AuthRegister a new account and obtain a JWT for authenticated requests
UsersList and delete user accounts (admin only)
SubjectsCreate and manage top-level subject categories
ChaptersCreate and manage chapters within subjects
QuizzesCreate, retrieve, and manage timed quizzes within chapters
QuestionsAdd and manage multiple-choice questions within quizzes
ScoresSubmit quiz attempts and retrieve score history

Authentication

How to obtain and use Bearer tokens

Auth endpoints

Register and login routes

Users

User management (admin only)

Subjects and chapters

Content hierarchy management

Quizzes

Quiz retrieval and management

Questions

Multiple-choice question management

Scores

Score submission and history

Public vs. authenticated endpoints

Some endpoints are accessible without a token. All others require a valid Bearer token in the Authorization header. Admin-only endpoints additionally require that the authenticated user has the admin role. Public (no token required):
  • POST /api/auth/register
  • POST /api/auth/login
  • GET /api/subjects
  • GET /api/subjects/:id
  • GET /api/quizzes
  • GET /api/quizzes/:id
  • GET /api/quizzes/chapter/:chapterId
Authenticated (Bearer token required): All other endpoints, including score submission and user profile access. Admin only (Bearer token + admin role required):
  • POST, PUT, DELETE on /api/subjects, /api/chapters, /api/quizzes, /api/questions
  • GET, DELETE on /api/users
  • GET /api/scores (all users’ scores)
See Authentication for details on obtaining and using tokens.

Standard error responses

All error responses return JSON with a message field.
StatusMeaningExample message
401Missing or invalid token"No token provided"
403Authenticated but insufficient role"Require Admin Role!"
404Resource not found"User not found"
500Unexpected server error"Internal server error"
{
  "message": "No token provided"
}

Quick example

The following request confirms that the server is reachable and the API is responding:
curl http://localhost:5000/api/subjects
A successful response returns a JSON array of subjects. No token is required for this endpoint.

Build docs developers (and LLMs) love