Skip to content

Save edits to a course draft

PUT/v1/organization/{orgId}/learning/drafts/{draftId}

US Region: https://public-api.sessionboard.com · EU Region: https://public-api-eu.sessionboard.com

Replaces the draft's bundle with your edited copy (send the whole bundle — anything left out is dropped) and returns the draft with a fresh diff. Pass the draft's updated_at from the read you edited as baseUpdatedAt: if the draft changed since, the save answers 409 with code: COURSE_DRAFT_STALE and writes nothing. Requires write:learning. Also at PUT /v1/learning/drafts/{draftId}.

Request example

Terminal window
curl --request PUT \
--url 'https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}' \
--header 'x-access-token: <api-token>' \
--header 'Content-Type: application/json' \
--data '{
"title": "<string>",
"baseUpdatedAt": "2026-01-15T09:30:00Z",
"bundle": {
"lessons": [
{}
],
"courses": [
{}
],
"certifications": [
{}
]
}
}'

Try it

Authorization

Your token stays in this page. It is sent only to the region above and is never saved; it is gone when you leave or reload the page.

Path parameters
Body application/json
PUT

Authorizations

  • x-access-tokenstringheader

    Organization API token. Generate from Organization Settings → API Tokens.

  • AuthorizationBearer <token>headeror

    OAuth 2.1 access token. Obtained via the OAuth PKCE flow at /oauth/token.

Send one of these. See Authentication.

Path parameters

  • orgIdstringpathrequired

    Your organization ID. Any other organization returns 404.

  • draftIdstring<uuid>pathrequired

Request body

application/jsonrequired

  • titlestring
    Max length
    255
  • baseUpdatedAtstring<date-time>
  • bundleCourseBundlerequired

    Lessons, the course and the certification. A lesson's watch step plays a clip (mediaItemId) and may carry checkpoints — questions with atSeconds, seconds into the clip. A question has prompt, type, options, answer (multi-select, ordering and matching answers are JSON strings), optional config and feedback (correct, incorrect, hint). Keys are permanent: publishing upserts by key.

    Show child attributes
    • lessonsobject[]required
    • coursesobject[]
    • certificationsobject[]
{
"title": "<string>",
"baseUpdatedAt": "2026-01-15T09:30:00Z",
"bundle": {
"lessons": [
{}
],
"courses": [
{}
],
"certifications": [
{}
]
}
}

Responses

200

Saved; the draft as in Get a course draft.

400

The bundle failed validation (the message names the lesson and question).

403

  • SCOPE_REQUIRED — the token lacks read:learning (reads) or write:learning (writes). Legacy tokens with no scopes cannot write.
  • FORBIDDEN — Learning is not on for the organization, or the token's user lacks the Lessons permission.

409

The draft changed since baseUpdatedAt (code: COURSE_DRAFT_STALE, with the current updated_at).

Get release notes by email

A short digest on the days something new goes live — each change with a link to its note in the release notes. No marketing, and one click to stop.

Company email addresses only. We’ll send one email to confirm it’s you. Already use Sessionboard? You can also turn this on under Community → What’s new.