Move a Section
curl --request POST \
--url https://schoolmaker.co/api/v1/sections/{id}/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination_program_id": "PROGRAM_ID",
"destination_section_group_id": "GROUP_ID"
}
'import requests
url = "https://schoolmaker.co/api/v1/sections/{id}/move"
payload = {
"destination_program_id": "PROGRAM_ID",
"destination_section_group_id": "GROUP_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_program_id: 'PROGRAM_ID', destination_section_group_id: 'GROUP_ID'})
};
fetch('https://schoolmaker.co/api/v1/sections/{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/sections/{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_program_id' => 'PROGRAM_ID',
'destination_section_group_id' => 'GROUP_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/sections/{id}/move"
payload := strings.NewReader("{\n \"destination_program_id\": \"PROGRAM_ID\",\n \"destination_section_group_id\": \"GROUP_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/sections/{id}/move")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination_program_id\": \"PROGRAM_ID\",\n \"destination_section_group_id\": \"GROUP_ID\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://schoolmaker.co/api/v1/sections/{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_program_id\": \"PROGRAM_ID\",\n \"destination_section_group_id\": \"GROUP_ID\"\n}"
response = http.request(request)
puts response.read_body{
"id": "SECTION_ID",
"product_id": "PROGRAM_ID",
"section_group_id": "GROUP_ID",
"section_group_position": 1,
"name": "Introduction",
"description": "Start here",
"position": 1,
"drip_delay": 0,
"is_published": false,
"image_cover_url": null
}{
"error": "Access denied"
}{
"error": "You do not have permission to perform this action"
}{
"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"
}Throttled
Sections
Move a Section
Moves a section with its lessons and steps, keeping learner progress. Member access follows the destination program and question category settings.
POST
/
sections
/
{id}
/
move
Move a Section
curl --request POST \
--url https://schoolmaker.co/api/v1/sections/{id}/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination_program_id": "PROGRAM_ID",
"destination_section_group_id": "GROUP_ID"
}
'import requests
url = "https://schoolmaker.co/api/v1/sections/{id}/move"
payload = {
"destination_program_id": "PROGRAM_ID",
"destination_section_group_id": "GROUP_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_program_id: 'PROGRAM_ID', destination_section_group_id: 'GROUP_ID'})
};
fetch('https://schoolmaker.co/api/v1/sections/{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/sections/{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_program_id' => 'PROGRAM_ID',
'destination_section_group_id' => 'GROUP_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/sections/{id}/move"
payload := strings.NewReader("{\n \"destination_program_id\": \"PROGRAM_ID\",\n \"destination_section_group_id\": \"GROUP_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/sections/{id}/move")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination_program_id\": \"PROGRAM_ID\",\n \"destination_section_group_id\": \"GROUP_ID\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://schoolmaker.co/api/v1/sections/{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_program_id\": \"PROGRAM_ID\",\n \"destination_section_group_id\": \"GROUP_ID\"\n}"
response = http.request(request)
puts response.read_body{
"id": "SECTION_ID",
"product_id": "PROGRAM_ID",
"section_group_id": "GROUP_ID",
"section_group_position": 1,
"name": "Introduction",
"description": "Start here",
"position": 1,
"drip_delay": 0,
"is_published": false,
"image_cover_url": null
}{
"error": "Access denied"
}{
"error": "You do not have permission to perform this action"
}{
"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"
}Throttled
Authorizations
Body
application/json
Was this page helpful?