Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

A personal API key or an OAuth 2.0 access token. Personal API keys also require the x-auth-key header with your user ID.

Path Parameters

agent_id
string
required

ID of a custom agent.

Body

application/json
type
enum<string>
required
Available options:
schedule,
webhook
prompt
string
required

The message the agent receives when the trigger fires.

name
string | null

Label shown in the triggers list.

cron_expression
string | null

Schedule only. Five-field cron, e.g. 0 9 * * 1-5.

run_at
string<date-time> | null

Schedule only. One-time run; must be in the future. Interpreted in timezone when it has no offset.

timezone
string | null

Schedule only. IANA name. Defaults to the caller's profile timezone.

pass_raw_data
boolean
default:false

Webhook only. Forward the request body to the agent instead of prompt.

enabled
boolean
default:true
max_failures
integer | null

Consecutive failures before the trigger disables itself. Defaults to 3 (1 for one-time runs).

Response

The created trigger. For a webhook, webhook_url is populated here only.

trigger
object