Webhooks

This article covers webhooks, their expected body request and possible responses.

Why use Webhooks

Ultimate Ticket API leverages webhooks to enhance performance and make conversations more responsive.

Our Ticket API responds with an empty 200 response to indicate that the request has been acknowledged and will be handled. The actual bot response will be sent as a separate webhook request.

Ticket API Webhook event

The Ticket API webhook receives only one type of event that is used to send the message to the visitor.

The structure of the webhook event is the following:

FieldTypeDescription
botIdstringThe ID of the bot that is sending the event.
conversationIdstringULTIMATE internal ID
platformConversationIdstringThe ID of the conversation
textstringThe text of the message.
predictedIntentsPredictedIntent[]Predicted intents for visitor message. Each object of type PredictedIntent in the array needs to contain the following fields:
value string - the intent id
name string - name of the intent
confidence number - confidence in the intent
attachmentsPath[]Ticket attachment files paths. Each object of type Path in the array needs to contain the following field:
path string - the path of the file

In JSON format:

{
"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"
}
]
}

The response structure:

A successful message event will return a 200 response to the webhook request and no response body.

A failed message will return a 4XX - 5XX range response to the webhook request.

Action Webhook

For action webhook, refer to LINK-ARTICLE-HERE MOVE TO A DIFFERENT ARTICLE