Skip to main content
POST
Typescript (SDK)

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Body

application/json
name
string
description
string | null
prompt
string
trigger_type
enum<string>
Available options:
immediate,
cron,
interval,
once,
event
cron_expression
string | null
interval_seconds
integer | null
scheduled_at
string<date-time> | null
timezone
string
model_id
string | null
agent
enum<string>

Which agent runs the task. Use engineering for pure code/build work on a site; defaults to business.

Available options:
business,
engineering
condition_script
string | null

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.

approval_mode
enum<string>
Available options:
autonomous,
supervised,
read_only
expires_at
string<date-time> | null
active
boolean
delivery_methods
enum<string>[]
Available options:
notification,
email,
telegram,
discord,
slack
event_conditions
object | null
site_id
string

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

id
string
required
object
string
required
name
string
required
description
string | null
required
prompt
string
required
trigger_type
enum<string>
required
Available options:
immediate,
cron,
interval,
once,
event
cron_expression
string | null
required
interval_seconds
integer | null
required
scheduled_at
string<date-time> | null
required
event_conditions
object | null
required
condition_script
string | null
required
timezone
string
required
delivery_methods
enum<string>[]
required
Available options:
notification,
email,
telegram,
discord,
slack
approval_mode
enum<string>
required
Available options:
autonomous,
supervised,
read_only
model_id
string | null
required
agent
enum<string>
required
Available options:
business,
engineering
active
boolean
required
expires_at
string<date-time> | null
required
next_run_at
string<date-time> | null
required
last_run_at
string<date-time> | null
required
total_runs_count
integer
required
consecutive_failure_count
integer
required
total_credits_consumed
integer
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
site_id
string | null
required