Sending cascade messages to WhatsApp
Use the /api/cascade/schedule method to send cascade messages to the WhatsApp channel.
This article describes sending cascade messages by using the /api/cascade/schedule method and the whatsappContent object.
For detailed information about the /api/cascade/schedule method, see:
BSUID.Otherwise, we can’t guarantee that link button click statistics display correctly.
Calling the method
To send a cascade message to the WhatsApp channel using the /api/cascade/schedule method, send a POST request to https://app.edna.io/api/cascade/schedule.
Request examples with non-template WhatsApp messages
WhatsApp documentation calls this message type free-form messages.
Message with text
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "TEXT",
"text": "Hello! We are pleased to introduce you to our new customer communication channel. Here you can ask all the questions you are interested in."
}
}
}
Message with text, sent using the BSUID
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "DE.1234567890123456789",
"type": "WHATSAPP_BSUID"
},
"startTime": "2026-04-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "TEXT",
"text": "Good afternoon! This message was sent using a new ID."
}
}
}
Message with an image
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "IMAGE",
"attachment": {
"url": "https://www.gstatic.com/webp/gallery/1.jpg",
"name": "Lorem Ipsum"
}
}
}
}
Message with a document
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "DOCUMENT",
"attachment": {
"url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
"name": "Lorem Ipsum"
}
}
}
}
Message with a video
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "VIDEO",
"attachment": {
"url": "https://file-examples.com/wp-content/uploads/2017/04/file_example_MP4_480_1_5MG.mp4",
"name": "Lorem Ipsum"
}
}
}
}
Message with audio
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "AUDIO",
"attachment": {
"url": "https://dl.espressif.com/dl/audio/ff-16b-2c-44100hz.aac",
"name": "Lorem Ipsum"
}
}
}
}
Message with a location
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "LOCATION",
"location": {
"longitude": "33.022617",
"latitude": "34.707130",
"address": "10 Parni, Limassol, Cyprus",
"name": "Company LTD"
}
}
}
}
Message with an interactive menu
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "LIST_PICKER",
"text": "Hello! Please choose a hoodie color",
"listPicker": {
"button": "Hoodie color",
"sections": [
{
"title": "Choose a color",
"items": [
{
"identifier": "1",
"title": "Red",
"subtitle": "Red hoodie"
},
{
"identifier": "2",
"title": "Blue",
"subtitle": "Blue hoodie"
}
]
}
]
}
}
}
}
Message with response buttons
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "TEXT",
"text": "Hello! Please choose a hoodie color",
"keyboard": {
"rows": [
{
"buttons": [
{
"text": "Red",
"payload": "1"
},
{
"text": "Blue",
"payload": "2"
},
{
"text": "Green",
"payload": "3"
}
]
}
]
}
}
}
}
Message with one product
{
"requestId": "test-001",
"cascadeId": "3",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"content": {
"whatsappContent": {
"contentType": "PRODUCT",
"header": {
"text": "Footer"
},
"text": "Choose the best offer",
"catalog": {
"id": "377932094379589",
"product": {
"id": "yxtgwrkdy9"
}
}
}
}
}
Message with a group of products
{
"requestId": "test-001",
"cascadeId": "8",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"content": {
"whatsappContent": {
"contentType": "PRODUCT_LIST",
"header": {
"text": "Footer"
},
"text": "Choose the best offer",
"catalog": {
"id": "377932094379589",
"sections": [
{
"title": "Shoes",
"products": [
{
"id": "yxtgwrkdy9"
},
{
"id": "5k0l3pwczd"
}
]
},
{
"title": "T-shirts",
"products": [
{
"id": "5k0l3pwczd"
}
]
}
]
}
}
}
}
Message with WhatsApp Flows
{
"requestId": "test-001",
"cascadeId": "3",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"content": {
"whatsappContent": {
"contentType": "FLOW",
"caption": "Buy",
"text": "Buy discount products",
"flowId": 3779320943795899,
"action": "navigate"
}
}
}
Request examples with WhatsApp template messages
WhatsApp documentation calls this message type template messages.
Message with text and a footer
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "TEXT",
"text": "Hello there! Write to us to learn more about the capabilities of edna Pulse",
"footer": {
"text": "edna company"
}
}
}
}
Message with text, a text header, and a footer
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "TEXT",
"text": "Hello there! Write to us to learn more about the capabilities of edna Pulse",
"header": {
"text": "Your chat with edna"
},
"footer": {
"text": "edna company"
}
}
}
}
Message with text and an image header
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "TEXT",
"text": "Hello there! Write to us to learn more about the capabilities of edna Pulse",
"header": {
"imageUrl": "https://cdn.maikoapp.com/3d4b/4qgko/200.jpg"
}
}
}
}
Message with text, an image header, and a footer
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "TEXT",
"text": "Text, image header, signature",
"header": {
"imageUrl": "https://www.gstatic.com/webp/gallery/1.jpg"
},
"footer": {
"text": "We look forward to seeing you!"
}
}
}
}
Message with text and a document header
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "TEXT",
"text": "Hello there! Write to us to learn more about the capabilities of edna Pulse",
"header": {
"documentUrl": "https://cdn.maikoapp.com/3d4b/4qgko/200.jpg"
}
}
}
}
Message with text, a document header, and a footer
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "TEXT",
"text": "Hello there! Write to us to learn more about the capabilities of edna Pulse",
"header": {
"documentUrl": "https://cdn.maikoapp.com/3d4b/4qgko/200.jpg"
},
"footer": {
"text": "edna company"
}
}
}
}
Message with text, a video header, and a footer
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "TEXT",
"text": "Text, video header, signature",
"header": {
"videoUrl": "https://file-examples.com/wp-content/uploads/2017/04/file_example_MP4_480_1_5MG.mp4"
},
"footer": {
"text": "We look forward to seeing you!"
}
}
}
}
Message with text and two chat buttons
{
"requestId": "test-001",
"cascadeId": "11",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "TEXT",
"text": "Hello there! Write to us to learn more about the capabilities of edna Pulse",
"keyboard": {
"rows": {
"buttons": [
{
"text": "Write",
"type": "QUICK_REPLY",
"payload": "1"
},
{
"text": "Later",
"type": "QUICK_REPLY",
"payload": "2"
}
]
}
}
}
}
}
Message with text and a link button
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "TEXT",
"text": "Hello! Visit the edna Knowledge Base to learn more about the features of edna Pulse",
"keyboard": {
"rows": {
"buttons": [
{
"text": "Open",
"type": "URL",
"url": "https://docs-pulse.edna.io/"
}
]
}
}
}
}
}
Message with text and a call button
{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"whatsappContent": {
"contentType": "TEXT",
"text": "Hello there! Call us to learn more about the capabilities of edna Pulse",
"keyboard": {
"rows": {
"buttons": [
{
"text": "Call",
"type": "PHONE",
"phone": "35700000000"
}
]
}
}
}
}
}
Authentication message with a one-time password copy button
{
"requestId": "test-001",
"cascadeId": "71",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"content": {
"whatsappContent": {
"contentType": "AUTHENTICATION",
"messageMatcherId": 4601,
"text": "1234"
}
}
}
whatsappContent parameters
For detailed information about the common /api/cascade/schedule method parameters, see:
| Parameter | Data type | Required | Description |
|---|---|---|---|
contentType | string | Required | Message content type. Possible values are uppercase:
- TEXT — text message;
- IMAGE — image;
- DOCUMENT — document attached to a message;
- VIDEO — message containing a video;
- AUDIO — message containing audio;
- LOCATION — message with coordinates, an address, and a location description. The coordinates are converted into a Google Maps image;
- LIST_PICKER — WhatsApp interactive menu buttons;
- AUTHENTICATION — message with a one-time password and a copy button;
- FLOW — message containing WhatsApp Flows.
How to use WhatsApp Flows
|
text | string | Required if contentType = TEXT, AUTHENTICATION, or FLOW | - Message text if contentType = TEXT.
- Text of the message that contains the Flow if contentType = FLOW.
- One-time password if contentType = AUTHENTICATION.
warning If you specify the attachment field when sending a WhatsApp message, the text field is ignored and only the attachment is sent. |
flowId | integer | Required if contentType = FLOW | Flow identifier assigned in WhatsApp Manager when you create the Flow. |
screen | string | Optional | Identifier of the screen that first appears in the Flow. |
caption | string | Required if contentType = FLOW | Text of the button that starts the Flow when clicked. |
action | string | Optional | Flow interaction type.
Possible values: - navigate — the Flow doesn’t send a request to the endpoint. Default value.
- data_exchange — the Flow sends a request to the endpoint.
|
attachment | object | Required | Contains attachment information.
warning If you specify the attachment field when sending a WhatsApp message, the text field is ignored and only the attachment is sent. |
attachment.url | string | Required if the attachment object isn’t empty | Link to an attachment: image, file, video, or audio. |
attachment.name | string | Required | Name of the image, file, video, or audio. Maximum length: 70 characters. |
header | object | Required | Message header. You can select one of the following header types: text, image, or document. For a text header, specify the header text; it can contain one variable. The header displays in bold before the message. For a multimedia header, you can specify a link to a document or image. |
footer | string | Required | Footer. It displays below the message in a muted text color. |
location | object | Required | Contains geolocation information. You can send a message with a location only within a 24-hour conversation. |
location.longitude | string | Required | Coordinates (longitude). Value range: -180 to 180. |
location.latitude | string | Required | Coordinates (latitude). Value range: -90 to 90. |
location.address | string | Optional | Address on the map. |
location.name | string | Optional | Name of the object whose address is provided. |
header.text | string | Required for a text header | Header text. |
header.imageUrl | string | Required for an image header | Link to the image in the header. |
header.documentUrl | string | Required for a document header | Link to the document in the header. |
header.documentName | string | Required for a document header | Name of the document in the header. It displays to the message recipient. |
header.videoUrl | string | Required for a video header | Link to the video in the header. |
header.videoName | string | Required for a video header | Name of the video in the header. It displays to the message recipient. |
buttons | object | Required | Array of objects, each of which defines a button. |
buttons.text | string | Required | Button text. Maximum length: 20 characters. |
buttons.url | string | Required for a link button | URL that opens when you click the button. |
buttons.urlPostfix | string | Required if the template has a dynamic link or it isn’t zero | Dynamic part of the button URL. |
buttons.phone | string | Required for a call button | Phone number dialed when you click the button. |
buttons.payload | string | Required for a text button | Code or text of the quick reply button.
Maximum number of characters: - for HSM messages — 128. - for CHAT messages — 128. |
buttons.type | string | Required | Button type:
- URL — opens the specified link;
- PHONE — dials the specified phone number;
- QUICK_REPLY — sends a prepared reply;
- OTP — copies the one-time password.
A message can contain up to three QUICK_REPLY buttons or up to one each of the URL and PHONE buttons. QUICK_REPLY buttons can’t be in the same message as other buttons.
Possible options: - QUICK_REPLY
- QUICK_REPLY QUICK_REPLY
- QUICK_REPLY QUICK_REPLY QUICK_REPLY
- URL
- PHONE
- URL PHONE |
buttons.otpType | boolean | Optional | Button type in an authentication WhatsApp message. Only for an authentication WhatsApp template message.
Possible values: - COPY_CODE — copy the code;
- ONE_TAP — automatic fill-in button. |
buttons.autofillText | string | Optional | Text of the automatic fill-in button. Only for automatic fill-in buttons in an authentication WhatsApp template message. Maximum number of characters: 25. |
buttons.packageName | string | Optional | Android application package name in an authentication WhatsApp message. Only for automatic fill-in buttons in an authentication WhatsApp template message. |
listPicker | object | Required | List item object. It contains the button parameter and the sections object, which contains section objects. |
listPicker.button | string | Required if the listPicker object isn’t empty | Name of the interactive list button. |
listPicker.sections.title | string | Required if the listPicker object isn’t empty | Title of the section with items that displays to the user. |
listPicker.sections.items | array of objects | Optional | List of item objects. |
listPicker.sections.items.identifier | string | Required if the listPicker object isn’t empty | Item ID unique throughout the message, which returns in the user’s response message. |
listPicker.sections.items.title | string | Required if the listPicker object isn’t empty | Item name. Maximum length: 24 characters, including spaces. |
listPicker.sections.items.subtitle | string | Required if the listPicker object isn’t empty | Item subtitle. Maximum length: 24 characters, including spaces. |
messageMatcherId | integer | Required if contentType = AUTHENTICATION | Template identifier for this authentication message. |
useMarketingMessagesApi | boolean | Optional | The parameter defines the delivery method for a marketing message — Marketing Messages API or Cloud API.
Possible values: - true — through Marketing Messages API;
- false — through Cloud API.
How to activate Marketing Messages API for WhatsApp |
messageActivitySharing | boolean | Optional | The parameter enables marketing message delivery optimization through Marketing Messages API and defines whether Meta* can analyze message data.
Possible values: - true — optimization is enabled: Meta* can read the message and decide whether to deliver it to the recipient.
- false — optimization is disabled: Meta* can’t access the message content and doesn’t participate in the delivery decision.
How to activate Marketing Messages API for WhatsApp |
Text formatting
The text formatting option for WhatsApp messages is enabled by default and can’t be disabled.
| Text formatting | Example |
|---|---|
| _Italic_ | Italic |
| *Bold* | Bold |
| ~Strikethrough~ | |
| `Monospace` | Monospace |
Rules for escaping quotation marks in text
Separate the “ or ‘ quotation marks with \ in the sent message.
Example of correct formatting:
"text": "Maria! We’re expecting you at the master class \"Cooking together with Tefal\" on 01/25/2020 at 1:00 PM. Don’t miss this event! Our phone number is (22)00-00-00"
"text": "Maria! We’re expecting you at the master class “Cooking together with Tefal” on 01/25/2020 at 1:00 PM. Don’t miss this event! Our phone number is (22)00-00-00"
Example of incorrect formatting:
"text": "Maria! We’re expecting you at the master class "Cooking together with Tefal" on 01/25/2020 at 1:00 PM. Don’t miss this event! Our phone number is (22)00-00-00"
Attachment requirements
Sent attachments should meet the following requirements:
| Attachment type | Supported format | Allowed size |
|---|---|---|
| document | Any valid MIME type. | 100 MB |
| image | image/jpeg, image/png. | 5 MB |
| audio | audio/aac, audio/mp4, audio/amr, audio/mpeg, audio/ogg.
Codec=opus (NWB) and ACC. | 16 MB |
| video | video/mp4, video/3gpp.
Only MPEG 4 and 3GPP formats with the H.264 (MPEG-4 Part 10) codec and AAC for audio are supported. | 16 MB |
Response format
{
"requestId": "string"
}
Response example
{
"requestId": "test-001"
}
Response parameters
| Parameter | Data type | Description |
|---|---|---|
requestId | string | Internal identifier of an outgoing message. The customer’s external system generates it when sending the message. |