Resources Overview
Viber Messaging resources overview
Available Resources
| Method | Path | Description | Reference Link |
|---|---|---|---|
POST | /viber/campaign | Send a Viber campaign. | Send a Viber Campaign |
GET | /viber/tracking/campaign/{campaignTrackingId} | Retrieve tracking information for a Viber campaign. | Retrieve Viber Tracking by Campaign |
DELETE | /viber/campaign/{campaignTrackingId} | Delete a scheduled Viber campaign. | Delete a Scheduled Viber Campaign |
POST | /viber/session | Retrieve all Viber session messages by phone number. | Get All Viber Session Messages by Phone Number |
GET | /viber/session/{sessionId} | Retrieve Viber session messages by session ID. | Get Viber Session Messages by Session ID |
POST | /viber | Send a Viber message to a single recipient. This is a paid service. | Send a Viber Single Message |
GET | /viber/tracking/{trackingId} | Retrieve tracking information for a Viber single message. | Retrieve Viber Single Message by Tracking ID |
POST | /viber/otp | Send a legacy Viber OTP message. This endpoint remains available for older integrations. | Send Viber OTP Message |
GET | /viber/transactional/templates | List Viber transactional templates. If senderInfoTrackingId is omitted, templates for all eligible senders on the account may be returned. | List Viber Transactional Templates |
POST | /viber/transactional/templates | Create a new Viber transactional or OTP-category template for moderation. Requires senderInfoTrackingId as a query parameter. | Create Viber Transactional Template |
PATCH | /viber/transactional/templates/{templateId} | Update the lifecycle callback URL for a transactional template. The request body must explicitly include callbackUrl or lifecycleCallbackUrl. | Update Viber Transactional Template Callback |
DELETE | /viber/transactional/templates/{templateId} | Delete a Viber transactional template. Once deleted, the template ID can no longer be used for sending. | Delete Viber Transactional Template |
POST | /viber/transactional/messages | Send an approved Viber transactional template message, including OTP-category templates. Use templateId, templateLang, and templateParams in the request body. | Send Viber Transactional Template Message |
Viber Transactional Template Resources
From July 1, 2026, every transactional Viber Business Message must be sent using a pre-approved template.
The transactional template API allows you to:
- Create templates for Viber moderation
- List templates and their moderation status
- Update lifecycle callback URLs
- Delete templates
- Send approved transactional and OTP-category templates
ImportantOTP-category templates are sent through:
POST /viber/transactional/messagesThere is no greenfield:
POST /viber/transactional/otpLegacy:
POST /viber/otpremains available for older integrations only.
Template Management Endpoints
List Viber Transactional Templates
GET /viber/transactional/templatesRetrieves Viber transactional templates available for the account.
You can optionally filter the response by sender.
Optional Query Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
senderInfoTrackingId | string | No | Filters templates by a specific Viber sender. If omitted, templates for all eligible senders on the account may be returned. |
Create Viber Transactional Template
POST /viber/transactional/templatesCreates a new Viber transactional or OTP-category template and submits it for moderation.
Required Query Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
senderInfoTrackingId | string | Yes | Identifies the Viber sender for which the template is created. |
Notes
- One template belongs to one Viber sender.
- One template has one locale.
- Templates cannot be edited after submission.
- If wording or variables must change, delete the existing template and create a new one.
- Routee supports up to 2,000 transactional templates per Viber sender.
Update Viber Transactional Template Callback
PATCH /viber/transactional/templates/{templateId}Updates Routee’s stored lifecycle callback URL for template moderation status events.
This endpoint is used only for the template lifecycle webhook URL.
It does not update the template text, language, category, or variables.
Path Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
templateId | string | Yes | UUID of the transactional template. |
Request Body
Use callbackUrl:
{
"callbackUrl": "https://example.com/viber-template-status"
}Or use the alternate field name lifecycleCallbackUrl:
{
"lifecycleCallbackUrl": "https://example.com/viber-template-status"
}To clear the callback URL:
{
"callbackUrl": null
}
Strict request bodyAn empty request body is rejected on the greenfield endpoint:
{}The callback update must be explicit.
Delete Viber Transactional Template
DELETE /viber/transactional/templates/{templateId}Deletes a Viber transactional template.
Path Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
templateId | string | Yes | UUID of the transactional template to delete. |
ImportantOnce deleted, the template ID can no longer be used for sending.
Send Endpoint
Send Viber Transactional Template Message
POST /viber/transactional/messagesSends an approved Viber transactional template message.
This endpoint is used for both:
- Transactional templates
- OTP-category templates
Request Body Highlights
| Field | Type | Required | Description |
|---|---|---|---|
senderInfoTrackingId | string | Yes | Identifies the Viber sender in Routee. |
to | string | Yes | Recipient mobile number in E.164 format with leading +. |
templateId | string | Yes | UUID of the approved template. |
templateLang | string | Yes | Template locale, using ISO 639-1 format, for example en. |
templateParams | object | Yes | Key-value object containing the placeholder values required by the approved template. |
deliveryScope | string | No | PRIMARY_DEVICE or ALL_DEVICES. Defaults to PRIMARY_DEVICE when omitted. |
seq | number | No | Optional partner correlation ID. If omitted, Routee assigns one. |
ttl | number | No | Message time-to-live in seconds. |
callbackUrl | string | No | Per-message delivery callback URL. This is different from the template lifecycle callback URL. |
inboundUrl | string | No | URL for inbound replies, where applicable. |
label | string | No | Optional label for reporting or grouping. |
sessionMessage | boolean | No | Indicates whether the message is related to a Viber session flow, where applicable. |
Example — Transactional Template Message
{
"senderInfoTrackingId": "your-viber-sender-tracking-id",
"to": "+972500000000",
"ttl": 86400,
"templateId": "2c017482-2f44-41d6-adad-2d6af725fdbe",
"templateLang": "en",
"templateParams": {
"name": "John",
"time_start": "10:00",
"time_end": "14:00"
},
"deliveryScope": "PRIMARY_DEVICE",
"sessionMessage": false
}Example — OTP-Category Template Message
{
"senderInfoTrackingId": "your-viber-sender-tracking-id",
"to": "+972500000000",
"templateId": "APPROVED_OTP_TEMPLATE_UUID",
"templateLang": "en",
"templateParams": {
"pin": "482910",
"minutes": "5"
},
"deliveryScope": "PRIMARY_DEVICE",
"ttl": 86400
}
OTP templatesOTP-category templates must include a non-empty
pinvalue intemplateParams.
Send-Time Validation
Before a transactional template message is queued, Routee validates the request against the approved template.
Routee checks:
- Template ID
- Template language
- Required parameters
- OTP
pin, where applicable - Parameter length
- Invalid URLs in parameter values
- File-extension-like parameter values, for example
test.pdf
If validation fails, Routee returns:
HTTP 400With error code:
400019029And a validationIssues array.
Example Error Response
{
"code": "400019029",
"validationIssues": [
{
"code": "OTP_PIN_REQUIRED",
"message": "OTP template messages must include a non-empty pin parameter."
}
]
}Typical validation issue codes include:
| Code | Meaning |
|---|---|
OTP_PIN_REQUIRED | The OTP template requires a non-empty pin value. |
TEMPLATE_LANG_MISMATCH | The provided templateLang does not match the approved template locale. |
PARAM_CONTAINS_URL | A template parameter contains a URL. |
PARAM_CONTAINS_FILE_EXTENSION | A template parameter contains a file-extension-like value, such as test.pdf. |
PARAM_VALUE_TOO_LONG | A template parameter value exceeds the allowed length. |
PARAM_MISSING | A required template parameter is missing. |
PARAM_NOT_ALLOWED | The request contains a parameter not defined in the approved template. |
Tracking and Callbacks
Transactional template sends use the standard Viber tracking and callback concepts.
Polling
Use the existing Viber tracking endpoint:
GET /viber/tracking/{trackingId}Delivery Callback
Set callbackUrl on the send request to receive per-message delivery status updates.
Delivery callbacks may include transactional template information such as:
messageKindtransactionalTemplatetransactionalTemplate.seq
Lifecycle Callback
Set or update the template lifecycle callback URL using:
PATCH /viber/transactional/templates/{templateId}Lifecycle callbacks are for moderation events such as:
- Pending moderation
- Approved
- Rejected
Do not confuse callback typesThe template lifecycle callback is not the same as the per-message delivery callback.
Use separate URLs unless you intentionally merge them behind your own gateway.
What’s Next
After reviewing the Viber Messaging resources, continue with:

