Skip to main content
The Users API lets you create and manage accounts for everyone on your Karma LMS platform. Users are assigned one of three roles — admin, instructor, or learner — which control what they can see and do.
Only admin users can create, update, or delete other users. Instructors and learners can read their own user record via GET /api/v1/users/:id.

Role reference

Full access to all API resources. Can manage users, courses, enrollments, and assessments across the entire platform.
Can create and manage their own courses and assessments. Can view enrolled learners’ progress. Cannot manage other users.
Can view published courses they are enrolled in, submit assessments, and track their own progress. Read-only access.

The user object

id
string
required
Unique identifier for the user. Format: usr_<alphanumeric>.
name
string
required
The user’s full name.
email
string
required
The user’s email address. Must be unique across the platform.
role
string
required
The user’s role. One of admin, instructor, or learner.
created_at
string
required
ISO 8601 timestamp of when the user account was created.
last_login
string
ISO 8601 timestamp of the user’s most recent successful login. null if the user has never logged in.

List users

GET /api/v1/users Returns a paginated list of all user accounts. Requires the admin role.

Query parameters

page
number
default:"1"
Page number to retrieve.
per_page
number
default:"20"
Number of users per page. Maximum 100.
role
string
Filter by user role. One of admin, instructor, or learner.

Example

curl https://your-domain.com/api/v1/users?role=learner&per_page=5 \
  -H "Authorization: Bearer <access_token>"

Get a user

GET /api/v1/users/:id Returns a single user by their ID. Admins can retrieve any user. Non-admin users can only retrieve their own record.
curl https://your-domain.com/api/v1/users/usr_lrn001 \
  -H "Authorization: Bearer <access_token>"

Create a user

POST /api/v1/users Creates a new user account. Requires the admin role.

Request body

name
string
required
The user’s full name. Between 2 and 100 characters.
email
string
required
The user’s email address. Must be unique across the platform.
password
string
required
Initial password for the account. Minimum 8 characters. Users can change this after first login.
role
string
required
The user’s role. Must be one of admin, instructor, or learner.

Example

curl -X POST https://your-domain.com/api/v1/users \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sarah Müller",
    "email": "[email protected]",
    "password": "Temp@Pass1!",
    "role": "instructor"
  }'

Update a user

PUT /api/v1/users/:id Updates an existing user account. Admins can update any user. Non-admin users can only update their own name and password.
curl -X PUT https://your-domain.com/api/v1/users/usr_ins045 \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{"name": "Sarah Mueller"}'

Delete a user

DELETE /api/v1/users/:id Permanently deletes a user account. Requires the admin role.
Deleting a user also removes all of their enrollments and assessment submission history. This action is irreversible.
curl -X DELETE https://your-domain.com/api/v1/users/usr_lrn002 \
  -H "Authorization: Bearer <access_token>"

Build docs developers (and LLMs) love