Text message

{
"end_user_token": "df6a0edc-b31d-461x-ydcx-f7d5f02cd3d0",
"message": {
"quick_replies": [],
"text": "A text message"
},
"request_id": "33cf5e95-d39e-428a-96a8-fa5de30ebc1c",
"sender_type": "bot"
}
Text message with image

The above example results from 2 calls to the webhook, one with the text message, and one with the image:
{
"end_user_token": "df6a0edc-b31d-461x-ydcx-f7d5f02cd3d0",
"message": {
"attachment": null,
"quick_replies": [],
"text": "Enjoy the Eiffel tower:"
},
"request_id": "33cf5e95-d39e-428a-96a8-fa5de30ebc1c",
"sender_type": "bot"
}
{
"end_user_token": "df6a0edc-b31d-461x-ydcx-f7d5f02cd3d0",
"message": {
"attachment": {
"type": "image",
"payload": {
"url": "http://url_or_the_image",
"alt_text": "http://url_or_the_image",
}
},
"text": "",
"quick_replies": []
},
"request_id": "33cf5e95-d39e-428a-96a8-fa5de30ebc1c",
"sender_type": "bot"
}
Video message
{
"end_user_token": "df6a0edc-b31d-461x-ydcx-f7d5f02cd3d0",
"message": {
"attachment": {
"type": "video",
"payload": {
"url": "http://url_or_the_video"
}
},
"text": "",
"quick_replies": []
},
"request_id": "33cf5e95-d39e-428a-96a8-fa5de30ebc1c",
"sender_type": "bot"
}
Text message with quick replies

{
"end_user_token": "df6a0edc-b31d-461x-ydcx-f7d5f02cd3d0",
"message": {
"quick_replies": [
{
"payload": "{\"title\": \"Thank you 😉\", \"target_intent_id\": 22450}",
"title": "Thank you 😉"
},
{
"payload": "{\"title\": \"🚩 Change city\", \"target_intent_id\": 22451}",
"title": "🚩 Change city"
}
],
"text": "It is sunny in Paris"
},
"request_id": "33cf5e95-d39e-428a-96a8-fa5de30ebc1c"
}
Text message with generic template (with one element)

The above example results from 2 calls to the webhook, one with the text message, and one with the generic template:
{
"end_user_token": "df6a0edc-b31d-461x-ydcx-f7d5f02cd3d0",
"message": {
"attachment": null,
"quick_replies": [],
"text": "It is sunny in Paris"
},
"request_id": "33cf5e95-d39e-428a-96a8-fa5de30ebc1c",
"sender_type": "bot"
}
{
"end_user_token": "df6a0edc-b31d-461x-ydcx-f7d5f02cd3d0",
"message": {
"attachment": {
"type": "template",
"payload": {
"template_type": "generic",
"elements": [
{
"title": "Paris",
"subtitle": "Eiffel tower",
"image_url": "http://url_or_the_image",
"buttons": [
{
"title": "Book a hotel",
"type": "web_url",
"payload": "http://link_to_redirect_to"
},
{
"title": "Thank you 😉",
"type": "postback",
"payload": "{\"title\": \"Thank you 😉\", \"target_intent_id\": 22451}"
}
]
}
]
}
},
"text": ""
},
"request_id": "33cf5e95-d39e-428a-96a8-fa5de30ebc1c"
}
Text message with generic template (with multiple elements)

The above example results from 2 calls to the webhook, one with the text message, and one with the generic template:
{
"end_user_token": "df6a0edc-b31d-461x-ydcx-f7d5f02cd3d0",
"message": {
"attachment": null,
"quick_replies": [],
"text": "Check out the weather in those European cities:"
},
"request_id": "33cf5e95-d39e-428a-96a8-fa5de30ebc1c",
"sender_type": "bot"
}
{
"end_user_token": "df6a0edc-b31d-461x-ydcx-f7d5f02cd3d0",
"message": {
"attachment": {
"type": "template",
"payload": {
"template_type": "generic",
"elements": [
{
"title": "London",
"subtitle": "Big Ben",
"image_url": "http://url_or_the_image"
},
{
"title": "Paris",
"subtitle": "Eiffel tower",
"image_url": "http://url_or_the_image",
"buttons": [
{
"title": "Book a hotel",
"type": "web_url",
"payload": "http://link_to_redirect_to"
},
{
"title": "Thank you 😉",
"type": "postback",
"payload": "{\"title\": \"Thank you 😉\", \"target_intent_id\": 22451}"
}
]
},
{
"title": "Madrid",
"subtitle": "Plaza Mayor",
"image_url": "http://url_or_the_image"
}
]
}
},
"text": ""
},
"request_id": "33cf5e95-d39e-428a-96a8-fa5de30ebc1c"
}
Attachment with list template

{
"end_user_token": "df6a0edc-b31d-461x-ydcx-f7d5f02cd3d0",
"message": {
"attachment": {
"type": "template",
"payload": {
"template_type": "list",
"elements": [
{
"title": "Title Element 1",
"subtitle": "Subtitle Element 1",
"image_url": "http://url_or_the_image",
"buttons": [
{
"title": "Button",
"type": "web_url",
"payload": "http://link_to_redirect_to"
}
]
},
{
"title": "Title element 2",
"subtitle": "Subtitle element 2",
"image_url": "http://url_or_the_image",
},
{
"title": "Title element 3",
"subtitle": "Subtitle element 3",
"image_url": "http://url_or_the_image"
}
]
}
},
"text": ""
},
"request_id": "33cf5e95-d39e-428a-96a8-fa5de30ebc1c"
}
Text message with CSAT

enable CSAT survey in a step
If the CSAT survey is enabled in a step on the platform, the chatbot will send the the following payload to the webhook endpoint:
{
"end_user_token": "df6a0edc-b31d-461x-ydcx-f7d5f02cd3d0",
"request_id": "be94586d-96cc-46ac-a70a-df5b12c807d2",
"event": {
"type": "csat_activation_event",
"meta_content": {
"message_id": "ecafc028-f92e-459b-a172-2bdffb13e867",
"service_record_id": 17,
"case_statement_record_id": 11
},
},
}