POST /api/v1/courses/:id/export
Generate a SCORM package for a completed course. Synchronous — typically
returns in under 30 seconds. The response includes a permanent
downloadUrl that you can hand to your LMS.
Request
Path parameters
| Field | Type | Description |
|---|---|---|
id |
string | Course ID, returned by GET /api/v1/courses/jobs/:jobId when the job completes. |
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
format |
enum | no | SCORM version. One of "scorm12", "scorm2004", "scorm2004_4". Default "scorm12". |
callbackUrl |
string (URL) | no | HTTPS webhook fired after export completes. See Webhooks. |
Example request
curl -s https://learningstudioai.com/api/v1/courses/$COURSE_ID/export \
-H "Authorization: Bearer $LS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "format": "scorm12" }'
Response
200 OK
{
"courseId": "cou_abc123",
"format": "scorm12",
"downloadUrl": "https://storage.googleapis.com/.../course.zip",
"shareUrl": "https://learningstudioai.com/go/cou_abc123",
"exportedAt": "2026-04-28T17:15:42.000Z"
}
| Field | Type | Description |
|---|---|---|
courseId |
string | Echoed back from the URL. |
format |
string | Echoed back from the request body. |
downloadUrl |
string | Direct URL to the SCORM zip on Firebase Storage. Permanent — re-host from your own infrastructure if you need URLs you fully control. |
shareUrl |
string | Public preview page (/go/:id). Useful as a fallback for learners without LMS access. |
exportedAt |
string (ISO 8601) | When the export completed. |
SCORM versions
"scorm12"— most widely compatible. Default."scorm2004"— SCORM 2004 3rd edition."scorm2004_4"— SCORM 2004 4th edition.
If your LMS supports both, pick "scorm2004_4" for richer sequencing and
objective tracking. If you don't know what your LMS supports, stick with
the default — every LMS we've tested ingests "scorm12" correctly.
Errors
This endpoint may return:
400VALIDATION_ERROR— e.g. unknownformat.401INVALID_API_KEY403PAID_PLAN_REQUIRED404NOT_FOUND— course not found, or doesn't belong to this key.429RATE_LIMIT_EXCEEDED— 30 requests / minute / key.
See Errors for response shape and full code definitions.
Webhooks
Pass callbackUrl on the export request to receive a
course.exported event on completion. Useful when
chaining export → LMS upload pipelines: your webhook handler can pick up
the downloadUrl and POST it straight into the LMS API without keeping
the originating request open.