Duplicate a Step
curl --request POST \
--url https://schoolmaker.co/api/v1/steps/{id}/duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Practice copy",
"destination_lesson_id": "LESSON_ID"
}
'import requests
url = "https://schoolmaker.co/api/v1/steps/{id}/duplicate"
payload = {
"name": "Practice copy",
"destination_lesson_id": "LESSON_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({name: 'Practice copy', destination_lesson_id: 'LESSON_ID'})
};
fetch('https://schoolmaker.co/api/v1/steps/{id}/duplicate', 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/steps/{id}/duplicate",
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([
'name' => 'Practice copy',
'destination_lesson_id' => 'LESSON_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/steps/{id}/duplicate"
payload := strings.NewReader("{\n \"name\": \"Practice copy\",\n \"destination_lesson_id\": \"LESSON_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/steps/{id}/duplicate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Practice copy\",\n \"destination_lesson_id\": \"LESSON_ID\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://schoolmaker.co/api/v1/steps/{id}/duplicate")
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 \"name\": \"Practice copy\",\n \"destination_lesson_id\": \"LESSON_ID\"\n}"
response = http.request(request)
puts response.read_body{
"id": "00000000-0000-4000-8000-000000000002",
"lesson_id": "00000000-0000-4000-8000-000000000003",
"title": "Steps HTTP basic",
"position": 2,
"action_type": "basic",
"is_optional": true,
"is_published": true,
"min_duration": null,
"max_duration": null,
"description": "<div class=\"trix-content lexxy-content\" data-controller=\"add-target-blank-to-links\">\n <p><strong>Imported</strong></p><!-- schoolmaker-lexxy-content -->\n</div>\n",
"form_description": "",
"reviewer_ids": [
"00000000-0000-4000-8000-000000000001"
],
"unlock_badge_id": null,
"miscellaneous_permanent_action_type": null,
"miscellaneous_link_action_type": null,
"miscellaneous_input_text_action_type": "Fill the field below",
"miscellaneous_textarea_action_type": "Fill the field below",
"miscellaneous_post_action_type": null,
"miscellaneous_topic_action_type": null,
"miscellaneous_topic_title_option": null,
"miscellaneous_milestone_requires_review_option": false,
"miscellaneous_milestone_action_type": "file_upload",
"miscellaneous_milestone_text_proof_label_option": "Fill the field below",
"optional_topic_post_body_template": "",
"miscellaneous_milestone_triggers_testimonial_toggle_option": null,
"miscellaneous_milestone_triggers_testimonial_text_option": "Congrats on reaching that big milestone! It's the perfect time to leave a testimonial and tell us how you did it\n",
"miscellaneous_accept_rich_text_option": null,
"miscellaneous_title_form": null,
"miscellaneous_display_type_form": "step_by_step"
}
Steps
Duplicate a Step
Duplicates a step in the selected lesson, keeping its content, settings and reviewers. Member progress is not copied. Returns the completed copy.
POST
/
steps
/
{id}
/
duplicate
Duplicate a Step
curl --request POST \
--url https://schoolmaker.co/api/v1/steps/{id}/duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Practice copy",
"destination_lesson_id": "LESSON_ID"
}
'import requests
url = "https://schoolmaker.co/api/v1/steps/{id}/duplicate"
payload = {
"name": "Practice copy",
"destination_lesson_id": "LESSON_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({name: 'Practice copy', destination_lesson_id: 'LESSON_ID'})
};
fetch('https://schoolmaker.co/api/v1/steps/{id}/duplicate', 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/steps/{id}/duplicate",
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([
'name' => 'Practice copy',
'destination_lesson_id' => 'LESSON_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/steps/{id}/duplicate"
payload := strings.NewReader("{\n \"name\": \"Practice copy\",\n \"destination_lesson_id\": \"LESSON_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/steps/{id}/duplicate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Practice copy\",\n \"destination_lesson_id\": \"LESSON_ID\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://schoolmaker.co/api/v1/steps/{id}/duplicate")
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 \"name\": \"Practice copy\",\n \"destination_lesson_id\": \"LESSON_ID\"\n}"
response = http.request(request)
puts response.read_body{
"id": "00000000-0000-4000-8000-000000000002",
"lesson_id": "00000000-0000-4000-8000-000000000003",
"title": "Steps HTTP basic",
"position": 2,
"action_type": "basic",
"is_optional": true,
"is_published": true,
"min_duration": null,
"max_duration": null,
"description": "<div class=\"trix-content lexxy-content\" data-controller=\"add-target-blank-to-links\">\n <p><strong>Imported</strong></p><!-- schoolmaker-lexxy-content -->\n</div>\n",
"form_description": "",
"reviewer_ids": [
"00000000-0000-4000-8000-000000000001"
],
"unlock_badge_id": null,
"miscellaneous_permanent_action_type": null,
"miscellaneous_link_action_type": null,
"miscellaneous_input_text_action_type": "Fill the field below",
"miscellaneous_textarea_action_type": "Fill the field below",
"miscellaneous_post_action_type": null,
"miscellaneous_topic_action_type": null,
"miscellaneous_topic_title_option": null,
"miscellaneous_milestone_requires_review_option": false,
"miscellaneous_milestone_action_type": "file_upload",
"miscellaneous_milestone_text_proof_label_option": "Fill the field below",
"optional_topic_post_body_template": "",
"miscellaneous_milestone_triggers_testimonial_toggle_option": null,
"miscellaneous_milestone_triggers_testimonial_text_option": "Congrats on reaching that big milestone! It's the perfect time to leave a testimonial and tell us how you did it\n",
"miscellaneous_accept_rich_text_option": null,
"miscellaneous_title_form": null,
"miscellaneous_display_type_form": "step_by_step"
}
Authorizations
Body
application/json
Response
Successful request.
Was this page helpful?