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

NameTypeDescription
scheduled_agent_idrequiredstringTask ID.

Body

FieldTypeDescription
namestring
promptstring
schedulestringFive-field cron expression in the supplied or current timezone.
timezonestringIANA timezone for the schedule.
enabledboolean
notification_recipient_modeobject
notification_recipient_user_idsarray of stringWorkspace 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.

FieldTypeDescription
idrequiredstringStable Task ID.
namerequiredstring
promptrequiredstringPrompt that the Task runs on its schedule.
template_idstringTemplate used to create the Task, when applicable.
cron_expressionrequiredstringFive-field cron expression in the Task timezone.
timezonerequiredstringIANA timezone for the cron expression.
schedule_descriptionrequiredstringHuman-readable schedule.
enabledrequiredboolean
creation_originrequiredstringSurface that created the Task.
notification_recipient_moderequiredobject
notification_recipient_user_idsrequiredarray of string
next_run_atrequiredstring<date-time>
created_atrequiredstring<date-time>
updated_atrequiredstring<date-time>

400 Invalid Task input.

FieldTypeDescription
errorrequiredstring

401 Unauthorized.

FieldTypeDescription
errorrequiredstring

403 Forbidden or feature unavailable.

FieldTypeDescription
errorrequiredstring

404 Task not found.

FieldTypeDescription
errorrequiredstring

500 Internal server error.

FieldTypeDescription
errorrequiredstring