tasks/update
PATCH
/scheduled-agents/{scheduled_agent_id}Update a Task. Requires the scheduled-agents feature, editor access, and the configuration:write permission.
Request
cURL
curl -X PATCH "https://provisioning.cloudx.io/api/v1/scheduled-agents/{scheduled_agent_id}" \
-H "Authorization: Bearer $CLOUDX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"<string>","prompt":"<string>","schedule":"0 9 * * 1","timezone":"Europe/Madrid","enabled":true,"notification_recipient_mode":"just_me","notification_recipient_user_ids":["<string>"]}'Path parameters
| Name | Type | Description |
|---|---|---|
scheduled_agent_idrequired | string | Task ID. |
Body
| Field | Type | Description |
|---|---|---|
name | string | |
prompt | string | |
schedule | string | Five-field cron expression in the supplied or current timezone. |
timezone | string | IANA timezone for the schedule. |
enabled | boolean | |
notification_recipient_mode | object | |
notification_recipient_user_ids | array of string | Workspace user IDs. Required when notification_recipient_mode is selected. |
Responses
Updated Task.
{
"id": "<string>",
"name": "<string>",
"prompt": "<string>",
"template_id": "<string>",
"cron_expression": "<string>",
"timezone": "<string>",
"schedule_description": "<string>",
"enabled": true,
"creation_origin": "web_app",
"notification_recipient_mode": "just_me",
"notification_recipient_user_ids": [
"<string>"
],
"next_run_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}200 Updated Task.
| Field | Type | Description |
|---|---|---|
idrequired | string | Stable Task ID. |
namerequired | string | |
promptrequired | string | Prompt that the Task runs on its schedule. |
template_id | string | Template used to create the Task, when applicable. |
cron_expressionrequired | string | Five-field cron expression in the Task timezone. |
timezonerequired | string | IANA timezone for the cron expression. |
schedule_descriptionrequired | string | Human-readable schedule. |
enabledrequired | boolean | |
creation_originrequired | string | Surface that created the Task. |
notification_recipient_moderequired | object | |
notification_recipient_user_idsrequired | array of string | |
next_run_atrequired | string<date-time> | |
created_atrequired | string<date-time> | |
updated_atrequired | string<date-time> |
400 Invalid Task input.
| Field | Type | Description |
|---|---|---|
errorrequired | string |
401 Unauthorized.
| Field | Type | Description |
|---|---|---|
errorrequired | string |
403 Forbidden or feature unavailable.
| Field | Type | Description |
|---|---|---|
errorrequired | string |
404 Task not found.
| Field | Type | Description |
|---|---|---|
errorrequired | string |
500 Internal server error.
| Field | Type | Description |
|---|---|---|
errorrequired | string |