Skip to main content
POST
Create a trigger

Authorizations

Authorization
string
header
required

Use JWT token for authentication

Body

application/json
toolServerId
string
required

The app-integration tool server whose events this listens to

triggerSlug
string
required

Trigger type slug (from GET /integrations/:app/triggers)

Example:

"GMAIL_NEW_GMAIL_MESSAGE"

agentId
string

Agent to start. Exactly one of agentId / assistantId is required.

assistantId
string

Assistant to start. Exactly one of agentId / assistantId is required.

triggerConfig
object

Values for the trigger type's config JSON Schema

name
string
messageTemplate
string

Template rendering the event into the message. Empty ⇒ raw event JSON.

chatUidTemplate
string

Assistants only: stable chat id template so related events share a conversation

newThreadsState
enum<string>

Agents only: initial thread state

Available options:
queued,
paused
rateLimitPerMinute
number

Per-trigger events/minute ceiling

Response

Trigger created