Update a schedule (partial).
curl --request PATCH \
--url https://{origin}/v1/schedules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"cadence": {
"kind": "off"
},
"device_udid": "<string>",
"active_start_hour": 11,
"active_end_hour": 12,
"timezone": "<string>",
"per_day_cap": 6,
"horizon_hours": 36
}
'import requests
url = "https://{origin}/v1/schedules/{id}"
payload = {
"name": "<string>",
"cadence": { "kind": "off" },
"device_udid": "<string>",
"active_start_hour": 11,
"active_end_hour": 12,
"timezone": "<string>",
"per_day_cap": 6,
"horizon_hours": 36
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
cadence: {kind: 'off'},
device_udid: '<string>',
active_start_hour: 11,
active_end_hour: 12,
timezone: '<string>',
per_day_cap: 6,
horizon_hours: 36
})
};
fetch('https://{origin}/v1/schedules/{id}', 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://{origin}/v1/schedules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'cadence' => [
'kind' => 'off'
],
'device_udid' => '<string>',
'active_start_hour' => 11,
'active_end_hour' => 12,
'timezone' => '<string>',
'per_day_cap' => 6,
'horizon_hours' => 36
]),
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://{origin}/v1/schedules/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"cadence\": {\n \"kind\": \"off\"\n },\n \"device_udid\": \"<string>\",\n \"active_start_hour\": 11,\n \"active_end_hour\": 12,\n \"timezone\": \"<string>\",\n \"per_day_cap\": 6,\n \"horizon_hours\": 36\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{origin}/v1/schedules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"cadence\": {\n \"kind\": \"off\"\n },\n \"device_udid\": \"<string>\",\n \"active_start_hour\": 11,\n \"active_end_hour\": 12,\n \"timezone\": \"<string>\",\n \"per_day_cap\": 6,\n \"horizon_hours\": 36\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{origin}/v1/schedules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"cadence\": {\n \"kind\": \"off\"\n },\n \"device_udid\": \"<string>\",\n \"active_start_hour\": 11,\n \"active_end_hour\": 12,\n \"timezone\": \"<string>\",\n \"per_day_cap\": 6,\n \"horizon_hours\": 36\n}"
response = http.request(request)
puts response.read_body{
"schema": "1.0",
"schedule": {
"schedule_id": "<string>",
"name": "<string>",
"account_username": "<string>",
"cadence": {
"kind": "off"
},
"status": "active",
"device_udid": "<string>",
"active_start_hour": 123,
"active_end_hour": 123,
"timezone": "<string>",
"content_source": "<unknown>",
"default_disposition": "draft",
"per_day_cap": 123,
"horizon_hours": 123,
"last_materialized_through": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"schema": "1.0",
"error": {
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}
}{
"schema": "1.0",
"error": {
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}
}{
"schema": "1.0",
"error": {
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}
}{
"schema": "1.0",
"error": {
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}
}Update a schedule (partial).
Patches only name/cadence/device_udid/active_start_hour/active_end_hour/timezone/per_day_cap/ horizon_hours/default_disposition. account_username and status are NOT patchable here (use pause/resume/delete); any other key is rejected with 422.
PATCH
/
v1
/
schedules
/
{id}
Update a schedule (partial).
curl --request PATCH \
--url https://{origin}/v1/schedules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"cadence": {
"kind": "off"
},
"device_udid": "<string>",
"active_start_hour": 11,
"active_end_hour": 12,
"timezone": "<string>",
"per_day_cap": 6,
"horizon_hours": 36
}
'import requests
url = "https://{origin}/v1/schedules/{id}"
payload = {
"name": "<string>",
"cadence": { "kind": "off" },
"device_udid": "<string>",
"active_start_hour": 11,
"active_end_hour": 12,
"timezone": "<string>",
"per_day_cap": 6,
"horizon_hours": 36
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
cadence: {kind: 'off'},
device_udid: '<string>',
active_start_hour: 11,
active_end_hour: 12,
timezone: '<string>',
per_day_cap: 6,
horizon_hours: 36
})
};
fetch('https://{origin}/v1/schedules/{id}', 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://{origin}/v1/schedules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'cadence' => [
'kind' => 'off'
],
'device_udid' => '<string>',
'active_start_hour' => 11,
'active_end_hour' => 12,
'timezone' => '<string>',
'per_day_cap' => 6,
'horizon_hours' => 36
]),
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://{origin}/v1/schedules/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"cadence\": {\n \"kind\": \"off\"\n },\n \"device_udid\": \"<string>\",\n \"active_start_hour\": 11,\n \"active_end_hour\": 12,\n \"timezone\": \"<string>\",\n \"per_day_cap\": 6,\n \"horizon_hours\": 36\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{origin}/v1/schedules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"cadence\": {\n \"kind\": \"off\"\n },\n \"device_udid\": \"<string>\",\n \"active_start_hour\": 11,\n \"active_end_hour\": 12,\n \"timezone\": \"<string>\",\n \"per_day_cap\": 6,\n \"horizon_hours\": 36\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{origin}/v1/schedules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"cadence\": {\n \"kind\": \"off\"\n },\n \"device_udid\": \"<string>\",\n \"active_start_hour\": 11,\n \"active_end_hour\": 12,\n \"timezone\": \"<string>\",\n \"per_day_cap\": 6,\n \"horizon_hours\": 36\n}"
response = http.request(request)
puts response.read_body{
"schema": "1.0",
"schedule": {
"schedule_id": "<string>",
"name": "<string>",
"account_username": "<string>",
"cadence": {
"kind": "off"
},
"status": "active",
"device_udid": "<string>",
"active_start_hour": 123,
"active_end_hour": 123,
"timezone": "<string>",
"content_source": "<unknown>",
"default_disposition": "draft",
"per_day_cap": 123,
"horizon_hours": 123,
"last_materialized_through": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"schema": "1.0",
"error": {
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}
}{
"schema": "1.0",
"error": {
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}
}{
"schema": "1.0",
"error": {
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}
}{
"schema": "1.0",
"error": {
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}
}Authorizations
The access_token from the exchange endpoint.
Path Parameters
Body
application/json
Partial patch. account_username and status are not updatable here; any key outside this set is rejected.
Required string length:
1 - 120Recurrence for a standing schedule. Off, or N posts/day across the active window.
- Option 1
- Option 2
Show child attributes
Show child attributes
Required range:
0 <= x <= 23Required range:
1 <= x <= 24Required range:
1 <= x <= 12Required range:
1 <= x <= 72Available options:
draft, post_now ⌘I