Viber
Viber Business Messages
Message types and templates
Use Viber message templates

Use Viber message templates

Copy as markdown

|

View as Markdown

Viber message templates allow you to send pre-approved transactional notifications and one-time passwords (OTP) to end users at scale.

IMPORTANT

Template management endpoints (/viber/1/senders/{sender}/templates) are in Early Access. Your account must have the viber-bm:manage scope enabled before you can use these endpoints. Contact your Infobip account manager to enable the scope.



Create and register a Viber message template

You can create and register a Viber message template using the web interface or the Viber Business Messages API.

NOTE

To ensure template approval, follow the constraints listed in Template body constraints and the compliance guidelines.


Message templates over the web interface

To create and register a Viber message template in the web interface:

  1. Log in and go to Channels and Numbers > Channels > Viber for Business.
  2. Select the Senders tab.
  3. Select the sender, then select Create a Template.
  4. Select the template category: Transactional or OTP.
  5. In the Design tab, enter the message content and insert parameters using the curly brace icon.
  6. Select Register Template and save the generated Template ID.

To view submitted templates, select View Templates for the sender on the Senders tab.

For detailed steps with screenshots, see Create and send templates.


Message templates over the API

Using the Viber Business Messages API, you can create, retrieve, send, and delete your templates.

MethodPathSuccessDescription
POST/viber/1/senders/{sender}/templates201 CreatedRegister a new transactional or OTP template for your sender.
GET/viber/1/senders/{sender}/templates/{templateId}200 OKRetrieve a template and its approval status.
POST/viber/2/messages200 OKSend an approved template to one or more recipients.
DELETE/viber/1/senders/{sender}/templates/{templateId}204 No ContentPermanently remove a template.

All endpoints accept the following authentication methods: API key header (Authorization: App {api-key}), API key query parameter, HTTP Basic, or OAuth 2.0. For details, see API authentication.

For full endpoint specifications, see the Viber Business Messages API reference (opens in a new tab).



Template categories

There are two message template categories available, depending on your use case.


Transactional

Send non-OTP notifications such as order confirmations, delivery updates, and appointment reminders. Transactional templates support up to 5 named parameters for personalization.

For step-by-step instructions, see Transactional templates.


OTP

Send one-time passwords and verification codes for authentication flows. OTP templates must include a parameter named {{pin}} in the template body.

For step-by-step instructions, see Create and send templates.



Template body constraints

The following table describes the constraints that apply to all template categories.

ConstraintValue
Maximum body length875 characters
Maximum parameters5
Separator ruleAt least 3 non-whitespace, non-punctuation characters must appear between any two consecutive placeholders. Short prepositions such as "at", "to", or "on" (2 characters) cause rejection.
Ending ruleAt least 3 non-punctuation characters must follow the last placeholder. Currency symbols and punctuation alone are not sufficient.
Per-variable character limitEach placeholder value must not exceed 25 characters at send time.
Last word restrictionThe last word of the template body cannot be a placeholder.
OTP required parameterOTP templates must include a parameter named {{pin}}.


Template statuses

After creation, templates go through an approval process. The following statuses indicate where a template is in that process.

StatusMeaningAction
PENDINGAwaiting reviewWait and poll again. Send only after the status changes to APPROVED.
APPROVEDPassed review and ready to useProceed to send.
DECLINEDDid not pass reviewReview the template text against the compliance guidelines and create a revised template.
NOTE

Approval typically completes within seconds but can take up to 24 hours. Common decline reasons include the last word being a placeholder or the content containing promotional material.



Supported languages

Templates support 40 languages. Specify the language code when creating a template.







Need assistance

Explore Infobip Tutorials

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary
Service status

Copyright @ 2006-2026 Infobip ltd.

Service Terms & ConditionsPrivacy policyTerms of use