tasks/create

POST/scheduled-agents

Create a Task. Requires editor access and the configuration:write permission.

Request

cURL
curl -X POST "https://provisioning.cloudx.io/api/v1/scheduled-agents" \
  -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,"access_mode":"private"}'

Body

FieldTypeDescription
namestringOptional name. CloudX derives one from the prompt when omitted.
promptrequiredstring
schedulerequiredstringFive-field cron expression in the supplied timezone.
timezonestringIANA timezone for the schedule.
enabledboolean
access_modeobject

Responses

Created Task.
{
  "id": "<string>",
  "domain": "buying",
  "name": "<string>",
  "prompt": "<string>",
  "template_id": "<string>",
  "cron_expression": "<string>",
  "timezone": "<string>",
  "schedule_description": "<string>",
  "enabled": true,
  "creation_origin": "web_app",
  "access_mode": "private",
  "creator_user_id": "<string>",
  "next_run_at": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>"
}

200Created Task.

FieldTypeDescription
idrequiredstringStable Task ID.
domainrequiredstringSide of the platform the Task works for.
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.
access_moderequiredobject
creator_user_idstringUser who created the Task. Omitted for API and internal Tasks.
next_run_atrequiredstring<date-time>
created_atrequiredstring<date-time>
updated_atrequiredstring<date-time>

400Invalid Task input.

FieldTypeDescription
errorrequiredstring

401Unauthorized.

FieldTypeDescription
errorrequiredstring

403Forbidden or feature unavailable.

FieldTypeDescription
errorrequiredstring

409Task limit reached.

FieldTypeDescription
errorrequiredstring

500Internal server error.

FieldTypeDescription
errorrequiredstring