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.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/users/profile
Retrieve the profile of the currently authenticated user. Requires a valid bearer token. No request body. Response fields — 200 OKUnique user ID.
Username.
Full display name.
Qualification, if set.
Date of birth, if set.
Role:
admin or user.Account creation timestamp.
Last updated timestamp.
cURL
PUT /api/users/profile
Update profile fields for the currently authenticated user. Only the fields you supply are changed. Requires a valid bearer token.Updated full display name.
Updated qualification.
Updated date of birth in ISO 8601 format.
Confirmation message.
cURL
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
DELETE /api/users/:id
Delete a user account by ID. Requires a valid bearer token with admin role.The ID of the user to delete.
Confirmation message:
User deleted successfully.| Status | Message |
|---|---|
| 404 | User not found |
| 403 | Admin user cannot be deleted |
cURL