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 user endpoints allow authenticated users to view and update their own profiles. Admin users have additional access to list all accounts and delete any user by ID. All endpoints in this section require a valid bearer token.

GET /api/users/profile

Retrieve the profile of the currently authenticated user. Requires a valid bearer token. No request body. Response fields — 200 OK
id
number
Unique user ID.
username
string
Username.
fullName
string
Full display name.
qualification
string
Qualification, if set.
dob
string
Date of birth, if set.
role
string
Role: admin or user.
createdAt
string
Account creation timestamp.
updatedAt
string
Last updated timestamp.
cURL
curl --request GET \
  --url https://your-domain.com/api/users/profile \
  --header 'Authorization: Bearer <token>'

PUT /api/users/profile

Update profile fields for the currently authenticated user. Only the fields you supply are changed. Requires a valid bearer token.
fullName
string
Updated full display name.
qualification
string
Updated qualification.
dob
string
Updated date of birth in ISO 8601 format.
Response fields — 200 OK
message
string
Confirmation message.
user
object
cURL
curl --request PUT \
  --url https://your-domain.com/api/users/profile \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "fullName": "Jane A. Smith",
    "qualification": "M.Sc Data Science"
  }'

GET /api/users

List all user accounts. Requires a valid bearer token with admin role. No request body. Response — 200 OK Returns an array of user objects. Each object has the same shape as the profile response above (password is excluded).
cURL
curl --request GET \
  --url https://your-domain.com/api/users \
  --header 'Authorization: Bearer <token>'

DELETE /api/users/:id

Delete a user account by ID. Requires a valid bearer token with admin role.
id
number
required
The ID of the user to delete.
Response fields — 200 OK
message
string
Confirmation message: User deleted successfully.
Errors
StatusMessage
404User not found
403Admin user cannot be deleted
cURL
curl --request DELETE \
  --url https://your-domain.com/api/users/42 \
  --header 'Authorization: Bearer <token>'

Build docs developers (and LLMs) love