Payload for “video” attachment
Key | Type | Description |
---|---|---|
url | string | URL of the video |
Example:
{
"message": {
"attachment": {
"type": "video",
"payload": {
"url": "http://url_or_the_video"
}
}
}
}
Payload for “image” attachment
Key | Type | Description |
---|---|---|
url | URL of the image | |
alt_text | string | Text to display/read if the image can’t be loaded |
Example:
{
"message": {
"attachment": {
"type": "image",
"payload": {
"url": "http://url_or_the_image",
"alt_text": "http://url_or_the_image",
}
}
}
}
Payload for “template” attachment
Key | Type | Description |
---|---|---|
template_type | string | Type of the template. Possible values are "generic" and "list". |
elements | array | A list of elements . See below. |
Elements:
Key | Type | Description |
---|---|---|
title | string | Title of the element |
subtitle | string | Subtitle of the element |
image_url | string | URL of the element's image |
buttons | array | A list of buttons attached to the element |
buttons.title | string | Title of the button |
buttons.type | string | Type of the button. Can be “web_url” (button to redirect to a website) or “postback” (quick reply to send to the conversation with the chatbot) |
buttons.payload | string | Link of the website to redirect to for “web_url”. Payload to send as quick reply for “postback”. |
Example:
{
"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"
}
]
}
}
}
}