Skip to main content

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"
}
}
{
"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​

ParameterData typeRequirementDescription
outMessageIdstringOptionalInternal identifier of the outgoing message. The customer's external system or edna Pulse generates it when sending a message. Maximum string length: 256 characters.
senderstringRequiredChannel name.
To find out the channel name, use the API method to get the channel list — the subject parameter. File IconReceiving list of channels
phonestringRequiredRecipient address — phone number in the E.164 standard format.
Standard pattern: ^+[1-9]\d{1,14}$.
wikipedia.org
To find out the recipient address, use the API method to request recipient data — the addresses.address parameter. File IconRequesting client data
contentobjectRequiredObject with message content information.
content.typestringRequiredMessage 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.textstringRequired if content.type = TEXT or CARDMessage 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.urlstringRequired if content.type = IMAGE or DOCUMENTPublicly 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.namestringOptionalFile name — image or document. It isn't displayed on the recipient's device.
Maximum length: 25 characters.
content.buttonobjectOptionalObject with link button information.
For content.type = CARD, a message supports only one link button.
content.button.captionstringOptionalButton text.
Maximum length: 30 characters.
content.button.actionstringOptionalPublicly 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.imageUrlstringOptionalPublicly 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​

ParameterData typeDescription
outMessageIdstringInternal identifier of the outgoing message. The customer's external system or edna Pulse generated it when sending a message.
phonestringRecipient address — phone number in the E.164 standard format.
Standard pattern: ^+[1-9]\d{1,14}$.
wikipedia.org