Skip to main content

Sending cascade messages to the Viber channel

Last updated: 16 October 2026

Use the /api/cascade/schedule method to send cascade messages to the Viber channel.

info

This article describes how to send cascade messages using the /api/cascade/schedule method and the viberContent object.

For more information about the /api/cascade/schedule method, see:

File IconSending messages through a cascade

Calling the method​

To send a message to the Viber channel through a cascade using the /api/cascade/schedule method, send a POST request to https://app.edna.io/api/cascade/schedule.

Request examples​

Message with text​

{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"viberContent": {
"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 an image​

{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"viberContent": {
"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": {
"viberContent": {
"contentType": "DOCUMENT",
"attachment": {
"url": "https://www.gstatic.com/webp/gallery/1.jpg",
"name": "Lorem Ipsum"
}
}
}
}

Message with a button and an image​

{
"requestId": "test-001",
"cascadeId": "1",
"subscriberFilter": {
"address": "35700000000",
"type": "PHONE"
},
"startTime": "2021-01-21T08:00:00Z",
"content": {
"viberContent": {
"caption": "Button name",
"action": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
"text": "Button text",
"contentType": "BUTTON",
"attachment": {
"url": "https://www.gstatic.com/webp/gallery/1.jpg",
"name": "Lorem Ipsum"
}
}
}
}

viberContent parameters​

info

For more information about the general /api/cascade/schedule method parameters, see:

File IconSending messages through a cascade: General parameters
ParameterData typeRequirementDescription
contentTypestringRequiredMessage content type. Possible values are specified in uppercase:
- TEXT — text message;
- IMAGE — image;
- DOCUMENT — document attached to the message;
- VIDEO — message containing a video;
- AUDIO — message containing audio;
- BUTTON — button;
- LOCATION — message with the coordinates, address, and description of a location. The coordinates are converted to a Google Maps image.
footerobjectOptionalCaption. It displays below the message in a muted text color.
textstringOptionalMessage text. File IconText formatting
headerobjectOptionalMessage header. You can select one of the following header types: text, image, or document. For a text header, specify the header text. The header can contain one variable. The header is displayed in bold before the message. For a multimedia header, you can specify a link to a document or image.
attachmentobjectOptionalContains attachment information.
attachment.urlstringRequiredLink to an attachment: image, file, video, or audio.
attachment.namestringOptionalName of the image, file, video, or audio. The maximum length is 25 characters.
locationobjectOptionalContains location information.
location.longitudestringRequiredCoordinates (longitude).
location.latitudestringRequiredCoordinates (latitude).
location.addressstringOptionalAddress on the map.
captionstringOptionalButton name.
actionstringOptionalLink for the button.

Text formatting​

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 looking forward to seeing you at the \"Cooking together with Tefal\" master class on January 25, 2020, at 1:00 PM. Don’t miss this event! Our phone number is 8(495)100-00-00"

"text": "Maria! We’re looking forward to seeing you at the “Cooking together with Tefal” master class on January 25, 2020, at 1:00 PM. Don’t miss this event! Our phone number is 8(495)100-00-00"

Example of incorrect formatting:

"text": "Maria! We’re looking forward to seeing you at the "Cooking together with Tefal" master class on January 25, 2020, at 1:00 PM. Don’t miss this event! Our phone number is 8(495)100-00-00"

Attachment types​

Sent attachments should meet the following requirements:

Attachment typeSupported formatAllowed size
documentAny valid MIME type.100 MB
imageimage/jpeg, image/png.5 MB
audioaudio/aac, audio/mp4, audio/amr, audio/mpeg, audio/ogg.
Codec=opus (NWB) and ACC.
16 MB
videovideo/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​

ParameterData typeDescription
requestIdstringInternal identifier of an outgoing message. The customer’s external system generates it when sending a message.