Sending messages to the Viber channel
Last updated: 27 October 2026
Use the /api/v1/out-messages/viber method to send messages to the Viber channel.
Calling the method
To send a message to the Viber channel using the /api/v1/out-messages/viber method, send a POST request to https://app.edna.io/api/v1/out-messages/viber.
Request examples
Message with text
{
"sender": "viber_test",
"phone": "+35700000000",
"content": {
"type": "TEXT",
"text": "Good afternoon! We're pleased to introduce our new method for sending messages on Viber"
}
}
Message with a document
{
"sender": "viber_test",
"phone": "+35700000000",
"content": {
"type": "DOCUMENT",
"name": "order",
"url": "https://example.com/order.pdf"
}
}
Message with an image
{
"sender": "viber_test",
"phone": "+35700000000",
"content": {
"type": "IMAGE",
"url": "https://example.com/funny.jpg"
}
}
Message with text, an image, and a link button
{
"sender": "viber_test",
"phone": "+35700000000",
"content": {
"type": "CARD",
"text": "Good afternoon! Discover all the features of our app.",
"button": {
"caption": "Discover the possibilities",
"action": "https://example.com"
},
"imageUrl": "https://example.com/funny.jpg"
}
}
Request parameters
| Parameter | Data type | Requirement | Description |
|---|---|---|---|
outMessageId | string | Optional | Internal identifier of the outgoing message. The customer's external system or edna Pulse generates it when sending a message. Maximum string length: 256 characters. |
sender | string | Required | Channel name.
To find out the channel name, use the API method to get the channel list — the subject parameter.
Receiving list of channels |
phone | string | Required | Recipient address — phone number in the E.164 standard format.
Standard pattern: ^+[1-9]\d{1,14}$.
To find out the recipient address, use the API method to request recipient data — the addresses.address parameter.
Requesting client data |
content | object | Required | Object with message content information. |
content.type | string | Required | Message content type.
Possible values: - TEXT — text message;
- IMAGE — image;
- DOCUMENT — document;
- CARD — interactive message which can include text, an image, and a link button. |
content.text | string | Required if content.type = TEXT or CARD | Message text. It can contain emoji.
For content.type = TEXT, the maximum length is 1,000 characters.
For content.type = CARD, the maximum length is 256 characters. |
content.url | string | Required if content.type = IMAGE or DOCUMENT | Publicly available attachment URL — an image or document. Maximum length: 1,000 characters.
Only the HTTPS protocol is supported. The attachment URL must contain the extension of the transmitted file. The following extensions are supported: - For content.type = IMAGE — .jpg, .jpeg, .png, .bmp, .gif, .svg, .webp.
- For content.type = DOCUMENT — .doc, .docx, .pdf, .xls, .xlsx, .xlsm, .csv, .txt, .info, .rtf, .dot, .dotx, .odt, .odf, .fodt, .xps, .pdax, .eps, .ods, .fods, .xltx. |
content.name | string | Optional | File name — image or document. It isn't displayed on the recipient's device.
Maximum length: 25 characters. |
content.button | object | Optional | Object with link button information.
For content.type = CARD, a message supports only one link button. |
content.button.caption | string | Optional | Button text.
Maximum length: 30 characters. |
content.button.action | string | Optional | Publicly available URL of the external resource that opens when the user clicks the link button.
Maximum length: 1,000 characters. Only the HTTPS protocol is supported. |
content.imageUrl | string | Optional | Publicly available attachment URL — an image. Only for content.type = CARD. Maximum length: 1,000 characters.
Only the HTTPS protocol is supported. The attachment URL must contain the extension of the transmitted file. The following extensions are supported: .jpg, .jpeg, .png, .bmp, .gif, .svg, .webp. |
Response format
{
"outMessageId": "string",
"phone": "string"
}
Response example
{
"outMessageId": "0198adb2-74ee-7583-894b-fd2aa8fff639",
"phone": "+35700000000"
}
Response parameters
| Parameter | Data type | Description |
|---|---|---|
outMessageId | string | Internal identifier of the outgoing message. The customer's external system or edna Pulse generated it when sending a message. |
phone | string | Recipient address — phone number in the E.164 standard format.
Standard pattern: ^+[1-9]\d{1,14}$.
|