logo
enes

List messages

Last update: 6 hours ago by Irais Aguirre

Integration summary

  • Endpoint: POST https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging
  • Token: messaging token, in the Authorization: Bearer {{wa-msg-api-token}} header (how to generate it)
  • Common fields: from, to (phone number or BSUID) and type (details)
  • type values on this page: "interactive"
  • Response: the same for every message (see response)

Messages that include a menu of up to 10 options. This message type gives users a simpler, more consistent way to make a selection when interacting with a business. They are sent with POST /v1/messaging; headers, common fields and the response are in HTTP connection.

List messages

The type field must be "interactive" and the message content is sent in the listMessages object. See the general structure of interactive messages.

Body

Fields for List messages:

NameDescriptionTypeRequirements
listMessagesObject with the list message. Send only one: listMessages, replyButtons or flow (or another interactive message type).ObjectConditional

ListMessages object

NameDescriptionTypeRequirements
headerTextHeader text (max 60 characters).StringOptional
bodyThe message text, which can include formatting and URLs (max 1024 characters).StringRequired
footerThe message footer (max 60 characters). Supports emojis and Markdown.StringOptional
buttonTextButton content (max 20 characters). Can't be an empty string and must be unique within the message. Doesn't support emojis or Markdown.StringRequired
sectionsList of message sections.List of objectsRequired

Sections object

NameDescriptionTypeRequirements
titleSection title (max 24 characters).StringRequired if the message has more than one section.
messagesList of rows (up to 10 per section).List of objectsRequired

Messages object (rows)

NameDescriptionTypeRequirements
idUnique identifier of the row.StringRequired
titleRow title.StringRequired
descriptionOptional description (max 72 characters).StringOptional

Example

Complete List messages example (HTTP request and JSON body):

List messages HTTP request

curl -X POST 'https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging' \
-H 'Authorization: Bearer {{wa-msg-api-token}}' \
-H 'Content-Type: application/json' \
-d '{
"from": "5215500000001",
"to": "5215500000002",
"type": "interactive",
"listMessages": {
"headerText": "Header test",
"body": "Body test",
"footer": "Footer test",
"buttonText": "English",
"sections": [
{
"title": "Online courses",
"messages": [
{
"id": "1",
"title": "Intensive",
"description": "One-hour live classes, Monday through Friday"
},
{
"id": "2",
"title": "Saturday",
"description": "3-hour live class on Saturdays"
},
{
"id": "3",
"title": "Alpha 12",
"description": "Live classes, 12 hours over 4 weeks"
},
{
"id": "4",
"title": "Alpha 20",
"description": "Live classes, 20 hours over 4 weeks"
},
{
"id": "5",
"title": "Alpha 40",
"description": "Live classes, 40 hours over 4 weeks"
},
{
"id": "6",
"title": "Intensive",
"description": "One-hour live classes, Monday through Friday"
},
{
"id": "7",
"title": "Saturday",
"description": "3-hour live class on Saturdays"
},
{
"id": "8",
"title": "Alpha 12",
"description": "Live classes, 12 hours over 4 weeks"
},
{
"id": "9",
"title": "Alpha 20",
"description": "Live classes, 20 hours over 4 weeks"
},
{
"id": "10",
"title": "Alpha 40",
"description": "Live classes, 40 hours over 4 weeks"
}
]
}
]
}
}'

List messages body

{
"from": "5215500000001",
"to": "5215500000002",
"type": "interactive",
"listMessages": {
"headerText": "Header test",
"body": "Body test",
"footer": "Footer test",
"buttonText": "English",
"sections": [
{
"title": "Online courses",
"messages": [
{
"id": "1",
"title": "Intensive",
"description": "One-hour live classes, Monday through Friday"
},
{
"id": "2",
"title": "Saturday",
"description": "3-hour live class on Saturdays"
},
{
"id": "3",
"title": "Alpha 12",
"description": "Live classes, 12 hours over 4 weeks"
},
{
"id": "4",
"title": "Alpha 20",
"description": "Live classes, 20 hours over 4 weeks"
},
{
"id": "5",
"title": "Alpha 40",
"description": "Live classes, 40 hours over 4 weeks"
},
{
"id": "6",
"title": "Intensive",
"description": "One-hour live classes, Monday through Friday"
},
{
"id": "7",
"title": "Saturday",
"description": "3-hour live class on Saturdays"
},
{
"id": "8",
"title": "Alpha 12",
"description": "Live classes, 12 hours over 4 weeks"
},
{
"id": "9",
"title": "Alpha 20",
"description": "Live classes, 20 hours over 4 weeks"
},
{
"id": "10",
"title": "Alpha 40",
"description": "Live classes, 40 hours over 4 weeks"
}
]
}
]
}
}


Previous
Interactive messages
Next
Reply buttons