Kindly
Search…
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.

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:
1
{
2
"_meta": {
3
"event": "ticket.updated"
4
},
5
"ticket": {
6
"id": "xxx",
7
"status": "SOLVED",
8
"assigned_agent": {
9
"full_name": "Carl",
10
"email": "[email protected]"
11
}
12
},
13
"bot": {
14
"name": "BOT NAME",
15
"id": 1
16
},
17
"chat": {
18
"id": "xxx",
19
"language_code": "nb",
20
"taken_over": false,
21
"completed_takeover": false,
22
"created": "2019-12-13T15:04:29.134000Z",
23
"updated": "2019-12-13T15:04:33.978000Z",
24
"messages": [
25
{
26
"message": "Hi there, I'm a bot, what can I help you with?",
27
"sender": "BOT",
28
"created": "2020-04-16T11:44:03.438000Z",
29
"exchange_id": "0df7f4f3-ac51-431e-ac0e-2887da7d3ef1",
30
"name": null
31
},
32
{
33
"message": "Hi, can I talk with a human?",
34
"sender": "USER",
35
"created": "2020-04-16T11:44:12.398000Z",
36
"exchange_id": null,
37
"name": "You"
38
},
39
{
40
"message": "An agent has joined the conversation.",
41
"sender": "SYSTEM",
42
"created": "2020-04-16T11:44:51.193000Z",
43
"exchange_id": "008df60e-89af-4cc5-a18a-05377e5cb652",
44
"name": null
45
},
46
{
47
"message": "Hi there, I'm Carl, what can I help you with?",
48
"sender": "AGENT",
49
"created": "2020-04-16T11:44:57.221000Z",
50
"exchange_id": null,
51
"name": "Carl"
52
}
53
],
54
"feedback": [],
55
"context": {},
56
"web_host": "example.com",
57
"web_path": "/product/12345/green-sweater",
58
"labels": [
59
{
60
"id": "",
61
"name": ""
62
}
63
],
64
"jwt": {}
65
}
66
}
Copied!
You can read more about the JWT token format in the Chat API section.