Sending messages by Viber template identifier
Last updated: 16 October 2026
Use the /api/v1/out-messages/viber/template method to send messages to the Viber channel by the templateId template identifier.
Calling the method
To send a message to the Viber channel using the /api/v1/out-messages/viber/template method, send a POST request to https://app.edna.io/api/v1/out-messages/viber/template.
Request format
{
"messageId": "string",
"sender": "string",
"phone": "string",
"templateId": number,
"textVariables": [
"string",
"string",
"string"
],
"options": {
"comment": "string",
"sendDelay": "string",
"priority": "string"
}
}
Request examples
Text message
{
"sender": "RETAIL_VIBER",
"phone": "35700000000",
"templateId": 32,
"options": {
"comment": "promotion"
}
}
Delayed message containing variables in the text
{
"messageId": "01987f4a-070e-730e-bf59-cedc1e63350",
"sender": "RETAIL_VIBER",
"phone": "35700000000",
"templateId": 34,
"textVariables": [
"Alex",
"10.05",
"Happy Birthday"
],
"options": {
"comment": "2025-08-12T12:17:20.981Z",
"sendDelay": "PT1H3M4S",
"priority": "NORMAL"
}
}
Request parameters
| Parameter | Data type | Requirement | Description |
|---|---|---|---|
messageId | string | Optional | Internal identifier of the outgoing message. The customer's external system or edna Pulse generates it when sending a message. The maximum string length is 256 characters. |
sender | string | Required | Sender name.
To get the sender name, use the API method for getting the list of channels — the subject parameter.
Receiving list of channels |
phone | string | Required | Recipient address — phone number.
To get the recipient address, use the API method for requesting recipient data — the addresses.address parameter.
Requesting client data |
templateId | number | Required | Template identifier.
To get the template identifier, use the API method for getting the list of templates — the id parameter.
Retrieving list of templates |
textVariables | array of strings | Required if the template contains variables | Variable values in a message created from a template. |
options | object | Optional | Used for additional message sending settings. |
options.comment | string | Optional | Text comment for the message. The parameter value is displayed in the message report. |
options.sendDelay | string | Optional | Time period in ISO 8601 format (for example, PT10H15M48S) before which the message isn’t sent. Used for delayed sending. |
options.priority | string | Optional | Used to specify the message priority.
Possible values: - LOW — low priority;
- NORMAL — medium priority, the default value;
- HIGH — high priority;
- REALTIME — delivery in real time. |
Response format
{
"messageId": "string",
"phone": "string"
}
Response example
{
"messageId": "01987f4a-070e-730e-bf59-cedc1e63350",
"phone": "77771234567"
}
Response parameters
| Parameter | Data type | Description |
|---|---|---|
messageId | 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. |