Payload for “video” attachment
Key | Type | Description |
|---|---|---|
|
| URL of the video |
Example:
{
"message": {
"attachment": {
"type": "video",
"payload": {
"url": "http://url_or_the_video"
}
}
}
}Payload for “image” attachment
Key | Type | Description |
|---|---|---|
| URL of the image | |
|
| 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 |
|---|---|---|
|
| Type of the template. Possible values are "generic" and "list". |
|
| A list of |
Elements:
Key | Type | Description |
|---|---|---|
|
| Title of the element |
|
| Subtitle of the element |
|
| URL of the element's image |
|
| A list of buttons attached to the element |
|
| Title of the button |
|
| 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) |
|
| 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"
}
]
}
}
}
}