Courses
GET /api/v1/headless/coursesGET /api/v1/headless/course/{action}GET /api/v1/headless/course/urlDELETE /api/v1/headless/course/{id}POST /api/v1/headless/course/{id}/duplicateGET /api/v1/headless/course/scorm/{id}POST /api/v1/headless/course/generatePOST /api/v1/headless/course/{id}/publishPOST /api/v1/headless/course/{id}/revert
Get courses
GET /api/v1/headless/courses
Use this endpoint to get all your courses.
Query parameters
| Field | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
identifier | string | Filter to courses created by this identifier | Yes | N/A | N/A |
clientIdentifier | string | Filter to courses created by this clientIdentifier | Yes | N/A | N/A |
title | string | Filter to courses that contain this string in their title. This query is case-insensitive and will match any part of the title. | No | N/A | N/A |
length | integer | Number of courses to return | Yes | N/A | N/A |
page | integer | Page of courses to return | Yes | N/A | N/A |
Examples
curl -X GET "https://api.coassemble.com/api/v1/headless/courses?identifier=user123&clientIdentifier=client456&length=50&page=0" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Get course
GET /api/v1/headless/courses/{id}
Use this endpoint to get a course by ID.
Path parameters
| Field | Description | Options |
|---|---|---|
id | Course ID | N/A |
Examples
curl -X GET "https://api.coassemble.com/api/v1/headless/courses/1234" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Get a signed URL for a course (Deprecated)
GET /api/v1/headless/course/{action}
Path parameters
| Field | Description | Options |
|---|---|---|
action | Action to perform | N/A |
Query parameters
| Field | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
id | integer | Course ID. If not provided for edit action, will return a URL for a new course. | No | N/A | N/A |
identifier | string | Identifier for your user. In view mode will be used to track progress. In edit mode will be used to track course creation. | Yes | N/A | N/A |
clientIdentifier | string | Identify a client or group your user may belong to. Useful for multi-tenant situations where you would later like to differentiate between client's courses. | No | N/A | N/A |
flow | string | For edit mode, used to start the course builder in either the generate with AI or convert a document flow. | No | N/A | ai document presentation preview |
back | string | For edit mode, used to customise the back button behavior. In `event` mode it emits an event for your application to handle. In `hidden` mode the back button will not be shown. | No | "event" | hidden event |
colorPrimary | string | For edit mode, used to theme the course builder with a primary color. | No | N/A | N/A |
translations | boolean | For edit mode, opt in to allowing translations to be applied in the course builder. | No | false | N/A |
language | string | For view mode, set the language of the course rather than relying on the browser's language setting. This should be a valid ISO 639-1 language code. If the language is not available, the default course language will be used. | No | null | N/A |
Examples
curl -X GET "https://api.coassemble.com/api/v1/headless/course/view?id=1234&identifier=user123&clientIdentifier=client456" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Get a signed URL for a course
POST /api/v1/headless/course/url
Use this endpoint to get a signed URL for a course. This URL can be used to embed the Coassemble interface into your application within an iframe.
Note that the edit action is only available to workspaces that have access to Headless course creation.
In edit mode, you can specify the flow to open the course builder with:
| Flow | Description |
|---|---|
generate | Open course builder with the AI flow. This flow will guide the user through creating a course using our AI-powered course creation tool. |
transform | Open course builder with the document flow. This flow will guide the user through creating a course by converting a document. |
convert | Open course builder with the convert presentation flow. This flow will allow the user to convert a presentation to a course maintaining the original presentation structure and wording. |
preview | Open course builder in preview-only mode. This flow will allow the user to preview a course without being able to edit it. |
Body properties
| Field | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
action | string | Action type | Yes | N/A | view edit |
id | string | Course ID (required for 'view' action) | No | N/A | N/A |
identifier | string | Unique identifier for user | Yes | N/A | N/A |
clientIdentifier | string | Client identifier | No | N/A | N/A |
options | object | Additional configuration options | No | N/A | N/A |
options properties
| Field | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
flow | string | Flow type for course creation | No | N/A | ai document presentation preview generate transform convert |
back | string | Back navigation behavior | No | N/A | event hidden native |
color | string | Primary color for the interface (hex color) | No | N/A | N/A |
translations | boolean | Enable translation features | No | false | N/A |
language | string | Interface language code | No | N/A | N/A |
googleDrive | boolean | Enable Google Drive integration | No | true | N/A |
oneDrive | boolean | Enable OneDrive integration | No | true | N/A |
loom | boolean | Enable Loom integration | No | false | N/A |
feedback | boolean | Use this to opt out of feedback elements on the course finish screen | No | true | N/A |
publishing | boolean | Use this to opt in to publishing courses within the builder | No | false | N/A |
narrations | boolean | Use this to opt in to AI voice narrations | No | false | N/A |
ai | boolean | Use this to opt out of AI features | No | true | N/A |
Examples
curl -X POST "https://api.coassemble.com/api/v1/headless/course/url" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "view",
"id": "1234",
"identifier": "user123",
"options": {
"flow": "generate",
"back": "event",
"color": "#007bff",
"translations": true,
"language": "en"
}
}'
Duplicate a course Requires Headless course creation
POST /api/v1/headless/course/{id}/duplicate
Use this endpoint to duplicate an existing course.
You can optionally provide an identifier and clientIdentifier to assign the duplicated course to a new client or user within your environment.
Path parameters
| Field | Description | Options |
|---|---|---|
id | Course ID | N/A |
Body properties
| Field | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
identifier | string | No | N/A | N/A | |
clientIdentifier | string | No | N/A | N/A |
Examples
curl -X POST "https://api.coassemble.com/api/v1/headless/course/1234/duplicate" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"identifier": "user456",
"clientIdentifier": "client789"
}'
Delete course
DELETE /api/v1/headless/course/{id}
Use this endpoint to delete an existing course.
Path parameters
| Field | Description | Options |
|---|---|---|
id | Course ID | N/A |
Examples
curl -X DELETE "https://api.coassemble.com/api/v1/headless/course/1234" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Export SCORM Requires Headless course creation
GET /api/v1/headless/course/scorm/{id}
Use this endpoint to export a SCORM package for a course.
Path parameters
| Field | Description | Options |
|---|---|---|
id | Course ID | N/A |
Query parameters
| Field | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
type | string | Type of SCORM package to export | No | N/A | dynamic static |
version | string | Version of the SCORM package to export | No | N/A | 1.2 2004 |
Examples
curl -X GET "https://api.coassemble.com/api/v1/headless/course/scorm/1234?type=dynamic&version=2004" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-o course.scorm.zip
Generate a course Requires Headless course creation
POST /api/v1/headless/course/generate
Use this endpoint to generate a course programmatically.
Body properties
| Field | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
prompt | string | The main prompt describing what the course should be about | Yes | N/A | N/A |
audience | string | Target audience for the course content | No | N/A | N/A |
familiarity | string | Expected familiarity level of the audience with the topic (e.g. beginner, intermediate, advanced) | No | N/A | N/A |
tone | string | Desired tone for the course content (e.g. professional, casual, educational) | No | N/A | N/A |
screenCount | integer | Number of screens to generate | No | 6 | N/A |
identifier | string | Unique identifier for the user creating the course | Yes | N/A | N/A |
clientIdentifier | string | Client identifier for the course | No | N/A | N/A |
Examples
curl -X POST "https://api.coassemble.com/api/v1/headless/course/generate" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Create a course about workplace safety",
"identifier": "user123",
"clientIdentifier": "client456",
"audience": "Employees",
"familiarity": "beginner",
"tone": "professional",
"screenCount": 8
}'
Publish a course Requires Headless course creation
POST /api/v1/headless/course/{id}/publish
Use this endpoint to publish a course programmatically.
Path parameters
| Field | Description | Options |
|---|---|---|
id | Course ID | N/A |
Examples
curl -X POST "https://api.coassemble.com/api/v1/headless/course/1234/publish" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Revert a course Requires Headless course creation
POST /api/v1/headless/course/{id}/revert
Use this endpoint to revert a course to its published version programmatically.
Path parameters
| Field | Description | Options |
|---|---|---|
id | Course ID (draft version) | N/A |
Examples
curl -X POST "https://api.coassemble.com/api/v1/headless/course/1234/revert" \
-H "Authorization: Bearer YOUR_API_TOKEN"