Delivery & Practice
Build or share self-paced online lesson
Builds a Role kit’s self-paced Creator online lesson (standalone HTML + SCORM 1.2) using zero model tokens, optionally minting a public /learn/<code> share link.
POST
/
api
/
v1
/
kits
/
{kit}
/
lesson
Build or share self-paced online lesson
curl --request POST \
--url https://enablementstudio.ai/api/v1/kits/{kit}/lesson \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"share": false,
"rebuild": true
}
'import requests
url = "https://enablementstudio.ai/api/v1/kits/{kit}/lesson"
payload = {
"share": False,
"rebuild": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({share: false, rebuild: true})
};
fetch('https://enablementstudio.ai/api/v1/kits/{kit}/lesson', 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://enablementstudio.ai/api/v1/kits/{kit}/lesson",
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([
'share' => false,
'rebuild' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://enablementstudio.ai/api/v1/kits/{kit}/lesson"
payload := strings.NewReader("{\n \"share\": false,\n \"rebuild\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://enablementstudio.ai/api/v1/kits/{kit}/lesson")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"share\": false,\n \"rebuild\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://enablementstudio.ai/api/v1/kits/{kit}/lesson")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"share\": false,\n \"rebuild\": true\n}"
response = http.request(request)
puts response.read_body{
"kit_id": 12,
"built": true,
"lesson_id": "abc123",
"title": "Harborline AE",
"activity_count": 6,
"preview_path": "/kit/lesson?run=12",
"downloads": {
"html": "/kit/lesson?run=12&download=html",
"scorm_1_2": "/kit/lesson?run=12&download=package"
},
"shared": null
}{
"kit_id": 12,
"built": true,
"lesson_id": "abc123",
"title": "Harborline AE",
"activity_count": 6,
"preview_path": "/kit/lesson?run=12",
"downloads": {
"html": "/kit/lesson?run=12&download=html",
"scorm_1_2": "/kit/lesson?run=12&download=package"
},
"shared": null
}{
"error": {
"code": "wrong_product",
"message": "Only Role kits have online lessons."
}
}{
"error": {
"code": "signed_out",
"message": "Sign in to continue."
}
}{
"error": {
"code": "connector_forbidden",
"message": "An AI app cannot do that. Open Enablement Studio on the web to do it."
}
}{
"error": {
"code": "not_found",
"message": "That page is not part of the app."
}
}{
"error": {
"code": "lesson_empty",
"message": "Accept objectives and practice activities first."
}
}Authorizations
Path Parameters
⌘I
Build or share self-paced online lesson
curl --request POST \
--url https://enablementstudio.ai/api/v1/kits/{kit}/lesson \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"share": false,
"rebuild": true
}
'import requests
url = "https://enablementstudio.ai/api/v1/kits/{kit}/lesson"
payload = {
"share": False,
"rebuild": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({share: false, rebuild: true})
};
fetch('https://enablementstudio.ai/api/v1/kits/{kit}/lesson', 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://enablementstudio.ai/api/v1/kits/{kit}/lesson",
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([
'share' => false,
'rebuild' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://enablementstudio.ai/api/v1/kits/{kit}/lesson"
payload := strings.NewReader("{\n \"share\": false,\n \"rebuild\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://enablementstudio.ai/api/v1/kits/{kit}/lesson")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"share\": false,\n \"rebuild\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://enablementstudio.ai/api/v1/kits/{kit}/lesson")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"share\": false,\n \"rebuild\": true\n}"
response = http.request(request)
puts response.read_body{
"kit_id": 12,
"built": true,
"lesson_id": "abc123",
"title": "Harborline AE",
"activity_count": 6,
"preview_path": "/kit/lesson?run=12",
"downloads": {
"html": "/kit/lesson?run=12&download=html",
"scorm_1_2": "/kit/lesson?run=12&download=package"
},
"shared": null
}{
"kit_id": 12,
"built": true,
"lesson_id": "abc123",
"title": "Harborline AE",
"activity_count": 6,
"preview_path": "/kit/lesson?run=12",
"downloads": {
"html": "/kit/lesson?run=12&download=html",
"scorm_1_2": "/kit/lesson?run=12&download=package"
},
"shared": null
}{
"error": {
"code": "wrong_product",
"message": "Only Role kits have online lessons."
}
}{
"error": {
"code": "signed_out",
"message": "Sign in to continue."
}
}{
"error": {
"code": "connector_forbidden",
"message": "An AI app cannot do that. Open Enablement Studio on the web to do it."
}
}{
"error": {
"code": "not_found",
"message": "That page is not part of the app."
}
}{
"error": {
"code": "lesson_empty",
"message": "Accept objectives and practice activities first."
}
}