Trigger an automation (sync)
Runs an automation workflow and waits for it to finish. result is whatever the workflow returns.
/automations/{projectId}/triggerRuns an automation workflow and waits for it to finish. result is whatever the workflow
returns.
Requires the automation:trigger scope. Automation projects only; other project types return
400. Send runtimeStage: "app" to run the draft (test) version of a versioned workflow
instead of the published one.
The request is checked against the workflow's trigger configuration the same way as a chatbot flow trigger.
Authorization: Bearer bai_ext_.... Tokens belong to one project and carry scopes:
bot:invoke, flow:trigger, automation:trigger.
In: header
Scope: automation:trigger
Path Parameters
The project ID. The token must belong to this project.
Header Parameters
Up to 128 characters. A repeat of a key already used for the same project, target and mode returns the original run instead of starting a new one. Longer keys are ignored.
length <= 128Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/automations/string/trigger" \ -H "Content-Type: application/json" \ -d '{ "event": "order.paid", "payload": { "orderId": "ORD-10442", "phone": "+233201234567", "amount": 250 } }'{ "invocationId": "clx9kf3a20010ab12cd34ef20", "status": "SUCCEEDED", "result": { "success": true, "receiptSent": true }}API reference
Every endpoint of the Buni.ai v1 public API, generated from the OpenAPI document pinned to the product source.
Trigger an automation (async or scheduled) POST
Queues an automation run and returns 202 immediately. Add runAt or delaySeconds to schedule it for later; add webhookUrl to be called back when it finishes.