Skip to content

Publish and assign a course draft

POST/v1/organization/{orgId}/learning/drafts/{draftId}/apply

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

Publishes the draft's lessons, course and certification to every learner in the organization. Lessons upsert by key, so publishing an edited draft again updates the same lessons and keeps learners' progress. With assign, assigns the certification (or the course when there is none) and messages each assignee (Slack DM, or email when Slack can't reach them); repeating the same assign does not assign or message again. With announce.slackChannelId, posts the announcement in that channel. Refused while clips are still being cut unless allowPendingMedia. The token's user needs the Lessons create and update permissions. Requires write:learning. Also at POST /v1/learning/drafts/{draftId}/apply.

Request example

Terminal window
curl --request POST \
--url 'https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}/apply' \
--header 'x-access-token: <api-token>' \
--header 'Content-Type: application/json' \
--data '{
"assign": {
"allTeam": true,
"userIds": [
123
],
"dueInDays": 1,
"required": true
},
"announce": {
"slackChannelId": "<string>"
},
"allowPendingMedia": false
}'

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
POST

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/json

  • assignobject
    Show child attributes
    • allTeamboolean

      Everyone on the team, including people who join later.

    • userIdsinteger[]
    • dueInDaysinteger | null
      Minimum
      1
      Maximum
      365
    • requiredboolean
      Default
      true
  • announceobject
    Show child attributes
    • slackChannelIdstring
      Max length
      32
  • allowPendingMediaboolean
    Default
    false
{
"assign": {
"allTeam": true,
"userIds": [
123
],
"dueInDays": 1,
"required": true
},
"announce": {
"slackChannelId": "<string>"
},
"allowPendingMedia": false
}

Responses

200

Published; the draft with apply_result (diff, the assignment and its delivery report).

400

A clip could not be cut, or there is nothing to assign.

403

Token lacks write:learning, the user lacks the Lessons permissions, clips are still being cut, or the draft changed or is being published (reload it).