Skip to main content
POST
Add a trigger to an automation

Authorizations

Authorization
string
header
required

Your Reason API key from Settings › API keys. New keys use reason_; legacy ara_ keys remain accepted. Keys are capability-scoped: run, mcp:read, mcp:write, secrets:read, secrets:write, sessions:read, sessions:debug, knowledge:read, memory:read, memory:write, skills:read, skills:write, repos:read, repos:write, reviews:read, reviews:write, deployment:read, analytics:read, org:read, org:write, attachments:read, attachments:write, guardrails:read, guardrails:write, network:read, network:write, automations:read, automations:write, agent_auth:read. network:read and network:write are opt-in, excluded from default keys. network:read reads the saved workspace network policy; network:write replaces custom allowed hosts and requires a current organization owner/admin. Legacy project PATCH requests containing network_allowed_hosts also require network:write plus their existing run scope and project management permission; saved project hosts do not affect current session egress. Only owners/admins can mint or manage keys with network:write; keys cannot grant themselves more authority. See /docs/network-policies for replacement semantics and runtime applicability. mcp:write manages MCP server configuration only; it does not authorize remote MCP-tool execution. sessions:read reads sessions, including the assistant, reasoning and tool activity in their events. sessions:debug is privileged: only for organization owners/admins, it expands session events to the full diagnostic projection (diagnostic event kinds, status text and raw event metadata).

Path Parameters

orgId
string
required

Organization id or slug. Resolve it with GET /v3/self.

automationId
string
required

The automation id, returned as id by listAutomations and createAutomation.

Body

application/json

Adds a schedule trigger to the automation. Provide exactly one of frequency, every_seconds, or scheduled_at; more than one returns 400 schedule_conflict, none returns 400 schedule_required.

frequency
string

Cron expression, e.g. 0 3 * * *, for a recurring trigger.

every_seconds
integer

Seconds between runs, for a recurring trigger on a fixed interval instead of a calendar. The scheduler runs a trigger at most once a minute, so a shorter interval is saved as 60 seconds and the response carries a schedule_interval_raised warning.

scheduled_at
string<date-time>

The moment a one-time trigger fires; it runs once and does not repeat. Send it instead of frequency or every_seconds.

enabled
boolean
default:true

Whether this trigger can fire. Send false to save it paused; the parent automation must also be enabled for it to run.

Response

Created.

A condition that fires the automation. The webhook secret is never returned.

id
string

Trigger id; pass it as triggerId to delete the trigger.

kind
enum<string>

What fires the trigger: a schedule, a GitHub event, an incoming webhook, or Slack channels (a routine on a Reason).

Available options:
schedule,
github_event,
webhook,
slack
enabled
boolean

Whether this trigger can fire; the automation must be enabled too.

schedule
object | null

The schedule, for a schedule trigger; null for other kinds.

github
object | null

The GitHub event filter, for a github_event trigger; null for other kinds.

webhook
object | null

Webhook state, for a webhook trigger; null for other kinds.

run_kind
string | null

Kind of run this trigger starts when it overrides the default; null for an ordinary automation run.

warnings
object[]

Present only when the request was accepted but something is not as sent or not usable yet. Codes: schedule_interval_raised, app_tool_not_connected.

last_fired_at
string<date-time> | null

When the trigger last started a run; null if it never has.

created_at
string<date-time>

When the trigger was added.

updated_at
string<date-time>

When the trigger last changed.