flow makes it easy to automatically fall back to SMS for users who don’t receive the Viber message in time.
Prerequisites
- A registered Viber Business sender name. Contact SmsManager support to register one — Viber requires approval before you can send commercial messages.
- An active SmsManager API key.
- Base URL:
https://api.smsmngr.com/v2 - Authentication header:
x-api-key: YOUR_API_KEY
1
Send a Viber-only message
Add a
viber object inside your flow array. Set sender to your registered Viber Business name and optionally override the message body for the Viber channel (it defaults to the top-level body if omitted).Request body
cURL
2
Add a button
Viber Business Messages support up to one action button per message. Provide a
buttons array inside the viber object. Each button requires a title (the button label) and a url (where the button takes the user).viber flow object
3
Add an SMS fallback
Place the When the Viber TTL expires without a read, SmsManager moves to the next step in
viber step first and an sms step second in the flow array. If the recipient doesn’t read the Viber message within the TTL window, SmsManager automatically delivers the message via SMS instead.Request body
flow and sends the SMS. You receive separate webhook events for each channel attempt.TTL (time to live)
Thettl field inside the viber object sets how long (in minutes) SmsManager waits for the recipient to read the Viber message before triggering the next step in the flow. If no TTL is set, the message stays pending until the Viber platform expires it.
- If
ttlis set and the recipient reads the Viber message within the window, the flow stops there — no SMS is sent. - If
ttlexpires and the recipient has not read the message, SmsManager proceeds to the next step (for example, SMS fallback).
Viber delivery reports include a
seen status when the recipient opens the message. Use webhooks to track whether the Viber message was seen or the SMS fallback was triggered.Viber vs SMS
Using SmsManager’s
flow gives you the best of both worlds: rich Viber content for users who have the app, with guaranteed SMS delivery for everyone else.
Full cURL example
cURL
Next steps
Send WhatsApp
Send WhatsApp template and text messages with SMS fallback.
Webhooks
Track Viber delivery status and SMS fallback events via webhooks.
Batch Sending
Send Viber and SMS messages together in a single batch API call.
Send SMS
Learn more about SMS-only configuration options.