Skip to main content

Documentation 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.

ExamPlatform provides a RESTful HTTP API that powers every feature of the web frontend — from exam creation and student enrollment to AI-assisted grading and tamper-evident audit logging. All requests and responses use JSON, and the API is organized around standard REST conventions: resources are addressed by URL, actions are expressed via HTTP methods, and errors are communicated through HTTP status codes with a structured error body.

Base URL

All API endpoints share the following base URL:
https://your-domain.com/api
Every path documented in this reference is relative to this base. For example, POST /api/auth/login resolves to https://your-domain.com/api/auth/login.

Authentication

All endpoints — except the three authentication endpoints — require a valid JWT Bearer token in the Authorization header:
Authorization: Bearer <token>
Obtain a token by calling POST /api/auth/login with valid credentials. Tokens are short-lived; your client should handle 401 Unauthorized responses by re-authenticating and retrying the request.

Content-Type

All request bodies must be sent as JSON with the appropriate header:
Content-Type: application/json
The only exception is POST /api/questions/import, which accepts multipart/form-data for file uploads.

Response Format

Every successful response returns a JSON object or array. Errors return a consistent envelope:
{ "error": "Human-readable error message" }
Common HTTP status codes used across the API:
StatusMeaning
200 OKRequest succeeded; response body contains the result
201 CreatedResource successfully created
204 No ContentRequest succeeded; no response body (e.g., DELETE)
400 Bad RequestInvalid or missing request parameters
401 UnauthorizedMissing or invalid Bearer token
403 ForbiddenAuthenticated user lacks the required role
404 Not FoundThe requested resource does not exist
422 Unprocessable EntityValidation failed on the request body

Rate Limiting

The API does not enforce hard rate limits at this time. Consumers are expected to make requests at a reasonable cadence. Bulk operations (such as question import) should be spaced to avoid overloading the server during high-traffic exam windows.

Roles and Access

ExamPlatform enforces role-based access control across all endpoints. The three roles are:
RoleDescription
studentCan log in, sit exams they are assigned to, and view their own results
examinerCan create and manage exams, build the question bank, and review submissions
adminFull platform access — including user management, audit logs, and analytics
Each endpoint in this reference notes the minimum role required to call it. Requests made by a user without the required role return 403 Forbidden.

Quick Start

The typical integration flow starts with obtaining a token and then passing it to every subsequent call:
curl -X POST https://your-domain.com/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "password": "yourpassword"}'
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "id": "usr_01J2K...",
    "name": "Jane Doe",
    "email": "you@example.com",
    "role": "examiner"
  }
}
Store the access_token and include it as a Bearer token in all subsequent requests.

API Reference

Authentication

Login, register, and reset passwords. Obtain JWT tokens for API access.

Exams

Create, update, publish, and assign students to exams.

Questions

Manage the question bank. Supports bulk import from CSV, PDF, and Google Forms.

Submissions

List submissions, grade subjective answers, and force-submit active sessions.

Users

Create and manage student, examiner, and admin accounts. Covers analytics and audit logs.
The ExamPlatform REST API is the same API consumed by the ExamPlatform web frontend. All data displayed in the dashboard — exam listings, submission queues, analytics charts — is fetched through these endpoints. Integration patterns therefore follow standard REST conventions and are directly compatible with any HTTP client.

Build docs developers (and LLMs) love