Webhook Payload
​
This section goes over the different types of webhook messages that you can receive. Currently, Connectly only supports WhatsApp messages.

Payload plain text:

JSON
1
{
2
"timestamp": "1639083206",
3
"sender": {
4
"id": "+16315555500",
5
"channelType": "whatsapp",
6
"name": "Vasi from Connectly"
7
},
8
"recipient": {
9
"id": "+16044441234",
10
"channelType": "whatsapp",
11
"name": "connectlyai"
12
},
13
"message": {
14
"text": "TEST 11"
15
}
16
}
Copied!

Payload media:

JSON
1
{
2
"timestamp": "1639085537",
3
"sender": {
4
"id": "+16315555500",
5
"channelType": "whatsapp",
6
"name": "Vasi from Connectly"
7
},
8
"recipient": {
9
"id": "+16044441234",
10
"channelType": "whatsapp",
11
"name": "connectlyai"
12
},
13
"message": {
14
"attachments": [
15
{
16
"type": "video",
17
"url": "https://cdn.dev.connectly.ai/asd/asdasdasdasd"
18
}
19
]
20
}
21
}
Copied!

Payload button response

JSON
1
{
2
"timestamp": "1639083206",
3
"sender": {
4
"id": "+16315555500",
5
"channelType": "whatsapp",
6
"name": "Vasi from Connectly"
7
},
8
"recipient": {
9
"id": "+16044441234",
10
"channelType": "whatsapp",
11
"name": "connectlyai"
12
},
13
"message": {
14
"text": "TEST 11",
15
"isButtonResponse": true
16
}
17
}
Copied!

Payload delivery status

JSON
1
{
2
"topic": "delivery_status",
3
"timestamp": "1641513098",
4
"sender": {
5
"id": "+16044441234",
6
"channelType": "whatsapp",
7
"name": "connectlyai"
8
},
9
"recipient": {
10
"id": "+16315555500",
11
"channelType": "whatsapp",
12
"name": "Vasi from Connectly"
13
},
14
"statusUpdate": {
15
"id": "01FRRWW2ZAHD9GJ1SWY4VF2GBD",
16
"status": "delivered",
17
"error": null
18
},
19
"metadata": {
20
"campaign_name": "<YOUR_CAMPAIGN_NAME>"
21
}
22
}
Copied!

Payload delivery status error

JSON
1
{
2
"topic": "delivery_status",
3
"timestamp": "1641512856",
4
"sender": {
5
"id": "+16044441234",
6
"channelType": "whatsapp",
7
"name": "connectlyai"
8
},
9
"recipient": {
10
"id": "+16315555500",
11
"channelType": "whatsapp",
12
"name": "Vasi from Connectly"
13
},
14
"statusUpdate": {
15
"id": "01FRRWMSAMKNFZAMBPQ65CA7DD",
16
"status": "delivery_failed",
17
"error": {
18
"message": "Message template inputs invalid",
19
"type": "ERROR_TYPE_INVALID_REQUEST",
20
"code": "ERROR_CODE_MESSAGE_TEMPLATE_INPUT_INVALID",
21
"userTitle": "Message template inputs invalid",
22
"userMessage": "Pass along the connectly trace id 'cnct_trace_id' to the team for more information.",
23
"cntTraceId": "10827968052975079261",
24
"details": {
25
26
}
27
},
28
"metadata": {
29
"campaign_name": "<YOUR_CAMPAIGN_NAME>"
30
}
31
}
32
}
Copied!