APIs
Start conversations API
Start an agent conversation at a trigger gambit with the POST /api/triggers endpoint.
POST
This reference covers the trigger endpoint. The trigger gambit’s editor generates a ready request under Sample Request & Testing, with the real URL for your region and a typed sample body. Copy it from there instead of assembling the URL by hand.
The same panel holds a Test Trigger form. Paste an API key and a
The call starts a new conversation at the trigger gambit and runs the flow from there. Any conversation the same end user already has open on that deployment and channel is marked abandoned first. The trigger gambit must have a channel account selected, and the flow must be published.
channelUserId value, then click Send Test. This fires a real trigger call and reports the result beside the button.
Request
string
required
The agent’s public ID. The same value the embed snippet uses as
data-convid.string
required
The numeric ID of the trigger gambit inside the published flow.
string
required
Bearer YOUR_API_KEY, a key with the Triggers permission.string
required
The end user’s identifier on the trigger’s channel. For WhatsApp, the phone number in international format.
object
Payload fields that become trigger variables in the flow.
Trigger variables
Every field insidedata becomes a trigger variable, available throughout the flow as {{trigger.field}}. The trigger gambit declares typed fields in the builder, and the generated sample body mirrors that schema. For example, data.order_id above is read in any gambit as {{trigger.order_id}}.
Behavior
Response
boolean
true on a successful trigger.string
The ID of the conversation the trigger started.
number
Reserved. Always
0.string
started when the flow began at the trigger gambit.Errors
Error responses return{ "success": false, "error": "…" } with one of these statuses.
Related pages
Authorizations
API key sent as Authorization: Bearer YOUR_API_KEY. Campaign endpoints use campaign-scoped keys; the rest use organization or agent keys with the matching permission.
Path Parameters
The agent's public ID
The numeric ID of the trigger gambit
Pattern:
^\d+$Body
application/json
Response
Conversation started
True when the trigger was accepted.
The conversation the trigger started or advanced. Use it to correlate later activity.
How many messages the flow queued for delivery in response.
Always started on a successful call.
Allowed value:
"started"