Skip to main content
POST
Create an agentic-AI event trigger

Authorizations

hookie_session
string
cookie
required

The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.

Headers

Idempotency-Key
string

Makes a POST safe to retry for 24 hours: the same key, credential, path and body returns the stored response (Idempotent-Replayed: true) instead of running again. 422 if the key was used for a different request; 409 while the first is in flight.

Required string length: 1 - 255

Path Parameters

project_id
string
required

Body

application/json
name
string
required
match
object
required

Validated on save (#165): dataset must be a dataset name, and conditions use the one condition dialect; stored normalised to {path, op, value}. An empty or absent conditions array matches every event in the dataset. A trigger saved before #165 keeps its {path, equals} conditions, which compare as text.

config
object
required

Validated on save (#196, FLOW-12) and stored normalised as {instructions, model?, output_dataset, max_tokens?}. It used to be stored as given and normalised silently at run time.

action_type
enum<string>
default:ai_agent

The one action there is; anything else is refused.

Available options:
ai_agent

Response

Created. Always enabled.

id
string
required
trigger
object

The created trigger, as GET by id returns it (#201).