Triggers

Create a trigger on a flow the caller may write.

The trigger is owned by the flow owner, not by whoever created it. The execution-principal matrix classifies a trigger run as flow_owner, and flow-save reconciliation already creates rows that way; keying the API path off the caller instead would give one flow two kinds of trigger identity depending on which surface armed it, and would let a collaborator with flow write silently schedule unattended runs under their own connections.

post/api/v1/triggers

Request

  • The document declares no server URL.
  • Auth
    • OAuth 2
      Password
      Token URL: api/v1/login
    • or API key in query parameter x-api-key
    • or API key in header x-api-key

Request body

binding_target'flow' | 'deployment'

What a fired event runs.

flow runs the saved flow (or the pinned flow_version when set) through the background execution service. deployment is stored but not dispatched in 1.13 — see :class:BindingUnsupportedError.

concurrency_limitinteger
configobject
connection_idstring uuid nullable
deployment_idstring uuid nullable
flow_idstring uuid required
flow_version_idstring uuid nullable
kindstring required
max_attemptsinteger
namestring required
node_idstring nullable
providerstring nullable
session_policy'per_event' | 'shared'

How a dispatched run derives its session id when the payload has no conversation.

state'pending' | 'active' | 'paused' | 'expired' | 'needs_reconnect' | 'error' | 'dead'

Lifecycle of a trigger row.

pending is the reconciled-but-not-yet-armed state a canvas save creates; active is the only state the scheduler and dispatcher act on.

Response

Successful Response

binding_targetstring required
concurrency_limitinteger required
configobject required
connection_idstring uuid nullable required
created_atstring date-time nullable required
deployment_idstring uuid nullable required
flow_idstring uuid required
flow_version_idstring uuid nullable required
idstring uuid required
kindstring required
last_errorstring nullable required
last_fired_atstring date-time nullable required
max_attemptsinteger required
namestring required
next_fire_atstring date-time nullable required
node_idstring nullable required
providerstring nullable required
session_policystring required
statestring required
updated_atstring date-time nullable required
user_idstring uuid nullable required

Changes