flow, so you can add an SMS fallback for recipients not reachable on WhatsApp.
Two WhatsApp message types
Before you write any code, it’s important to understand which message type fits your use case:- Template messages (
whatsapp_template) are pre-approved message formats registered through Meta. You can send them to any recipient who has opted in to receive messages from your business, at any time. Use these for order updates, shipping notifications, appointment reminders, and OTPs. - Text messages (
whatsapp_text) are free-form messages you compose at send time. You can only send them within the 24-hour customer service window — that is, within 24 hours after the recipient last sent you a message. Use these for support conversations and interactive replies.
Prerequisites
- A WhatsApp Business Account connected to SmsManager. Follow the setup wizard at app.smsmanager.com/whatsapp.
- Your Phone Number ID from app.smsmanager.com/whatsapp — this is the numeric ID (not the phone number itself) that identifies your WhatsApp sender.
- For template messages: a pre-approved template in Meta Business Manager, with the exact template name and language code.
Send a WhatsApp template message
1
Register your WhatsApp number and get your Phone Number ID
Log in to app.smsmanager.com/whatsapp and complete the WhatsApp Business Account connection flow. Once connected, copy the Phone Number ID shown on the dashboard — it is a long numeric string like
514578330250514. You will use this as the sender value in all your WhatsApp API calls.2
Create and approve a template via Meta/SmsManager
Create your message template inside Meta Business Manager or through the SmsManager dashboard. Templates must be approved by Meta before you can send them. Approval typically takes a few minutes to a few hours. Note the exact template name (lowercase, underscores) and language code (for example,
en, cs, de) — you will need both in the API request.3
Send the template message
Use the
whatsapp_template key inside your flow array. Set sender to your Phone Number ID, template_name to the approved template name, and language to the template language code. If the template contains variable placeholders (numbered like {1}, {2}, etc.), pass their values in the params array.Request body
cURL
4
Add an SMS fallback for reliability
Append an
sms step to the flow array. If the WhatsApp message cannot be delivered (for example, the recipient doesn’t have WhatsApp or the number is not opted in), SmsManager automatically falls back to SMS.Request body
Send a WhatsApp text message
Usewhatsapp_text in your flow to send a free-form message during an open conversation window:
Request body
Template parameters
WhatsApp templates can contain variable placeholders in three locations. Use the corresponding parameter arrays to fill them at send time:Full parameters example
The order of values in each
params array maps positionally to the numbered placeholders in your template. Make sure the array length matches the number of variables in the template or the request will be rejected.Full examples
Next steps
Send Viber
Add Viber Business Messages with rich content and SMS fallback.
Webhooks
Receive WhatsApp delivery status updates and incoming message events.
Batch Sending
Send WhatsApp messages to multiple recipients in a single API call.
Send SMS
Configure SMS fallback options for your WhatsApp messages.