Skip to main content
POST
Add a new event trigger

Authorizations

Authorization
string
header
required

Runtime context-key (rctx_*) issued by the Ravi gateway. Used by ordinary gateway operations; not accepted by Console-only operations. Bootstrap the first key with ravi daemon init-admin-key; rotate, derive, and revoke via the ravi context family. Specs: runtime/context-keys, sdk/auth.

Body

application/json
name
string
required

Trigger name

account
string

Account for channel delivery (auto-detected from agent)

agent
string

Agent ID (default: default agent)

cooldown
string

Minimum gap between fires; events inside it are dropped (e.g., 30s, 1m; off to disable). Default: 5s

debounce
string

Batch a burst of events into one fire, this long after the last event, carrying every event (e.g., 2s, 1m). Default: off

envFile
string

Env file loaded for shell triggers

exec
string

Alias for --shell

filter
string

Filter expression (e.g. 'data.cwd == "/path/to/workspace"')

message
string

Prompt message (defaults to catalog template when available)

onError
string

Error action, e.g. notify-session:

replySession
string

Override the session used for outbound delivery (defaults to caller session)

session
string

Session to run in, by name; may be a template resolved per event (e.g. issue-{{data.payload.row.values.topic_id.0}}) for one session per value; an event whose name does not resolve is skipped, never sent to another session. Created when missing. Default: the current session, or the agent main session outside one. The reserved values main and isolated keep their old meaning (the agent main session; one session per trigger)

shell
string

Run a shell command directly without invoking an agent

timeout
string

Shell timeout, e.g. 60 or 5m

topic
string

Notif topic pattern to subscribe to

Response

Success — body conforms to the @Returns schema.

changedCount
number
required
status
string
required
target
object
required
trigger
object | null
required
{key}
any