curl --request PUT \
--url https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId} \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"bundle": {
"lessons": [
{}
],
"courses": [
{}
],
"certifications": [
{}
]
},
"title": "<string>",
"baseUpdatedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}"
payload = {
"bundle": {
"lessons": [{}],
"courses": [{}],
"certifications": [{}]
},
"title": "<string>",
"baseUpdatedAt": "2023-11-07T05:31:56Z"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bundle: {lessons: [{}], courses: [{}], certifications: [{}]},
title: '<string>',
baseUpdatedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'bundle' => [
'lessons' => [
[
]
],
'courses' => [
[
]
],
'certifications' => [
[
]
]
],
'title' => '<string>',
'baseUpdatedAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}"
payload := strings.NewReader("{\n \"bundle\": {\n \"lessons\": [\n {}\n ],\n \"courses\": [\n {}\n ],\n \"certifications\": [\n {}\n ]\n },\n \"title\": \"<string>\",\n \"baseUpdatedAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bundle\": {\n \"lessons\": [\n {}\n ],\n \"courses\": [\n {}\n ],\n \"certifications\": [\n {}\n ]\n },\n \"title\": \"<string>\",\n \"baseUpdatedAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bundle\": {\n \"lessons\": [\n {}\n ],\n \"courses\": [\n {}\n ],\n \"certifications\": [\n {}\n ]\n },\n \"title\": \"<string>\",\n \"baseUpdatedAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_bodySave edits to a course draft
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}.
curl --request PUT \
--url https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId} \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"bundle": {
"lessons": [
{}
],
"courses": [
{}
],
"certifications": [
{}
]
},
"title": "<string>",
"baseUpdatedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}"
payload = {
"bundle": {
"lessons": [{}],
"courses": [{}],
"certifications": [{}]
},
"title": "<string>",
"baseUpdatedAt": "2023-11-07T05:31:56Z"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bundle: {lessons: [{}], courses: [{}], certifications: [{}]},
title: '<string>',
baseUpdatedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'bundle' => [
'lessons' => [
[
]
],
'courses' => [
[
]
],
'certifications' => [
[
]
]
],
'title' => '<string>',
'baseUpdatedAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}"
payload := strings.NewReader("{\n \"bundle\": {\n \"lessons\": [\n {}\n ],\n \"courses\": [\n {}\n ],\n \"certifications\": [\n {}\n ]\n },\n \"title\": \"<string>\",\n \"baseUpdatedAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bundle\": {\n \"lessons\": [\n {}\n ],\n \"courses\": [\n {}\n ],\n \"certifications\": [\n {}\n ]\n },\n \"title\": \"<string>\",\n \"baseUpdatedAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/{draftId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bundle\": {\n \"lessons\": [\n {}\n ],\n \"courses\": [\n {}\n ],\n \"certifications\": [\n {}\n ]\n },\n \"title\": \"<string>\",\n \"baseUpdatedAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Organization API token. Generate from Organization Settings → API Tokens.
Path Parameters
Your organization ID. Any other organization returns 404.
Body
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
Show child attributes
255Response
Saved; the draft as in Get a course draft.

