Send a message to a chatbot (async)
Queues a message for a chatbot and returns immediately with 202 and an invocationId.
/bots/{projectId}/invokeQueues a message for a chatbot and returns immediately with 202 and an invocationId.
Poll GET /external-invocations/{invocationId} or pass webhookUrl to receive the result.
Requires the bot:invoke scope. Chatbot projects only.
This endpoint does not accept runAt or delaySeconds; to schedule a run, trigger the
flow with POST /flows/{projectId}/trigger-async instead.
Authorization: Bearer bai_ext_.... Tokens belong to one project and carry scopes:
bot:invoke, flow:trigger, automation:trigger.
In: header
Scope: bot:invoke
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
curl -X POST "https://example.com/bots/string/invoke" \ -H "Content-Type: application/json" \ -d '{ "message": "I want to change my delivery address", "sessionId": "customer-4821", "userName": "Ama Mensah", "webhookUrl": "https://api.example.com/buni/callbacks", "webhookSecret": "whsec_example_only" }'{ "invocationId": "clx9k7r2q0004ab12cd34ef99", "status": "QUEUED"}