Base URL
All API endpoints are versioned under/api/v1:
your-domain.com with your Karma LMS instance domain.
Request format
Every request must include the following headers:Response envelope
All successful responses are wrapped in a standard envelope:The primary response payload. Can be a single object or an array of objects depending on the endpoint.
Pagination metadata included on list endpoints.
null on success. Contains error details on failure.Error responses
When a request fails, theerror field is populated and data is null:
A machine-readable error code. Common values:
UNAUTHORIZED, FORBIDDEN, NOT_FOUND, VALIDATION_ERROR, INTERNAL_ERROR.A human-readable description of the error.
An array of field-level validation issues. Only present on
422 responses.HTTP status codes
| Status | Meaning |
|---|---|
200 | OK — request succeeded |
201 | Created — resource created successfully |
400 | Bad Request — malformed request syntax |
401 | Unauthorized — missing or invalid token |
403 | Forbidden — token valid but insufficient permissions |
404 | Not Found — resource does not exist |
422 | Unprocessable Entity — validation failed |
500 | Internal Server Error — unexpected server failure |
Pagination
List endpoints support cursor-free offset pagination via query parameters:Page number to retrieve, starting at 1.
Number of records per page. Maximum is 100.
Rate limiting
The API enforces a limit of 100 requests per minute per access token. When you exceed this limit, the API returns a429 Too Many Requests response.
Rate limit headers are included in every response:
| Header | Description |
|---|---|
X-RateLimit-Limit | Requests allowed per minute |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
Versioning
The API uses URL-based versioning. The current version isv1. When breaking changes are introduced, a new version path (e.g., /api/v2) will be released. Previous versions remain available for a deprecation period announced in advance.
Explore the API
Authentication
Obtain and manage Bearer tokens for API access.
Courses
Create, read, update, and delete learning courses.
Users
Manage learner and instructor accounts.
Enrollments
Enroll learners in courses and track progress.
Assessments
Manage quizzes and process learner submissions.
