Webhooks let your application receive real-time messages and updates from the AI agents Ticket API. When the Ticket API processes a ticket event, it sends an HTTP request (webhook) to your specified endpoint. Your webhook should acknowledge the event with a 200 OK response.

When you send a request to the Ticket API, it responds with an empty 200 OK to acknowledge receipt. The actual bot response is sent to your webhook URL in a separate request, allowing your app to respond to ticket events in real time.

Webhook event type

The Ticket API webhook delivers a single event type that sends a message from the bot to the visitor interface.

JSON format

Webhook events from the Ticket API are represented as JSON objects with the following properties:

NameTypeDescription
botIdstringThe id of the bot sending the event
conversationIdstringInternal conversation id
platformConversationIdstringExternal id of the conversation
textstringThe text of the message
predictedIntentsarray of objectsArray of predicted intent objects. Each object must contain:
- value: string (intent id)
- name: string (intent name)
- confidence: number (confidence score, 0–1)
attachmentsarray of objectsArray of attachment objects. Each object must contain:
- path: string (file path)

Example webhook payload

{  "botId": "618a30beee4e8e87d2f94015",  "conversationId": "conversation1",  "platformConversationId": "session1",  "text": "Hello, this is a bot text message",  "predictedIntents": [    {      "value": "1234",      "name": "intent name",      "confidence": 1    }  ],  "attachments": [    {      "path": "path/to/attachment"    }  ]}

Response handling

A successful message event returns an HTTP 200 OK status with no response body. A failed messages returns a 4XX or 5XX status code.