Requirements
Before sending WhatsApp messages through Zexa, ensure the following are in place:- WhatsApp Business account linked to Zexa via the dashboard under Channels > WhatsApp.
- Approved message templates for any outbound marketing or notification messages sent outside an active customer conversation window.
- Recipient opt-in — contacts must have explicitly agreed to receive WhatsApp messages from your business.
Message types
WhatsApp distinguishes between two categories of messages, each with different rules: Session messages A session message is any free-form message sent within a 24-hour window that opens when a customer messages your business first. During this window you can send text, images, documents, and other rich content without using a pre-approved template. Template messages A template message is a pre-approved message format used to initiate or continue a conversation outside the 24-hour session window. Templates are required for outbound notifications such as order updates, appointment reminders, and delivery alerts. See Message Templates for instructions on creating and submitting templates for approval.WhatsApp template approval typically takes 1–2 business days. Submit your templates in advance to avoid delays.
Send a WhatsApp message via API
Send aPOST request to /messages with "channel": "whatsapp" to deliver a message via WhatsApp.
201 response with the message object:
Template messages
If you need to send a message to a customer who has not contacted you in the last 24 hours — for example, a shipping notification or a payment reminder — you must use an approved template. Attempting to send a free-form message outside the session window will result in an error. To use a template, include thetemplate_id and any variable values in your request body alongside the channel field. Full details are available in the Message Templates guide.
Next steps
Message Templates
Create, submit, and manage WhatsApp message templates for outbound notifications.
Sender IDs
Register the WhatsApp Sender ID associated with your Business account.
