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 authentication endpoints handle account creation and login. Successful login returns a JSON Web Token (JWT) that expires after 7 days. Include this token in the Authorization header as Bearer <token> when calling any protected endpoint.

POST /api/auth/register

Register a new user account. This endpoint is public and does not require authentication.
username
string
required
Unique username for the account.
password
string
required
Password for the account.
fullName
string
required
Full display name of the user.
qualification
string
Optional academic or professional qualification.
dob
string
Optional date of birth in ISO 8601 format (e.g. 1999-05-20).
Response fields — 201 Created
message
string
Confirmation message: User registered successfully.
user
object
Errors
StatusMessage
400User already exists
cURL
curl --request POST \
  --url https://your-domain.com/api/auth/register \
  --header 'Content-Type: application/json' \
  --data '{
    "username": "jsmith",
    "password": "s3cr3tP@ss",
    "fullName": "Jane Smith",
    "qualification": "B.Sc Computer Science",
    "dob": "1999-05-20"
  }'

POST /api/auth/login

Authenticate an existing user and receive a bearer token. This endpoint is public and does not require authentication.
username
string
required
The account username.
password
string
required
The account password.
Response fields — 200 OK
token
string
JWT bearer token, valid for 7 days. Pass this as Authorization: Bearer <token> on protected requests.
user
object
Errors
StatusMessage
404User not found
401Invalid password
cURL
curl --request POST \
  --url https://your-domain.com/api/auth/login \
  --header 'Content-Type: application/json' \
  --data '{
    "username": "jsmith",
    "password": "s3cr3tP@ss"
  }'

Build docs developers (and LLMs) love