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) andtype(details)typevalues 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:
| Name | Description | Type | Requirements |
|---|---|---|---|
| listMessages | Object with the list message. Send only one: listMessages, replyButtons or flow (or another interactive message type). | Object | Conditional |
ListMessages object
| Name | Description | Type | Requirements |
|---|---|---|---|
| headerText | Header text (max 60 characters). | String | Optional |
| body | The message text, which can include formatting and URLs (max 1024 characters). | String | Required |
| footer | The message footer (max 60 characters). Supports emojis and Markdown. | String | Optional |
| buttonText | Button content (max 20 characters). Can't be an empty string and must be unique within the message. Doesn't support emojis or Markdown. | String | Required |
| sections | List of message sections. | List of objects | Required |
Sections object
| Name | Description | Type | Requirements |
|---|---|---|---|
| title | Section title (max 24 characters). | String | Required if the message has more than one section. |
| messages | List of rows (up to 10 per section). | List of objects | Required |
Messages object (rows)
| Name | Description | Type | Requirements |
|---|---|---|---|
| id | Unique identifier of the row. | String | Required |
| title | Row title. | String | Required |
| description | Optional description (max 72 characters). | String | Optional |
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"}]}]}}
