Move a Lesson
curl --request POST \
--url https://schoolmaker.co/api/v1/lessons/{id}/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination_section_id": "section_id"
}
'import requests
url = "https://schoolmaker.co/api/v1/lessons/{id}/move"
payload = { "destination_section_id": "section_id" }
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({destination_section_id: 'section_id'})
};
fetch('https://schoolmaker.co/api/v1/lessons/{id}/move', 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://schoolmaker.co/api/v1/lessons/{id}/move",
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([
'destination_section_id' => 'section_id'
]),
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://schoolmaker.co/api/v1/lessons/{id}/move"
payload := strings.NewReader("{\n \"destination_section_id\": \"section_id\"\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://schoolmaker.co/api/v1/lessons/{id}/move")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination_section_id\": \"section_id\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://schoolmaker.co/api/v1/lessons/{id}/move")
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 \"destination_section_id\": \"section_id\"\n}"
response = http.request(request)
puts response.read_body{
"id": "lesson_id",
"section_id": "section_id",
"name": "Introduction",
"position": 1,
"lesson_type": "text",
"drip_delay": 0,
"is_published": false,
"is_progression_locked": false,
"description": "",
"body": "<div class=\"lexxy-content\"><h1>Welcome</h1></div>",
"settings_embed_wistia": null,
"settings_embed_vimeo": null,
"settings_embed_youtube": null,
"settings_embed_loom": null,
"settings_embed_code": null,
"embed_code": null,
"transcripts": [],
"media": {
"pdf_url": null,
"audio_url": null,
"video_poster_url": null,
"video_status": null,
"video_id": null,
"video_error": null,
"video_progress": null
}
}{
"error": "Access denied"
}{
"error": "Access denied"
}{
"error": "Record not found"
}{
"error": "Existing lesson questions need an available destination category. Check Program Settings → Questions go to before moving this content.",
"code": "questions_disabled"
}Lessons
Move a Lesson
Moves a lesson with its content, attachments and steps, keeping learner progress. Member access follows the destination program and question category settings.
POST
/
lessons
/
{id}
/
move
Move a Lesson
curl --request POST \
--url https://schoolmaker.co/api/v1/lessons/{id}/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination_section_id": "section_id"
}
'import requests
url = "https://schoolmaker.co/api/v1/lessons/{id}/move"
payload = { "destination_section_id": "section_id" }
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({destination_section_id: 'section_id'})
};
fetch('https://schoolmaker.co/api/v1/lessons/{id}/move', 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://schoolmaker.co/api/v1/lessons/{id}/move",
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([
'destination_section_id' => 'section_id'
]),
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://schoolmaker.co/api/v1/lessons/{id}/move"
payload := strings.NewReader("{\n \"destination_section_id\": \"section_id\"\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://schoolmaker.co/api/v1/lessons/{id}/move")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination_section_id\": \"section_id\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://schoolmaker.co/api/v1/lessons/{id}/move")
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 \"destination_section_id\": \"section_id\"\n}"
response = http.request(request)
puts response.read_body{
"id": "lesson_id",
"section_id": "section_id",
"name": "Introduction",
"position": 1,
"lesson_type": "text",
"drip_delay": 0,
"is_published": false,
"is_progression_locked": false,
"description": "",
"body": "<div class=\"lexxy-content\"><h1>Welcome</h1></div>",
"settings_embed_wistia": null,
"settings_embed_vimeo": null,
"settings_embed_youtube": null,
"settings_embed_loom": null,
"settings_embed_code": null,
"embed_code": null,
"transcripts": [],
"media": {
"pdf_url": null,
"audio_url": null,
"video_poster_url": null,
"video_status": null,
"video_id": null,
"video_error": null,
"video_progress": null
}
}{
"error": "Access denied"
}{
"error": "Access denied"
}{
"error": "Record not found"
}{
"error": "Existing lesson questions need an available destination category. Check Program Settings → Questions go to before moving this content.",
"code": "questions_disabled"
}Authorizations
Body
application/json
Response
Successful request.
Was this page helpful?