Sending Messages by Viber Template ID
Last updated: 23 July 2026
To send messages to the Viber channel by the template ID templateId, the api/v1/out-messages/viber/template method is used.
tip
The api/v1/out-messages/viber/template method refers to the new API version.
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 the URL 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 example
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 | Character | Description |
|---|---|---|---|
messageId | string | Optional | The internal ID of the message. |
sender | string | Required | Signature name.
To find out the name of the signature, use the API method to get a list of channels — the subject parameter.
Receiving List of Channels |
phone | string | Required | Recipient's address — phone number.
To find out the recipient's address, use the API method for requesting recipient data — the addresses.address parameter.
Requesting Client Data |
templateId | number | Required | Template ID.
To find out the template ID, use the API method to get a list of templates — the id parameter.
Retrieving List of Templates |
textVariables | array of strings | Required if the template contains variables | Variable values in the template message. |
options | object | Optional | Object with additional message-sending settings. |
options.comment | string | Optional | Text comment to the message. The parameter value is displayed in the message report. |
options.sendDelay | string | Optional | Time interval in the ISO 8601 durations date format (for example, `PT10H15M48S'), before which the message will not be sent. Used for delayed shipping.
|
options.priority | string | Optional | Used to indicate the priority of messages.
Possible values: - LOW — low priority;
- NORMAL — medium priority, default value;
- HIGH — high priority;
- REALTIME — real-time delivery. |
Response format
{
"messageId": "string",
"phone": "string"
}
Response example
{
"messageId": "01987f4a-070e-730e-bf59-cedc1e63350",
"phone": "35700000000"
}
Response parameters
| Parameter | Data type | Description |
|---|---|---|
messageId | string | The internal ID of the message. |
phone | string | Recipient’s address (a phone number). |