Docs Guides

Courses and versions

Draft, publish and update courses without disturbing learners.

The lifecycle#

create course ──► draft v1 ──► publish ──► PUBLISHED v1
                                 │
                new draft v2 ◄───┘   (copy of the published version)
                    │ edit
                    ▼
                 publish ──► PUBLISHED v2, v1 becomes RETIRED
  1. POST /courses creates the course and an empty draft.
  2. Edit the draft: settings (PUT /courses/{id}/draft), sections, lessons, blocks and quizzes.
  3. POST /courses/{id}/publish freezes it.
  4. To change published content, POST /courses/{id}/versions copies it into a new draft.

What a draft contains#

course version
└── section (module)
    └── lesson
        └── block (TEXT, VIDEO, IMAGE, FILE, EMBED, ASSESSMENT)

Read the whole tree at once with GET /courses/{id}/draft (or /versions/published, or a version number).

Completion#

On the draft’s settings:

Field Meaning
completionPolicy ALL_REQUIRED or PERCENT_REQUIRED
completionPercent Required with PERCENT_REQUIRED
certificateTemplateId Issue this certificate on completion
certificateValidityDays Certificate expiry; omit for never

On each lesson: isRequired, completionMode (MANUAL, VIEWED, ASSESSMENT_PASSED) and unlockMode (OPEN, AFTER_PREVIOUS).

Publishing is validated#

Publishing returns 422 with every problem in one response, not just the first:

{
  "status": 422,
  "detail": "The draft can't be published yet.",
  "problems": [
    "Section 'Fire safety' has no lessons",
    "Lesson 'Quiz' completes by passing an assessment but has no assessment block"
  ]
}

What happens to enrolled learners#

They stay on the version they started, with their progress intact. Only new enrollments get the newly published version. Sections, lessons and quizzes keep a stableKey across versions so progress can be related between them.

Note

Moving existing learners to a newer version is not automatic today. See Limits and roadmap.

Reordering#

Every list that has an order has an …/order endpoint taking { "ids": [...] } with every id exactly once, applied in a single transaction.

Type to search guides and every endpoint.