curl --request POST \
--url https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/create \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"mediaItemIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"title": "<string>",
"audience": "<string>",
"certification": true,
"validityMonths": 60,
"questionTypes": [],
"checkpointsPerLesson": 1,
"quizQuestions": 5,
"maxLessonsPerVideo": 6
}
'import requests
url = "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/create"
payload = {
"mediaItemIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"title": "<string>",
"audience": "<string>",
"certification": True,
"validityMonths": 60,
"questionTypes": [],
"checkpointsPerLesson": 1,
"quizQuestions": 5,
"maxLessonsPerVideo": 6
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mediaItemIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
title: '<string>',
audience: '<string>',
certification: true,
validityMonths: 60,
questionTypes: [],
checkpointsPerLesson: 1,
quizQuestions: 5,
maxLessonsPerVideo: 6
})
};
fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/create', 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/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mediaItemIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'title' => '<string>',
'audience' => '<string>',
'certification' => true,
'validityMonths' => 60,
'questionTypes' => [
],
'checkpointsPerLesson' => 1,
'quizQuestions' => 5,
'maxLessonsPerVideo' => 6
]),
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/create"
payload := strings.NewReader("{\n \"mediaItemIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"title\": \"<string>\",\n \"audience\": \"<string>\",\n \"certification\": true,\n \"validityMonths\": 60,\n \"questionTypes\": [],\n \"checkpointsPerLesson\": 1,\n \"quizQuestions\": 5,\n \"maxLessonsPerVideo\": 6\n}")
req, _ := http.NewRequest("POST", 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.post("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/create")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mediaItemIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"title\": \"<string>\",\n \"audience\": \"<string>\",\n \"certification\": true,\n \"validityMonths\": 60,\n \"questionTypes\": [],\n \"checkpointsPerLesson\": 1,\n \"quizQuestions\": 5,\n \"maxLessonsPerVideo\": 6\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mediaItemIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"title\": \"<string>\",\n \"audience\": \"<string>\",\n \"certification\": true,\n \"validityMonths\": 60,\n \"questionTypes\": [],\n \"checkpointsPerLesson\": 1,\n \"quizQuestions\": 5,\n \"maxLessonsPerVideo\": 6\n}"
response = http.request(request)
puts response.read_body{
"payload": {
"draft": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"title": "<string>",
"media_item_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"progress": {
"step": "<string>",
"done": 123,
"total": 123
},
"error": "<string>",
"lesson_count": 123,
"applied_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"poll": "<string>"
}
}Draft a course from videos
Starts making a course from 1–10 videos or clips. The videos are checked now (same organization, a transcript, no cuts); then the course is generated in the background: lesson-sized segments, a clip cut for each, and per lesson a short reading, in-video questions and a quiz, every question grounded in that clip’s transcript. Answers 202 with the draft (status: queued); poll GET /v1/organization/{orgId}/learning/drafts/{draftId} until status is ready or failed (usually a minute or two per video). Nothing is published and no one is notified. Requires write:learning. Also at POST /v1/learning/drafts/create.
curl --request POST \
--url https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/create \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"mediaItemIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"title": "<string>",
"audience": "<string>",
"certification": true,
"validityMonths": 60,
"questionTypes": [],
"checkpointsPerLesson": 1,
"quizQuestions": 5,
"maxLessonsPerVideo": 6
}
'import requests
url = "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/create"
payload = {
"mediaItemIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"title": "<string>",
"audience": "<string>",
"certification": True,
"validityMonths": 60,
"questionTypes": [],
"checkpointsPerLesson": 1,
"quizQuestions": 5,
"maxLessonsPerVideo": 6
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mediaItemIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
title: '<string>',
audience: '<string>',
certification: true,
validityMonths: 60,
questionTypes: [],
checkpointsPerLesson: 1,
quizQuestions: 5,
maxLessonsPerVideo: 6
})
};
fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/create', 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/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mediaItemIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'title' => '<string>',
'audience' => '<string>',
'certification' => true,
'validityMonths' => 60,
'questionTypes' => [
],
'checkpointsPerLesson' => 1,
'quizQuestions' => 5,
'maxLessonsPerVideo' => 6
]),
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/create"
payload := strings.NewReader("{\n \"mediaItemIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"title\": \"<string>\",\n \"audience\": \"<string>\",\n \"certification\": true,\n \"validityMonths\": 60,\n \"questionTypes\": [],\n \"checkpointsPerLesson\": 1,\n \"quizQuestions\": 5,\n \"maxLessonsPerVideo\": 6\n}")
req, _ := http.NewRequest("POST", 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.post("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/create")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mediaItemIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"title\": \"<string>\",\n \"audience\": \"<string>\",\n \"certification\": true,\n \"validityMonths\": 60,\n \"questionTypes\": [],\n \"checkpointsPerLesson\": 1,\n \"quizQuestions\": 5,\n \"maxLessonsPerVideo\": 6\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/drafts/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mediaItemIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"title\": \"<string>\",\n \"audience\": \"<string>\",\n \"certification\": true,\n \"validityMonths\": 60,\n \"questionTypes\": [],\n \"checkpointsPerLesson\": 1,\n \"quizQuestions\": 5,\n \"maxLessonsPerVideo\": 6\n}"
response = http.request(request)
puts response.read_body{
"payload": {
"draft": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"title": "<string>",
"media_item_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"progress": {
"step": "<string>",
"done": 123,
"total": 123
},
"error": "<string>",
"lesson_count": 123,
"applied_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"poll": "<string>"
}
}Authorizations
Organization API token. Generate from Organization Settings → API Tokens.
Path Parameters
Your organization ID. Any other organization returns 404.
Body
Videos / clips from List videos, in course order.
1 - 10 elementsCourse title. Defaults to the video's title when there is one video.
255Who the course is for. Shapes the writing; it does not decide who is assigned.
500Add a certification earned by completing every lesson.
How long the certification lasts. Omit for never expires.
1 <= x <= 120Default multiple_choice, true_false, multi_select.
multiple_choice, true_false, short_answer, multi_select, ordering, matching, numeric Questions that pause the video, per lesson. Default 2.
0 <= x <= 3Final quiz questions per lesson. Default 4.
1 <= x <= 10Upper bound on lessons from one long video, default 8. Exceeded only when fewer lessons would each run past 10 minutes.
1 <= x <= 12Response
Queued.
Show child attributes
Show child attributes

