Payload for “video” attachment

KeyTypeDescription
urlstringURL of the video

Example:

{
  "message": {
    "attachment": {
      "type": "video",
      "payload": {
        "url": "http://url_or_the_video"
      }
    }
  }
}

Payload for “image” attachment

KeyTypeDescription
urlURL of the image
alt_textstringText 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

KeyTypeDescription
template_typestringType of the template. Possible values are "generic" and
"list".
elementsarrayA list of elements. See below.

Elements:

KeyTypeDescription
titlestringTitle of the element
subtitlestringSubtitle of the element
image_urlstringURL of the element's image
buttonsarrayA list of buttons attached to the element
buttons.titlestringTitle of the button
buttons.typestringType 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.payloadstringLink 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"
          }
        ]
      }
    }
  }
}