To send interactive messages we will follow the standard of other types of messages that can be seen here.
If the message type is LIST only the text field is accepted.
{
"destinations": [
{
"correlationId": "MyCorrelationId",
"destination": "5519900001111"
}
],
"message": {
"interactive": {
"messageInteractiveType": "LIST",
"header": {
"text": "Sample text"
},
"body": {
"text": "Main message text"
},
"footer": {
"text": "Footer text"
},
"listAction": {
"button": "button text",
"sections": [
{
"rows": [
{
"identifier": "9ab8d65e-d389-4123-b97b-702e658cc9e4",
"title": "August 7, 11:00",
"description": "Saturday, August 7, 2021. 11:00AM"
},
{
"identifier": "2051afef-e000-47d0-99a5-7d96c17968b2",
"title": "August 7, 15:00",
"description": "Saturday, August 7, 2021. 3:00PM"
},
{
"identifier": "55baac93-a513-45d0-ad9e-2e2271861fc8",
"title": "August 9, 11:00",
"description": "Monday, August 9, 2021. 11:00AM"
},
{
"identifier": "e2703f03-689c-4d1e-b0e9-4045d6687605",
"title": "August 9, 15:00",
"description": "Monday, August 9, 2021. 4:00PM"
}
]
}
]
},
"alternativeText": "Simple message text"
}
}
}
{
"destinations": [
{
"correlationId": "MyCorrelationId",
"destination": "5519900001111"
}
],
"message": {
"interactive": {
"messageInteractiveType": "REPLY_BUTTON",
"header": {
"text": "Sample text",
"image": {
"type": "JPG",
"url": "http://...jpg"
},
"video": {
"type": "MP4",
"url": "http://...mp4"
},
"document": {
"type": "PDF",
"url": "http://...pdf"
},
"location": {
"geoPoint": "-22.894180,-47.047960",
"name": "Wavy",
"address": "Av. Cel. Silva Telles"
}
},
"body": {
"text": "Main message text"
},
"footer": {
"text": "Footer text"
},
"replyButtonAction": {
"buttons": [
{
"reply": {
"title": "Display Text 1",
"payload": "callback_payload_1"
}
},
{
"reply": {
"title": "Display Text 2",
"payload": "callback_payload_2"
}
}
],
},
"alternativeText": "Simple message text"
}
}
}
Interactive Message Callback