Create task
Creates a new AI task. Use trigger_type to schedule it: immediate runs once right away, cron runs on a cron expression, interval runs every N seconds, once runs at a specific scheduled_at, event runs in response to account events. For recurring tasks (cron/interval), add an optional condition_script — a cheap JavaScript gate that runs before each fire (no LLM, no credits) and skips the run unless its last expression is truthy, so the agent only wakes when there’s work to do.
Authorizations
API key in the format: Bearer {api_token}
Body
immediate, cron, interval, once, event Which agent runs the task. Use engineering for pure code/build work on a site; defaults to business.
business, engineering Cheap pre-run gate for recurring tasks (cron/interval). Plain JavaScript run in a sandboxed isolate against the same crevioApi.* connector as the execute tool, BEFORE each scheduled run — no LLM, no credits. The task only runs when the script's last expression (or explicit return) is truthy; it skips on false/null. Default to setting this whenever the task is "act only when X" (new/unfulfilled/failed records, a threshold crossed, an unread inbox, a metric at zero) — without it the agent wakes and spends credits on every tick even when there's nothing to do. Only omit it for tasks that genuinely should run every tick (e.g. a scheduled report the user always wants). End with a boolean, e.g. const r = await crevioApi.listOrders({ status: 'succeeded' }); r.data.some(o => o.fulfillment_status !== 'fulfilled'). Errors fail open (the task runs). Ignored for non-recurring triggers.
autonomous, supervised, read_only notification, email, telegram, discord, slack Site this task works on (site_...); its repo is mounted as the run's workspace. Defaults to the account's default working site.
Response
Task created
immediate, cron, interval, once, event notification, email, telegram, discord, slack autonomous, supervised, read_only business, engineering 
