Docs Start here

Common tasks

The calls most apps need: create a user, get their courses, track progress.

The things most apps do, each with the exact call. They all work from your server with your API key (X-API-Key: nbl_…, see the Quickstart), and they all use your own ids: your user’s id, and a course’s address (the short name shown in the admin). You never need one of our ids.

Your users#

Create or update a user#

Call it whenever your user signs up or their details change. The first call creates them, later calls update them. Send only the name and email, or add where they belong and what they should take.

curl -X PUT "$LMS_URL/api/v1/learners/user-42" \
  -H "X-API-Key: $LMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "ada@customer.example",
  "givenName": "Ada",
  "familyName": "Lovelace",
  "organization": "acme-shop",
  "role": "technician",
  "access": "MANAGER",
  "courses": [
    "workplace-safety-essentials"
  ]
}'
Field Meaning
organization Your customer company, by the reference you gave it (the Your reference field when you add a customer in the admin, or externalRef on POST /organizations).
role A job role you set up in the admin (its key, for example technician). The courses for that role are given to them automatically, limited to what their company has bought.
access MEMBER (default) or MANAGER (can invite people and see their team’s progress).
courses Courses to give them directly, by address.

If their company has no seats left for the role’s courses you get 409 and nothing changes.

Look a user up#

curl -X GET "$LMS_URL/api/v1/learners/user-42" \
  -H "X-API-Key: $LMS_KEY"
{ "id": "1e590eec-…", "externalRef": "user-42", "email": "ada@customer.example", "givenName": "Ada",
  "familyName": "Lovelace", "status": "ACTIVE" }

Remove a user who left#

curl -X DELETE "$LMS_URL/api/v1/learners/user-42" \
  -H "X-API-Key: $LMS_KEY"

They can’t sign in or get new tokens. Their history and certificates are kept.

Their courses#

Get all of a user’s courses#

This is the “my courses” screen. One call, newest activity first, with everything a card needs.

curl -X GET "$LMS_URL/api/v1/learners/user-42/courses" \
  -H "X-API-Key: $LMS_KEY"
[
  {
    "enrollmentId": "ded94793-…",
    "course": "workplace-safety-essentials",
    "title": "Workplace Safety Essentials",
    "summary": "Fire safety, first aid and spotting everyday hazards.",
    "estimatedMinutes": 45,
    "status": "ACTIVE",
    "progressPercent": 0.00,
    "enrolledAt": "2026-11-27T00:34:34Z"
  }
]

status is ACTIVE, COMPLETED or EXPIRED. Finished courses also have completedAt and a certificateId.

Give someone a course, or take it away#

curl -X PUT "$LMS_URL/api/v1/learners/user-42/courses/workplace-safety-essentials" \
  -H "X-API-Key: $LMS_KEY"

Giving a course they already have changes nothing.

curl -X DELETE "$LMS_URL/api/v1/learners/user-42/courses/workplace-safety-essentials" \
  -H "X-API-Key: $LMS_KEY"

Taking it away keeps their progress.

See one user’s progress in one course#

Every lesson with time spent, every quiz attempt with its score, and the certificate once issued.

curl -X GET "$LMS_URL/api/v1/learners/user-42/courses/workplace-safety-essentials" \
  -H "X-API-Key: $LMS_KEY"
{
  "enrollment": { "learnerExternalRef": "user-42", "courseSlug": "workplace-safety-essentials", "status": "ACTIVE", "progressPercent": 0.00 },
  "lessons": [ { "title": "Welcome and how this course works", "status": "NOT_STARTED", "secondsSpent": 0 } ],
  "attempts": [],
  "certificate": null
}

Get a user’s certificates#

curl -X GET "$LMS_URL/api/v1/learners/user-42/certificates" \
  -H "X-API-Key: $LMS_KEY"

Download one with GET /certificates/{id}/pdf. Anyone can check one by its code at GET /public/certificates/{code}.

Letting them learn#

Let a user take their course in your app#

Your server asks for a token for that person, and your front end uses it to show lessons, report progress and run quizzes. One call:

curl -X POST "$LMS_URL/api/v1/learners/user-42/session" \
  -H "X-API-Key: $LMS_KEY"

It takes the same body as create or update a user, and returns { "learnerId", "accessToken", "expiresInSeconds" }. The token lasts an hour and can only act as that person. The Quickstart shows it in seven languages, and Building the learner experience covers the calls behind a course player.

Seeing everyone#

Progress of everyone#

curl -X GET "$LMS_URL/api/v1/enrollments?status=ACTIVE&limit=50" \
  -H "X-API-Key: $LMS_KEY"

Each row has learnerExternalRef (your user id), courseSlug, status and progressPercent. Filter by courseId, userId or organizationId. A customer’s own manager can see just their team with GET /organizations/{id}/enrollments.

Your courses#

curl -X GET "$LMS_URL/api/v1/courses" \
  -H "X-API-Key: $LMS_KEY"

Get told when something happens#

Rather than poll, register a webhook and we call you on events like enrollment.completed: Webhooks.

Selling to businesses#

If your customers are companies with staff, with seats and roles, see Selling and onboarding.

Type to search guides and every endpoint.