WhatsApp Business API enables high-engagement messaging with rich features like images, documents, interactive buttons, and more.
When to Use WhatsApp
- Customer support: Rich media and quick replies
- Marketing campaigns: Higher open rates than SMS (90%+ vs 20%)
- Order updates: Detailed information with images and tracking
- International messaging: Often cheaper than SMS
Basic WhatsApp Message
const result = await zavu.messages.send({
to: "+14155551234",
text: "Hello from Zavu!",
channel: "whatsapp",
});
The 24-Hour Conversation Window
WhatsApp enforces a conversation window that determines what types of messages you can send:
User sends message → 24-hour window opens → Send any message type
↓
Window expires → Template messages only
| Message Type | Within 24h | After 24h |
|---|
| Text (session) | Yes | No |
| Media (session) | Yes | No |
| Interactive (session) | Yes | No |
| Template (pre-approved) | Yes | Yes |
Sending a session message outside the 24-hour window will fail. Use templates for messages outside the window.
Message Types
WhatsApp supports rich message formats beyond plain text:
Session Messages (within 24h window)
| Type | Use Case | Guide |
|---|
| Text | Simple messages | Text |
| Image | Product photos, receipts | Image |
| Video | Tutorials, promotions | Video |
| Audio | Voice notes, announcements | Audio |
| Document | PDFs, invoices | Document |
| Sticker | Engagement, branding | Sticker |
| Location | Store location, delivery | Location |
| Contact | Share contact info | Contact |
| Buttons | Quick actions | Buttons |
| List | Multiple options | List |
| Reaction | Acknowledge messages | Reaction |
Template Messages (anytime)
Pre-approved messages that can be sent outside the 24-hour window. See Templates Guide.
Delivery Status
WhatsApp provides detailed delivery tracking:
| Status | Description |
|---|
queued | Message accepted by Zavu |
sent | Sent to WhatsApp servers |
delivered | Delivered to user’s device |
read | User opened the message |
failed | Delivery failed |
WhatsApp is the only channel that provides “read” receipts, useful for tracking engagement.
Quality Rating
Meta tracks your messaging quality. Maintain good standing by:
- Getting opt-in consent before messaging
- Respecting user preferences - stop messaging users who don’t respond
- Sending relevant content - avoid spam-like messages
- Responding promptly - engage within the 24-hour window
Low quality ratings can result in reduced messaging limits or account suspension.
Common Errors
| Error | Cause | Solution |
|---|
Outside 24h window | Session expired | Use a template message |
Template not approved | Template pending/rejected | Wait for approval or fix issues |
Invalid phone format | Wrong number format | Use E.164 format (+country code) |
User not on WhatsApp | Recipient doesn’t have WhatsApp | Fall back to SMS |
Rate limited | Too many messages too fast | Slow down sending rate |
Next Steps