ExamPlatform uses JWT Bearer token authentication. To access any protected endpoint, you must first obtain a token by logging in. Tokens are returned in the response body of a successful login or registration and must be included in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Saurabh-07586/examplatform/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header of every subsequent API request. The three authentication endpoints (/api/auth/login, /api/auth/register, and /api/auth/reset-password) do not themselves require a token.
POST /api/auth/login
Authenticate an existing user with their email and password. On success, returns a signed JWT access token and the authenticated user’s profile. This token must be passed as a Bearer token in all subsequent API calls.Request Body
The user’s registered email address.
The user’s account password.
Example Request
Example Response
Error Responses
| Status | Description |
|---|---|
401 Unauthorized | Email or password is incorrect |
400 Bad Request | Missing required fields |
POST /api/auth/register
Register a new student account. Students may self-register using this endpoint. Examiner and admin accounts must be created by an administrator through the Users API — they cannot be created via self-registration.Request Body
The student’s full legal name.
A valid, unique email address. Used for login and communications.
Account password. Must be at least 8 characters and include at least one uppercase letter, one lowercase letter, one digit, and one special character (e.g.,
!@#$%^&*).The student’s institutional roll number. Must be unique within the platform.
The student’s official registration or enrollment number.
Optional contact phone number.
Example Request
Example Response
Error Responses
| Status | Description |
|---|---|
422 Unprocessable Entity | Password does not meet complexity requirements, or a required field is missing |
409 Conflict | Email or roll number is already registered |
Examiner and admin accounts cannot self-register via this endpoint. Only
role: "student" accounts can be created here. To create an examiner or admin, an existing administrator must use POST /api/users.POST /api/auth/reset-password
Initiate a password reset flow for any account. If the provided email address matches an existing account, a reset link is sent to that address. For security reasons, the response message is identical whether or not the email exists, preventing account enumeration.Request Body
The email address associated with the account to reset.
Example Request
Example Response
Error Responses
| Status | Description |
|---|---|
400 Bad Request | email field is missing or malformed |
Password reset links expire after 30 minutes. If a user does not complete the reset within that window, they must request a new link by calling this endpoint again.
Using Your Token
Once you have anaccess_token, include it in the Authorization header of every protected API call:
401 Unauthorized. Your client should handle this by re-authenticating via POST /api/auth/login and retrying the original request with the new token.