Ticket webhooks (BETA)

You can set up webhooks that are triggered on Kindly ticket events. This is useful for e.g. logging customer stories into a third party tool, building custom analytics, sending notifications.

N.B. For this to work you need to enable ticketing for your bot (Go to General Settings and look for the "Beta settings" section).

Add webhook

Go to your bot's webhook settings (/bot/BOT_ID/settings/developer/webhooks) and follow the form setup instructions.

Note that the setup handshake is done with GET calls. After the webhook is set up successfully all requests to your webhook will be POST.

Ticket event payload

A ticket payload will look something like this:

{
"_meta": {
"event": "ticket.updated"
},
"ticket": {
"id": "xxx",
"status": "SOLVED",
"assigned_agent": {
"full_name": "Carl",
"email": "[email protected]"
}
},
"bot": {
"name": "BOT NAME",
"id": 1
},
"chat": {
"id": "xxx",
"language_code": "nb",
"taken_over": false,
"completed_takeover": false,
"created": "2019-12-13T15:04:29.134000Z",
"updated": "2019-12-13T15:04:33.978000Z",
"messages": [
{
"message": "Hi there, I'm a bot, what can I help you with?",
"sender": "BOT",
"created": "2020-04-16T11:44:03.438000Z",
"exchange_id": "0df7f4f3-ac51-431e-ac0e-2887da7d3ef1",
"name": null
},
{
"message": "Hi, can I talk with a human?",
"sender": "USER",
"created": "2020-04-16T11:44:12.398000Z",
"exchange_id": null,
"name": "You"
},
{
"message": "An agent has joined the conversation.",
"sender": "SYSTEM",
"created": "2020-04-16T11:44:51.193000Z",
"exchange_id": "008df60e-89af-4cc5-a18a-05377e5cb652",
"name": null
},
{
"message": "Hi there, I'm Carl, what can I help you with?",
"sender": "AGENT",
"created": "2020-04-16T11:44:57.221000Z",
"exchange_id": null,
"name": "Carl"
}
],
"feedback": [],
"context": {},
"web_host": "example.com",
"web_path": "/product/12345/green-sweater",
"labels": [
{
"id": "",
"name": ""
}
],
"jwt": {}
}
}

You can read more about the JWT token format in the Chat API section.