Skip to main content
PATCH
/
v1
/
agents
/
{agent_id}
/
scheduled-tasks
/
{task_id}
Update Scheduled Task
curl --request PATCH \
  --url https://api.xpander.ai/v1/agents/{agent_id}/scheduled-tasks/{task_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "cron": "<string>",
  "prompt": "<string>",
  "title": "<string>",
  "enabled": true
}
'
{
  "id": "<string>",
  "cron": "<string>",
  "prompt": "<string>",
  "title": "<string>",
  "enabled": true
}
Update any subset of a scheduled task’s fields. Set enabled: false to pause a task without losing its config; set enabled: true to resume. Changes take effect immediately.

Request Body

cron
string
New cron expression (5-field crontab, UTC).
prompt
string
New instruction.
title
string
New label.
enabled
boolean
Pause (false) or resume (true) without losing config.

Example Request

# Pause a task
curl -X PATCH -H "x-api-key: <your-api-key>" -H "Content-Type: application/json" \
  "https://api.xpander.ai/v1/agents/<agent-id>/scheduled-tasks/<task-id>" \
  -d '{ "enabled": false }'

Example Response

{
  "id": "<task-id>",
  "title": "Daily ticket digest",
  "cron": "0 9 * * *",
  "prompt": "Summarize yesterday's support tickets and post to #ops.",
  "enabled": false
}

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

agent_id
string
required
task_id
string
required

Body

application/json

Update a recurring scheduled task. Only provided fields change.

cron
string | null

New cron expression.

prompt
string | null

New instruction.

title
string | null

New label.

enabled
boolean | null

Pause (false) or resume (true) without losing config.

Response

Successful Response

A recurring scheduled task — the simplified view of one cron task source node.

id
string
required

Source-node id. Pass it to update/remove/run the task.

cron
string
required

Cron expression (5-field crontab, UTC), e.g. '0 9 * * *'.

prompt
string
required

Instruction the agent runs on each fire.

title
string | null

Human-readable label for the task.

enabled
boolean
default:true

Whether the task is active. Disabled tasks keep their config but do not fire.