Create a scheduled job
curl --request POST \
--url https://api.getdialed.ai/flows/scheduled-jobs \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"cron_expression": "0 9 * * 1-5",
"definition_id": "def_a1b2c3d4",
"description": "Nightly Five9 report sync",
"enabled": true,
"input_data": {
"report": "daily_calls"
},
"metadata": {
"owner": "ops"
}
}
'import requests
url = "https://api.getdialed.ai/flows/scheduled-jobs"
payload = {
"cron_expression": "0 9 * * 1-5",
"definition_id": "def_a1b2c3d4",
"description": "Nightly Five9 report sync",
"enabled": True,
"input_data": { "report": "daily_calls" },
"metadata": { "owner": "ops" }
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cron_expression: '0 9 * * 1-5',
definition_id: 'def_a1b2c3d4',
description: 'Nightly Five9 report sync',
enabled: true,
input_data: {report: 'daily_calls'},
metadata: {owner: 'ops'}
})
};
fetch('https://api.getdialed.ai/flows/scheduled-jobs', 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://api.getdialed.ai/flows/scheduled-jobs",
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([
'cron_expression' => '0 9 * * 1-5',
'definition_id' => 'def_a1b2c3d4',
'description' => 'Nightly Five9 report sync',
'enabled' => true,
'input_data' => [
'report' => 'daily_calls'
],
'metadata' => [
'owner' => 'ops'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.getdialed.ai/flows/scheduled-jobs"
payload := strings.NewReader("{\n \"cron_expression\": \"0 9 * * 1-5\",\n \"definition_id\": \"def_a1b2c3d4\",\n \"description\": \"Nightly Five9 report sync\",\n \"enabled\": true,\n \"input_data\": {\n \"report\": \"daily_calls\"\n },\n \"metadata\": {\n \"owner\": \"ops\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.getdialed.ai/flows/scheduled-jobs")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cron_expression\": \"0 9 * * 1-5\",\n \"definition_id\": \"def_a1b2c3d4\",\n \"description\": \"Nightly Five9 report sync\",\n \"enabled\": true,\n \"input_data\": {\n \"report\": \"daily_calls\"\n },\n \"metadata\": {\n \"owner\": \"ops\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getdialed.ai/flows/scheduled-jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cron_expression\": \"0 9 * * 1-5\",\n \"definition_id\": \"def_a1b2c3d4\",\n \"description\": \"Nightly Five9 report sync\",\n \"enabled\": true,\n \"input_data\": {\n \"report\": \"daily_calls\"\n },\n \"metadata\": {\n \"owner\": \"ops\"\n }\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-07-09T09:00:00Z",
"cron_expression": "0 9 * * 1-5",
"definition_id": "def_a1b2c3d4",
"description": "Nightly Five9 report sync",
"enabled": true,
"id": "sched_1a2b3c4d",
"input_data": {
"report": "daily_calls"
},
"metadata": {
"owner": "ops"
},
"next_fire_at": "2026-07-10T09:00:00Z",
"org_id": "org_e5f6g7h8",
"updated_at": "2026-07-09T09:00:00Z"
}{
"detail": "Authentication required"
}{
"detail": "Admin role required"
}{
"detail": "Definition not found"
}{
"detail": "Validation error"
}{
"detail": "Rate limit exceeded"
}{
"detail": "Schedule create failed, record cleaned up"
}scheduled-jobs
Create a scheduled job
Creates a recurring trigger backed by a managed schedule. The cron expression is a 5-field UTC expression (aliases like @hourly are rejected). The record is written first, then the schedule — on a scheduling failure the record is rolled back and 503 is returned.
POST
/
scheduled-jobs
Create a scheduled job
curl --request POST \
--url https://api.getdialed.ai/flows/scheduled-jobs \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"cron_expression": "0 9 * * 1-5",
"definition_id": "def_a1b2c3d4",
"description": "Nightly Five9 report sync",
"enabled": true,
"input_data": {
"report": "daily_calls"
},
"metadata": {
"owner": "ops"
}
}
'import requests
url = "https://api.getdialed.ai/flows/scheduled-jobs"
payload = {
"cron_expression": "0 9 * * 1-5",
"definition_id": "def_a1b2c3d4",
"description": "Nightly Five9 report sync",
"enabled": True,
"input_data": { "report": "daily_calls" },
"metadata": { "owner": "ops" }
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cron_expression: '0 9 * * 1-5',
definition_id: 'def_a1b2c3d4',
description: 'Nightly Five9 report sync',
enabled: true,
input_data: {report: 'daily_calls'},
metadata: {owner: 'ops'}
})
};
fetch('https://api.getdialed.ai/flows/scheduled-jobs', 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://api.getdialed.ai/flows/scheduled-jobs",
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([
'cron_expression' => '0 9 * * 1-5',
'definition_id' => 'def_a1b2c3d4',
'description' => 'Nightly Five9 report sync',
'enabled' => true,
'input_data' => [
'report' => 'daily_calls'
],
'metadata' => [
'owner' => 'ops'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.getdialed.ai/flows/scheduled-jobs"
payload := strings.NewReader("{\n \"cron_expression\": \"0 9 * * 1-5\",\n \"definition_id\": \"def_a1b2c3d4\",\n \"description\": \"Nightly Five9 report sync\",\n \"enabled\": true,\n \"input_data\": {\n \"report\": \"daily_calls\"\n },\n \"metadata\": {\n \"owner\": \"ops\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.getdialed.ai/flows/scheduled-jobs")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cron_expression\": \"0 9 * * 1-5\",\n \"definition_id\": \"def_a1b2c3d4\",\n \"description\": \"Nightly Five9 report sync\",\n \"enabled\": true,\n \"input_data\": {\n \"report\": \"daily_calls\"\n },\n \"metadata\": {\n \"owner\": \"ops\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getdialed.ai/flows/scheduled-jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cron_expression\": \"0 9 * * 1-5\",\n \"definition_id\": \"def_a1b2c3d4\",\n \"description\": \"Nightly Five9 report sync\",\n \"enabled\": true,\n \"input_data\": {\n \"report\": \"daily_calls\"\n },\n \"metadata\": {\n \"owner\": \"ops\"\n }\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-07-09T09:00:00Z",
"cron_expression": "0 9 * * 1-5",
"definition_id": "def_a1b2c3d4",
"description": "Nightly Five9 report sync",
"enabled": true,
"id": "sched_1a2b3c4d",
"input_data": {
"report": "daily_calls"
},
"metadata": {
"owner": "ops"
},
"next_fire_at": "2026-07-10T09:00:00Z",
"org_id": "org_e5f6g7h8",
"updated_at": "2026-07-09T09:00:00Z"
}{
"detail": "Authentication required"
}{
"detail": "Admin role required"
}{
"detail": "Definition not found"
}{
"detail": "Validation error"
}{
"detail": "Rate limit exceeded"
}{
"detail": "Schedule create failed, record cleaned up"
}Authorizations
APIKeyHeaderHTTPBearer
Body
application/json
Response
Successful Response
GET response — next_fire_at is injected by the router via croniter (D-14).
next_fire_at is None only for legacy rows whose stored cron cannot
produce a next fire (CR-02 defense in depth) — the write gate rejects
such expressions for all new/updated records.
Available options:
success, failure, running ⌘I