Trigger an automation (async or scheduled)
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.
/automations/{projectId}/trigger-asyncQueues 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.
Requires the automation:trigger scope. Automation projects only.
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.
Send at most one of runAt and delaySeconds.
Response Body
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-async" \ -H "Content-Type: application/json" \ -d '{ "event": "cart.abandoned", "payload": { "customerId": "cus_123", "phone": "+233201234567" }, "delaySeconds": 900, "webhookUrl": "https://api.example.com/buni/callbacks", "webhookSecret": "whsec_example_only" }'{ "invocationId": "clx9km1a40030ab12cd34ef40", "status": "QUEUED", "scheduledFor": null}