curl --request PATCH \
--url https://api.example.com/agents/{agent_id}/schedules/{schedule_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"cron_expression": "<string>",
"interval_seconds": 2,
"timezone": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"paused": true,
"task_params": {},
"task_metadata": {},
"initial_input": {
"content": "<string>",
"type": "text",
"author": "user"
}
}
'import requests
url = "https://api.example.com/agents/{agent_id}/schedules/{schedule_id}"
payload = {
"name": "<string>",
"description": "<string>",
"cron_expression": "<string>",
"interval_seconds": 2,
"timezone": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"paused": True,
"task_params": {},
"task_metadata": {},
"initial_input": {
"content": "<string>",
"type": "text",
"author": "user"
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
cron_expression: '<string>',
interval_seconds: 2,
timezone: '<string>',
start_at: '2023-11-07T05:31:56Z',
end_at: '2023-11-07T05:31:56Z',
paused: true,
task_params: {},
task_metadata: {},
initial_input: {content: '<string>', type: 'text', author: 'user'}
})
};
fetch('https://api.example.com/agents/{agent_id}/schedules/{schedule_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://api.example.com/agents/{agent_id}/schedules/{schedule_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>',
'description' => '<string>',
'cron_expression' => '<string>',
'interval_seconds' => 2,
'timezone' => '<string>',
'start_at' => '2023-11-07T05:31:56Z',
'end_at' => '2023-11-07T05:31:56Z',
'paused' => true,
'task_params' => [
],
'task_metadata' => [
],
'initial_input' => [
'content' => '<string>',
'type' => 'text',
'author' => 'user'
]
]),
CURLOPT_HTTPHEADER => [
"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://api.example.com/agents/{agent_id}/schedules/{schedule_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cron_expression\": \"<string>\",\n \"interval_seconds\": 2,\n \"timezone\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"paused\": true,\n \"task_params\": {},\n \"task_metadata\": {},\n \"initial_input\": {\n \"content\": \"<string>\",\n \"type\": \"text\",\n \"author\": \"user\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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://api.example.com/agents/{agent_id}/schedules/{schedule_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cron_expression\": \"<string>\",\n \"interval_seconds\": 2,\n \"timezone\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"paused\": true,\n \"task_params\": {},\n \"task_metadata\": {},\n \"initial_input\": {\n \"content\": \"<string>\",\n \"type\": \"text\",\n \"author\": \"user\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agents/{agent_id}/schedules/{schedule_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cron_expression\": \"<string>\",\n \"interval_seconds\": 2,\n \"timezone\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"paused\": true,\n \"task_params\": {},\n \"task_metadata\": {},\n \"initial_input\": {\n \"content\": \"<string>\",\n \"type\": \"text\",\n \"author\": \"user\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agent_id": "<string>",
"name": "<string>",
"initial_input": {
"content": "<string>",
"type": "text",
"author": "user"
},
"initial_input_method": "<string>",
"description": "<string>",
"cron_expression": "<string>",
"interval_seconds": 123,
"timezone": "UTC",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"paused": false,
"task_params": {},
"task_metadata": {},
"creator_principal": {
"principal_type": "<string>",
"user_id": "<string>",
"service_account_id": "<string>",
"account_id": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"state": "ACTIVE",
"next_action_times": [
"2023-11-07T05:31:56Z"
],
"live_data_available": true,
"skipped_action_times": [
"2023-11-07T05:31:56Z"
],
"last_action_time": "2023-11-07T05:31:56Z",
"num_actions_taken": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update Run Schedule
Partially update a run schedule’s definition (cadence, window, input, etc.).
curl --request PATCH \
--url https://api.example.com/agents/{agent_id}/schedules/{schedule_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"cron_expression": "<string>",
"interval_seconds": 2,
"timezone": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"paused": true,
"task_params": {},
"task_metadata": {},
"initial_input": {
"content": "<string>",
"type": "text",
"author": "user"
}
}
'import requests
url = "https://api.example.com/agents/{agent_id}/schedules/{schedule_id}"
payload = {
"name": "<string>",
"description": "<string>",
"cron_expression": "<string>",
"interval_seconds": 2,
"timezone": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"paused": True,
"task_params": {},
"task_metadata": {},
"initial_input": {
"content": "<string>",
"type": "text",
"author": "user"
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
cron_expression: '<string>',
interval_seconds: 2,
timezone: '<string>',
start_at: '2023-11-07T05:31:56Z',
end_at: '2023-11-07T05:31:56Z',
paused: true,
task_params: {},
task_metadata: {},
initial_input: {content: '<string>', type: 'text', author: 'user'}
})
};
fetch('https://api.example.com/agents/{agent_id}/schedules/{schedule_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://api.example.com/agents/{agent_id}/schedules/{schedule_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>',
'description' => '<string>',
'cron_expression' => '<string>',
'interval_seconds' => 2,
'timezone' => '<string>',
'start_at' => '2023-11-07T05:31:56Z',
'end_at' => '2023-11-07T05:31:56Z',
'paused' => true,
'task_params' => [
],
'task_metadata' => [
],
'initial_input' => [
'content' => '<string>',
'type' => 'text',
'author' => 'user'
]
]),
CURLOPT_HTTPHEADER => [
"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://api.example.com/agents/{agent_id}/schedules/{schedule_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cron_expression\": \"<string>\",\n \"interval_seconds\": 2,\n \"timezone\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"paused\": true,\n \"task_params\": {},\n \"task_metadata\": {},\n \"initial_input\": {\n \"content\": \"<string>\",\n \"type\": \"text\",\n \"author\": \"user\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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://api.example.com/agents/{agent_id}/schedules/{schedule_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cron_expression\": \"<string>\",\n \"interval_seconds\": 2,\n \"timezone\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"paused\": true,\n \"task_params\": {},\n \"task_metadata\": {},\n \"initial_input\": {\n \"content\": \"<string>\",\n \"type\": \"text\",\n \"author\": \"user\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agents/{agent_id}/schedules/{schedule_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cron_expression\": \"<string>\",\n \"interval_seconds\": 2,\n \"timezone\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"paused\": true,\n \"task_params\": {},\n \"task_metadata\": {},\n \"initial_input\": {\n \"content\": \"<string>\",\n \"type\": \"text\",\n \"author\": \"user\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agent_id": "<string>",
"name": "<string>",
"initial_input": {
"content": "<string>",
"type": "text",
"author": "user"
},
"initial_input_method": "<string>",
"description": "<string>",
"cron_expression": "<string>",
"interval_seconds": 123,
"timezone": "UTC",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"paused": false,
"task_params": {},
"task_metadata": {},
"creator_principal": {
"principal_type": "<string>",
"user_id": "<string>",
"service_account_id": "<string>",
"account_id": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"state": "ACTIVE",
"next_action_times": [
"2023-11-07T05:31:56Z"
],
"live_data_available": true,
"skipped_action_times": [
"2023-11-07T05:31:56Z"
],
"last_action_time": "2023-11-07T05:31:56Z",
"num_actions_taken": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
Partial update for a scheduled agent run.
Only fields present in the request body are changed. Setting
cron_expression clears interval_seconds and vice versa; providing both
is rejected.
Human-readable name, unique among active schedules for the agent.
1 - 64^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$Optional description of what this schedule does.
New cron cadence. Mutually exclusive with interval_seconds.
New interval cadence in seconds. Mutually exclusive with cron_expression.
x >= 1IANA timezone the cron expression is evaluated in.
When the schedule should start being active.
When the schedule should stop being active.
Pause/resume the schedule as part of the update.
Resolved config forwarded as task params at fire time.
Metadata copied onto each created task at fire time.
Replacement initial input delivered to each created task.
Show child attributes
Show child attributes
Response
Successful Response
Response model describing a scheduled agent run.
The unique identifier of the run schedule.
The agent this schedule belongs to.
Human-readable schedule name.
The initial input.
Show child attributes
Show child attributes
Delivery method, inferred from the agent's ACP type.
Optional description.
Cron cadence, if cron-based.
Interval cadence in seconds, if interval-based.
Timezone the cron expression is evaluated in.
Schedule activation time.
Schedule deactivation time.
Whether the schedule is paused.
Task params at fire time.
Task metadata at fire time.
Credential-free creator identity.
Show child attributes
Show child attributes
When the schedule was created.
When the schedule was updated.
Live schedule state from Temporal.
ACTIVE, PAUSED Upcoming scheduled fire times.
Whether requested live Temporal fields were retrieved successfully. Null when live enrichment was not requested.
Skipped one-off scheduled fire times.
When the schedule last fired.
Number of times the schedule has fired.

