Courses
Available. Course management is live: list/create/get/update/archive courses, list/add modules, and per-course enrollments. The Add Module endpoint covers content module types (
video,audio,document,iframe,youtube_vimeo,quiz,html,archive); SCORM/cmi5/AICC modules are added by uploading a package through the admin UI. Writes require thewritescope (archive requiresadmin).
The Courses API lets you manage your course catalog — create courses, maintain modules, and retrieve enrollment lists per course.
The Course Object
{
"id": "e7f6a5b4-8c9d-0123-efab-234567890123",
"title": "Workplace Safety Fundamentals",
"external_id": "HS-101",
"description": "An introduction to workplace health and safety regulations in Canada.",
"short_description": "Workplace health and safety basics for Canadian workplaces.",
"status": "published",
"category_id": "1a2b3c4d-5e6f-7890-abcd-456789012345",
"estimated_minutes": 45,
"current_version_id": "5e6f7a8b-9c0d-1234-efab-567890123456",
"published_at": "2026-01-12T15:00:00Z",
"created_at": "2026-01-10T09:00:00Z",
"updated_at": "2026-05-20T14:30:00Z",
"custom_fields": {
"accreditation_number": "CPA-2026-0418",
"credits": "3"
},
"enrollment_count": 14
}Course status values:
| Status | Description |
|---|---|
draft | Not visible to learners |
published | Available for enrollment |
archived | Soft-deleted; hidden from catalog; history preserved |
custom_fields holds the course’s custom field values, keyed by field key (see
List Course Fields). A field without a value is absent, and a course
with none returns {}. Values are strings: a number as written, a date as YYYY-MM-DD, a
list field as one of its options.
external_id is the course’s ID in another system, such as an HR system or a previous LMS, or
null. The CSV imports and the bulk SCORM re-upload find a course by it, and a certificate can
print it as the course code. See External ID.
Endpoints
List Courses
GET /api/v1/coursesReturns a paginated list of courses in the tenant’s catalog.
Authentication required: read scope
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number. Default: 1 |
per_page | integer | No | Default: 50, max: 200 |
status | string | No | Filter: draft, published, archived. Default: excludes archived |
category | string | No | Filter by category name (exact match) |
search | string | No | Case-insensitive search on title and description |
created_after | ISO 8601 | No | Filter courses created after this timestamp |
sort_by | string | No | created_at, title, updated_at. Default: created_at |
sort_order | string | No | asc or desc. Default: desc |
Example Request
curl "https://{your-subdomain}.embaylms.com/api/v1/courses?status=published&category=Compliance&per_page=20" \
-H "Authorization: Bearer ems_live_0000000000000000000000000000"Example Response
{
"data": [
{
"id": "e7f6a5b4-8c9d-0123-efab-234567890123",
"title": "Workplace Safety Fundamentals",
"external_id": "HS-101",
"short_description": "Workplace health and safety basics for Canadian workplaces.",
"status": "published",
"category_id": "1a2b3c4d-5e6f-7890-abcd-456789012345",
"estimated_minutes": 45,
"published_at": "2026-01-12T15:00:00Z",
"created_at": "2026-01-10T09:00:00Z",
"updated_at": "2026-05-20T14:30:00Z",
"custom_fields": { "accreditation_number": "CPA-2026-0418", "credits": "3" },
"enrollment_count": 14
}
],
"meta": {
"page": 1,
"per_page": 20,
"total": 87
},
"error": null
}Create Course
POST /api/v1/coursesCreates a new course in draft status.
Authentication required: write scope
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Course title |
external_id | string | No | The course’s ID in another system. See External ID |
description | string | No | Course description (plain text or Markdown) |
short_description | string | No | Short catalog blurb (max 500 characters) |
estimated_minutes | integer | No | Estimated completion time in minutes |
An initial draft version is created alongside the course, so modules can be added right away.
Example Request
curl -X POST https://{your-subdomain}.embaylms.com/api/v1/courses \
-H "Authorization: Bearer ems_live_0000000000000000000000000000" \
-H "Content-Type: application/json" \
-d '{
"title": "WHMIS 2015",
"description": "Workplace Hazardous Materials Information System refresher course.",
"short_description": "WHMIS refresher.",
"estimated_minutes": 30
}'Example Response
{
"data": {
"id": "2b3c4d5e-6f7a-8901-bcde-901234567890",
"title": "WHMIS 2015",
"external_id": null,
"description": "Workplace Hazardous Materials Information System refresher course.",
"short_description": "WHMIS refresher.",
"status": "draft",
"category_id": null,
"estimated_minutes": 30,
"created_at": "2026-06-05T10:15:00Z",
"updated_at": "2026-06-05T10:15:00Z"
},
"meta": null,
"error": null
}HTTP Status: 201 Created
Common Errors
| HTTP Status | Description |
|---|---|
400 | Invalid field, including an external_id that is too long or starts with a reserved prefix |
409 | Another course already uses this external_id |
Get Course
GET /api/v1/courses/{id}Returns a single course by UUID.
Authentication required: read scope
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | Course UUID |
Example Request
curl "https://{your-subdomain}.embaylms.com/api/v1/courses/e7f6a5b4-8c9d-0123-efab-234567890123" \
-H "Authorization: Bearer ems_live_0000000000000000000000000000"Example Response
{
"data": {
"id": "e7f6a5b4-8c9d-0123-efab-234567890123",
"title": "Workplace Safety Fundamentals",
"external_id": "HS-101",
"description": "An introduction to workplace health and safety regulations in Canada.",
"short_description": "Workplace health and safety basics for Canadian workplaces.",
"status": "published",
"category_id": "1a2b3c4d-5e6f-7890-abcd-456789012345",
"estimated_minutes": 45,
"current_version_id": "5e6f7a8b-9c0d-1234-efab-567890123456",
"published_at": "2026-01-12T15:00:00Z",
"created_at": "2026-01-10T09:00:00Z",
"updated_at": "2026-05-20T14:30:00Z",
"custom_fields": { "accreditation_number": "CPA-2026-0418", "credits": "3" },
"enrollment_count": 14
},
"meta": null,
"error": null
}Common Errors
| HTTP Status | Description |
|---|---|
404 | No course with this ID in the tenant |
Update Course
PATCH /api/v1/courses/{id}Updates one or more fields on a course. Supports publishing a draft (status: "published"), unpublishing back to draft, or archiving (status: "archived", equivalent to DELETE).
Authentication required: write scope
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | Course UUID |
Request Body
All fields are optional.
| Field | Type | Description |
|---|---|---|
title | string | Course title |
description | string | Course description |
short_description | string | Short catalog blurb (max 500 characters) |
status | string | draft, published, or archived. "archived" is equivalent to the DELETE endpoint below |
external_id | string or null | The course’s ID in another system; null clears it. See External ID |
custom_fields | object | Some of the course’s custom field values, keyed by field key. See Custom field values |
Example Request
curl -X PATCH "https://{your-subdomain}.embaylms.com/api/v1/courses/2b3c4d5e-6f7a-8901-bcde-901234567890" \
-H "Authorization: Bearer ems_live_0000000000000000000000000000" \
-H "Content-Type: application/json" \
-d '{ "status": "published" }'Example Response
Returns the updated course object (same structure as Get Course).
Common Errors
| HTTP Status | Description |
|---|---|
400 | Invalid field, an invalid custom_fields value, an external_id that is too long or starts with a reserved prefix, or no updatable fields provided |
404 | Course not found |
409 | Another course already uses this external_id |
409 | EmbayLMS set this course’s external_id, and it cannot be changed |
409 | The course needs an approval before it is published, and its latest version is not the approved one |
409 | A required custom course field is empty. The message names the fields to fill in before publishing |
409 | A quiz holds a random draw its question bank can no longer fill. The message names the quizzes (short_random_draws:); lower the draw or add questions to the bank |
422 | The course has no version to publish, or publishing would exceed your plan’s active-course cap |
Custom field values
custom_fields is partial: the keys you send are written, the keys you leave out keep
their value, and a key sent as null (or "") is cleared. Send every value as a string
("3", not 3); any other type returns 400. Each value is checked against
its field, as in the course editor: a number, a YYYY-MM-DD date, one of a list field’s
options, 500 characters at most. An unknown key or an invalid value returns 400 naming the
field and its error code, and nothing is saved:
{
"data": null,
"meta": null,
"error": {
"code": 400,
"message": "custom_fields.review_date: Internal review date must be a date in YYYY-MM-DD format. (not_a_date)"
}
}An API key sets every field, including fields an instructor cannot edit in the app. A
required field only matters when the course is published: a request that both fills it and
publishes succeeds. Until custom course fields are available to your organization, a request
with custom_fields returns 400.
curl -X PATCH "https://{your-subdomain}.embaylms.com/api/v1/courses/e7f6a5b4-8c9d-0123-efab-234567890123" -H "Authorization: Bearer ems_live_0000000000000000000000000000" -H "Content-Type: application/json" -d '{ "custom_fields": { "accreditation_number": "CPA-2026-0419", "credits": null } }'External ID
external_id is the course’s ID in another system. Create Course and Update Course accept it,
under the rules of the course editor:
- Spaces at the start and at the end are removed. Nothing else is changed, and matching is exact, capital letters included.
- 128 characters at most. A longer value returns
400; it is never shortened. - It is unique among the organization’s courses that are not deleted. A value another course
has returns
409. The ID of a deleted course can be used again. - A value that starts with
academy:ordemo-naol:, whatever its capitals, returns400. EmbayLMS writes those prefixes itself. - A course whose ID EmbayLMS wrote (it starts with one of those prefixes) keeps it: a request
that changes or clears it returns
409. - On Update Course,
null(or"") clears the ID, and sending the value the course already has changes nothing.
curl -X PATCH "https://{your-subdomain}.embaylms.com/api/v1/courses/e7f6a5b4-8c9d-0123-efab-234567890123" -H "Authorization: Bearer ems_live_0000000000000000000000000000" -H "Content-Type: application/json" -d '{ "external_id": "HS-101" }'Approval before publishing
When the organization requires an approval before publishing (Settings → Content policy), or the course has been submitted for approval, publishing through the API follows the same rule as the course editor: the latest version must be the one a reviewer approved. Otherwise the request is rejected with 409 and a message saying what is missing. An API key cannot override it. Approve the course in the editor, then publish. Re-sending status: "published" for a course whose live version is unchanged always succeeds.
Plan limits
Publishing a course activates it. If your plan carries an active-course cap and
you are already at it, the request is rejected with 422 and the error object
carries a machine-readable entitlement_blocked payload:
{
"data": null,
"meta": null,
"error": {
"code": 422,
"message": "The free plan allows 3 active courses. Upgrade to publish more.",
"entitlement_blocked": {
"code": "ENTITLEMENT_BLOCKED",
"flag_or_limit": "course_cap",
"current_tier": "free",
"required_tier": "starter"
}
}
}Only a real activation is gated — re-publishing a course that is already published, updating other fields, and archiving are never blocked. Paid plans have unlimited active courses.
List Course Fields
GET /api/v1/course-fieldsReturns your organization’s custom course field definitions, in the order the app shows them.
Definitions are managed in the app (Courses → Custom fields); the API reads them only.
Use the key of each field in custom_fields. The list is empty until custom course fields
are available to your organization.
Authentication required: read scope
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number. Default: 1 |
per_page | integer | No | Default: 50, max: 200 |
Example Response
{
"data": [
{
"key": "accreditation_number",
"label": "Accreditation number",
"label_fr": "Numéro d'agrément",
"label_i18n": { "en": "Accreditation number", "fr-CA": "Numéro d'agrément" },
"field_type": "text",
"options": [],
"is_required": true,
"catalog_visible": false,
"instructor_editable": false
},
{
"key": "credits",
"label": "Credits",
"label_fr": null,
"label_i18n": { "en": "Credits" },
"field_type": "number",
"options": [],
"is_required": false,
"catalog_visible": true,
"instructor_editable": true
}
],
"meta": { "page": 1, "per_page": 50, "total": 2 },
"error": null
}| Field | Description |
|---|---|
key | Stable key derived from the label. It never changes, even when the field is renamed |
label | The field’s name in the organization’s default language |
label_i18n | The field’s name in every language it is written in, keyed by language code (en, fr-CA, es), the default language included. A language missing from the map shows label |
label_fr | The French name when one is set, else null. Kept for existing integrations; read label_i18n instead |
field_type | text, number, date or select |
options | The choices of a select field; [] otherwise |
is_required | A course cannot be published while the field is empty |
catalog_visible | Learners see the value on the course page |
instructor_editable | Instructors can set it on the courses they teach |
Archive Course
DELETE /api/v1/courses/{id}Archives a course. This is a soft delete — the course is hidden from the catalog and no new enrollments can be created, but existing learner history and completions are preserved.
Authentication required: admin scope
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | Course UUID |
Example Request
curl -X DELETE "https://{your-subdomain}.embaylms.com/api/v1/courses/e7f6a5b4-8c9d-0123-efab-234567890123" \
-H "Authorization: Bearer ems_live_0000000000000000000000000000"HTTP Status: 204 No Content
List Modules
GET /api/v1/courses/{id}/modulesReturns all modules for a course in display order.
Authentication required: read scope
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | Course UUID |
Example Request
curl "https://{your-subdomain}.embaylms.com/api/v1/courses/e7f6a5b4-8c9d-0123-efab-234567890123/modules" \
-H "Authorization: Bearer ems_live_0000000000000000000000000000"Example Response
{
"data": [
{
"id": "3c4d5e6f-7a8b-9012-cdef-012345678901",
"title": "Introduction to WHMIS",
"description": "Overview of hazard classes and labels.",
"module_type": "video",
"is_required": true,
"order_index": 0,
"created_at": "2026-01-10T09:00:00Z"
},
{
"id": "4d5e6f7a-8b9c-0123-defa-123456789012",
"title": "Final Assessment",
"description": null,
"module_type": "quiz",
"is_required": true,
"order_index": 1,
"created_at": "2026-01-10T09:05:00Z"
}
],
"meta": null,
"error": null
}Add Module
POST /api/v1/courses/{id}/modulesAdds a new module to a course. The module is appended at the end of the module list by default.
Package and asset upload (
…/modules/{moduleId}/assets) is an in-app, session-authenticated route and is not part of the public API; create the module here, then upload its content from the course editor.
Authentication required: write scope
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | Course UUID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Module title |
module_type | string | Yes | video, audio, document, iframe, youtube_vimeo, quiz, html, or archive. An archive module is a downloadable ZIP delivered as-is via a pre-signed URL (allow_download forced on); it completes on first download. SCORM/cmi5/AICC modules are added by uploading a package through the admin UI |
description | string | No | Module description (max 2000 characters) |
is_required | boolean | No | Whether completion is required for course completion. Default: true |
Example Request
curl -X POST "https://{your-subdomain}.embaylms.com/api/v1/courses/e7f6a5b4-8c9d-0123-efab-234567890123/modules" \
-H "Authorization: Bearer ems_live_0000000000000000000000000000" \
-H "Content-Type: application/json" \
-d '{
"title": "Video: Hazardous Material Handling",
"module_type": "video",
"is_required": true
}'Example Response
{
"data": {
"id": "5e6f7a8b-9c0d-1234-efab-234567890123",
"title": "Video: Hazardous Material Handling",
"description": null,
"module_type": "video",
"is_required": true,
"order_index": 2,
"created_at": "2026-06-05T10:20:00Z"
},
"meta": null,
"error": null
}HTTP Status: 201 Created
List Course Enrollments
GET /api/v1/courses/{id}/enrollmentsReturns all enrollments for a specific course.
Authentication required: read scope
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | Course UUID |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | No | Filter: active, completed, dropped, expired, waitlisted, pending_approval |
page | integer | No | Default: 1 |
per_page | integer | No | Default: 50, max: 200 |
Example Request
curl "https://{your-subdomain}.embaylms.com/api/v1/courses/e7f6a5b4-8c9d-0123-efab-234567890123/enrollments?status=active" \
-H "Authorization: Bearer ems_live_0000000000000000000000000000"Example Response
{
"data": [
{
"id": "d6e5f4a3-7b8c-9012-defa-123456789012",
"user_id": "a3f2c1d0-4e5b-6789-abcd-ef0123456789",
"course_id": "e7f6a5b4-8c9d-0123-efab-234567890123",
"status": "active",
"due_date": "2026-05-01T00:00:00Z",
"completed_at": null,
"source": "native",
"created_at": "2026-04-01T08:00:00Z"
}
],
"meta": { "page": 1, "per_page": 50, "total": 14 },
"error": null
}Enroll a User in a Course
POST /api/v1/courses/{id}/enrollmentsEnrolls a user in this course through the same enrollment engine the application uses — prerequisite, seat-cap, enrollment-window and duplicate guards all apply.
Authentication required: write scope
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | Course UUID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
user_id | UUID | Yes | The user to enroll |
due_date | ISO 8601 datetime | No | Optional due date for the assignment |
Example Request
curl -X POST "https://{your-subdomain}.embaylms.com/api/v1/courses/e7f6a5b4-8c9d-0123-efab-234567890123/enrollments" \
-H "Authorization: Bearer ems_live_0000000000000000000000000000" \
-H "Content-Type: application/json" \
-d '{ "user_id": "a3f2c1d0-4e5b-6789-abcd-ef0123456789" }'Responses
| Status | Meaning |
|---|---|
201 | Enrollment created |
400 | Invalid field (e.g. malformed user_id) |
404 | Course or user not found |
409 | Already enrolled |
See also POST /api/v1/enrollments for the course-agnostic
form of the same operation, and POST /api/v1/enrollments/bulk for bulk
enrollment.