List

List message examples shown for each supported platform

All examples below must be sent within the body field of a message as shown below

{
 "receiver": {
   "contacts": [
     {
       "identifierValue": "+31612345678"
     }
   ]
 },
 "body": {...}
}

List message without sections

Body

{
  "type": "list",
  "list": {
    "items": [
      {
        "actions": [
          {
            "type": "postback",
            "postback": {
              "payload": "postback-action-payload-1",
              "text": "Postback action 1"
            }
          },
          {
            "type": "postback",
            "postback": {
              "payload": "postback-action-payload-2",
              "text": "Postback action 2"
            }
          }
        ]
      }
    ],
    "title": "List title",
    "altText": "List alt text",
    "text": "List text"
  }
}

WhatsApp

Facebook

Instagram

List message with sections

Body

{
  "type": "list",
  "list": {
    "items": [
      {
      "title": "Section 1",
        "actions": [
          {
            "type": "postback",
            "postback": {
              "payload": "postback-action-payload-1",
              "text": "Postback action 1"
            }
          },
          {
            "type": "postback",
            "postback": {
              "payload": "postback-action-payload-2",
              "text": "Postback action 2"
            }
          }
        ]
      },
      {
        "title": "Section 2",
        "actions": [
          {
            "type": "postback",
            "postback": {
              "payload": "postback-action-payload-3",
              "text": "Postback action 3"
            }
          },
          {
            "type": "postback",
            "postback": {
              "payload": "postback-action-payload-4",
              "text": "Postback action 4"
            }
          }
        ]
      }
    ],
    "title": "List title",
    "altText": "List alt text",
    "text": "List text"
  }
}

WhatsApp

Facebook

Instagram

List message with metadata

Body

{
  "type": "list",
  "list": {
    "items": [
      {
        "title": "Section 1",
        "actions": [
          {
            "type": "postback",
            "postback": {
              "payload": "postback-action-payload-1",
              "text": "Postback action 1",
              "metadata": {
                "description": {
                  "label": "Postback action description 1"
                }
              }
            }
          },
          {
            "type": "postback",
            "postback": {
              "payload": "postback-action-payload-2",
              "text": "Postback action 2",
              "metadata": {
                "description": {
                  "label": "Postback action description 2"
                }
              }
            }
          }
        ]
      },
      {
        "title": "Section 2",
        "actions": [
          {
            "type": "postback",
            "postback": {
              "payload": "postback-action-payload-3",
              "text": "Postback action 3",
              "metadata": {
                "description": {
                  "label": "Postback action description 3"
                }
              }
            }
          },
          {
            "type": "postback",
            "postback": {
              "payload": "postback-action-payload-4",
              "text": "Postback action 4",
              "metadata": {
                "description": {
                  "label": "Postback action description 4"
                }
              }
            }
          }
        ]
      }
    ],
    "title": "List title",
    "altText": "List alt text",
    "text": "List text",
    "metadata": {
      "button": {
        "label": "Show options"
      }
    }
  }
}

WhatsApp

Facebook

Instagram

Last updated