curl --request POST \
--url https://platform-api.sarj.ai/api/v1/schedule-configs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_retries": 5,
"wait_between": "<string>",
"enabled": true,
"retry_window": {
"start_edge": {
"hour": 11,
"minute": 29
},
"end_edge": {
"hour": 11,
"minute": 29
}
},
"timezone": "Asia/Riyadh",
"expire_after": "P3D"
}
'import requests
url = "https://platform-api.sarj.ai/api/v1/schedule-configs"
payload = {
"max_retries": 5,
"wait_between": "<string>",
"enabled": True,
"retry_window": {
"start_edge": {
"hour": 11,
"minute": 29
},
"end_edge": {
"hour": 11,
"minute": 29
}
},
"timezone": "Asia/Riyadh",
"expire_after": "P3D"
}
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({
max_retries: 5,
wait_between: '<string>',
enabled: true,
retry_window: {start_edge: {hour: 11, minute: 29}, end_edge: {hour: 11, minute: 29}},
timezone: 'Asia/Riyadh',
expire_after: 'P3D'
})
};
fetch('https://platform-api.sarj.ai/api/v1/schedule-configs', 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://platform-api.sarj.ai/api/v1/schedule-configs",
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([
'max_retries' => 5,
'wait_between' => '<string>',
'enabled' => true,
'retry_window' => [
'start_edge' => [
'hour' => 11,
'minute' => 29
],
'end_edge' => [
'hour' => 11,
'minute' => 29
]
],
'timezone' => 'Asia/Riyadh',
'expire_after' => 'P3D'
]),
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://platform-api.sarj.ai/api/v1/schedule-configs"
payload := strings.NewReader("{\n \"max_retries\": 5,\n \"wait_between\": \"<string>\",\n \"enabled\": true,\n \"retry_window\": {\n \"start_edge\": {\n \"hour\": 11,\n \"minute\": 29\n },\n \"end_edge\": {\n \"hour\": 11,\n \"minute\": 29\n }\n },\n \"timezone\": \"Asia/Riyadh\",\n \"expire_after\": \"P3D\"\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://platform-api.sarj.ai/api/v1/schedule-configs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"max_retries\": 5,\n \"wait_between\": \"<string>\",\n \"enabled\": true,\n \"retry_window\": {\n \"start_edge\": {\n \"hour\": 11,\n \"minute\": 29\n },\n \"end_edge\": {\n \"hour\": 11,\n \"minute\": 29\n }\n },\n \"timezone\": \"Asia/Riyadh\",\n \"expire_after\": \"P3D\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.sarj.ai/api/v1/schedule-configs")
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 \"max_retries\": 5,\n \"wait_between\": \"<string>\",\n \"enabled\": true,\n \"retry_window\": {\n \"start_edge\": {\n \"hour\": 11,\n \"minute\": 29\n },\n \"end_edge\": {\n \"hour\": 11,\n \"minute\": 29\n }\n },\n \"timezone\": \"Asia/Riyadh\",\n \"expire_after\": \"P3D\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"max_retries": 123,
"wait_between": "<string>",
"retry_window": {
"start_edge": {
"hour": 11,
"minute": 29
},
"end_edge": {
"hour": 11,
"minute": 29
}
},
"timezone": "<string>",
"expire_after": "<string>"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"message": "<string>",
"field_violations": [
{
"field": "<string>",
"message": "<string>"
}
],
"type": "validation_error"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"message": "<string>",
"field_violations": [
{
"field": "<string>",
"message": "<string>"
}
],
"type": "validation_error"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"message": "<string>",
"field_violations": [
{
"field": "<string>",
"message": "<string>"
}
],
"type": "validation_error"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"message": "<string>",
"field_violations": [
{
"field": "<string>",
"message": "<string>"
}
],
"type": "validation_error"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Create a Sarj.ai schedule config (retry policy) for outbound calls
Create a reusable retry policy: how many times to retry a call the customer did not answer, how long to wait between attempts, and in which daily window. Reference the returned id as schedule_config_id when creating calls. This endpoint is create-only today — there is no way to fetch, list, update, or disable a config after creation; that ships in a follow-up.
curl --request POST \
--url https://platform-api.sarj.ai/api/v1/schedule-configs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_retries": 5,
"wait_between": "<string>",
"enabled": true,
"retry_window": {
"start_edge": {
"hour": 11,
"minute": 29
},
"end_edge": {
"hour": 11,
"minute": 29
}
},
"timezone": "Asia/Riyadh",
"expire_after": "P3D"
}
'import requests
url = "https://platform-api.sarj.ai/api/v1/schedule-configs"
payload = {
"max_retries": 5,
"wait_between": "<string>",
"enabled": True,
"retry_window": {
"start_edge": {
"hour": 11,
"minute": 29
},
"end_edge": {
"hour": 11,
"minute": 29
}
},
"timezone": "Asia/Riyadh",
"expire_after": "P3D"
}
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({
max_retries: 5,
wait_between: '<string>',
enabled: true,
retry_window: {start_edge: {hour: 11, minute: 29}, end_edge: {hour: 11, minute: 29}},
timezone: 'Asia/Riyadh',
expire_after: 'P3D'
})
};
fetch('https://platform-api.sarj.ai/api/v1/schedule-configs', 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://platform-api.sarj.ai/api/v1/schedule-configs",
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([
'max_retries' => 5,
'wait_between' => '<string>',
'enabled' => true,
'retry_window' => [
'start_edge' => [
'hour' => 11,
'minute' => 29
],
'end_edge' => [
'hour' => 11,
'minute' => 29
]
],
'timezone' => 'Asia/Riyadh',
'expire_after' => 'P3D'
]),
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://platform-api.sarj.ai/api/v1/schedule-configs"
payload := strings.NewReader("{\n \"max_retries\": 5,\n \"wait_between\": \"<string>\",\n \"enabled\": true,\n \"retry_window\": {\n \"start_edge\": {\n \"hour\": 11,\n \"minute\": 29\n },\n \"end_edge\": {\n \"hour\": 11,\n \"minute\": 29\n }\n },\n \"timezone\": \"Asia/Riyadh\",\n \"expire_after\": \"P3D\"\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://platform-api.sarj.ai/api/v1/schedule-configs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"max_retries\": 5,\n \"wait_between\": \"<string>\",\n \"enabled\": true,\n \"retry_window\": {\n \"start_edge\": {\n \"hour\": 11,\n \"minute\": 29\n },\n \"end_edge\": {\n \"hour\": 11,\n \"minute\": 29\n }\n },\n \"timezone\": \"Asia/Riyadh\",\n \"expire_after\": \"P3D\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.sarj.ai/api/v1/schedule-configs")
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 \"max_retries\": 5,\n \"wait_between\": \"<string>\",\n \"enabled\": true,\n \"retry_window\": {\n \"start_edge\": {\n \"hour\": 11,\n \"minute\": 29\n },\n \"end_edge\": {\n \"hour\": 11,\n \"minute\": 29\n }\n },\n \"timezone\": \"Asia/Riyadh\",\n \"expire_after\": \"P3D\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"max_retries": 123,
"wait_between": "<string>",
"retry_window": {
"start_edge": {
"hour": 11,
"minute": 29
},
"end_edge": {
"hour": 11,
"minute": 29
}
},
"timezone": "<string>",
"expire_after": "<string>"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"message": "<string>",
"field_violations": [
{
"field": "<string>",
"message": "<string>"
}
],
"type": "validation_error"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"message": "<string>",
"field_violations": [
{
"field": "<string>",
"message": "<string>"
}
],
"type": "validation_error"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"message": "<string>",
"field_violations": [
{
"field": "<string>",
"message": "<string>"
}
],
"type": "validation_error"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"message": "<string>",
"field_violations": [
{
"field": "<string>",
"message": "<string>"
}
],
"type": "validation_error"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Authorizations
API key from your Sarj.ai dashboard. Pass as: Authorization: Bearer
Body
Maximum retry attempts after the first call reaches the customer (1-10).
1 <= x <= 102
Wait between attempts, measured from the end of the previous call. Accepts seconds (7200) or an ISO 8601 duration ('PT2H'). 60 seconds to 30 days.
"PT2H"
Whether calls referencing this config retry. Disabling cancels pending retries at release time.
Daily window retries may dial in, as start/end wall-clock edges in the config timezone. Omitted, retries dial at any hour.
Show child attributes
Show child attributes
IANA timezone the retry_window is evaluated in. Omitted, the scenario's timezone applies.
"Asia/Riyadh"
Stop retrying this long after the first call ended, whichever of attempts/expiry hits first. 1 hour to 7 days (the platform ceiling); omitted, only max_retries and the ceiling bound the group.
"P3D"

