WhatsApp Business API enables enterprises to communicate with customers at scale. With Zavu, you can integrate WhatsApp alongside other channels through a single unified API.
Why WhatsApp Business API?
WhatsApp has over 2 billion active users worldwide, making it one of the most effective channels for customer communication:
- 98% open rate compared to 20% for email
- Rich media support including images, documents, and interactive buttons
- End-to-end encryption for secure communications
- Global reach with presence in 180+ countries
Setting Up WhatsApp with Zavu
Step 1: Connect Your WhatsApp Business Account
Connect your number from the dashboard under Channels > WhatsApp. Meta's signup flow links your WhatsApp Business Account (business verification happens on Meta's side) and the number is attached to a sender. Then check the sender over the API:
TypeScriptimport Zavudev from '@zavudev/sdk' const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY }) // Check what the sender can do const sender = await zavu.senders.retrieve('sender_abc123') console.log('WhatsApp number:', sender.whatsapp?.displayPhoneNumber) console.log('Can send templates:', sender.whatsapp?.paymentStatus?.canSendTemplates) console.log('Active channels:', sender.channels) // includes 'whatsapp' once it is activated
Step 2: Configure Message Templates
WhatsApp requires Meta-approved templates to start a conversation outside the 24-hour window:
TypeScript// Create a new template const template = await zavu.templates.create({ name: 'order_confirmation', language: 'en', whatsappCategory: 'UTILITY', headerType: 'text', headerContent: 'Order Confirmed!', body: 'Hi {{1}}, your order #{{2}} has been confirmed. Expected delivery: {{3}}.', footer: 'Reply HELP for assistance', buttons: [ { type: 'url', text: 'Track Order', url: 'https://track.example.com/{{1}}', example: 'ORD-12345' }, { type: 'quick_reply', text: 'Contact Support' } ] }) // Submit it to Meta for approval await zavu.templates.submit(template.id, { senderId: 'sender_abc123', category: 'UTILITY', variableExamples: { var1: 'John', var2: 'ORD-12345', var3: 'January 20, 2025' } })
Approval arrives through the template.status_changed webhook.
Step 3: Send Template Messages
Once approved, send template messages to customers:
TypeScriptconst { message } = await zavu.messages.send({ to: '+1234567890', messageType: 'template', content: { templateId: template.id, templateVariables: { '1': 'John', '2': 'ORD-12345', '3': 'January 20, 2025' }, templateButtonVariables: { '0': 'ORD-12345' } // fills {{1}} in the Track Order URL } })
Interactive Messages
Inside the 24-hour window, WhatsApp supports interactive messages:
TypeScript// Send a list message await zavu.messages.send({ to: '+1234567890', messageType: 'list', text: 'How can we help you today?', content: { listButton: 'View Options', sections: [ { title: 'Support', rows: [ { id: 'track_order', title: 'Track my order' }, { id: 'return_item', title: 'Return an item' }, { id: 'billing', title: 'Billing question' } ] } ] } })
Best Practices
template.status_changed carries the current categoryLimits and Pricing
- Free plan: 2,000 WhatsApp, Telegram, Instagram and Messenger messages a month, counted in both directions
- Paid plans: no monthly message cap
- Meta's charges: Meta bills template messages by category, separately from your Zavu plan
See pricing for current plans.
Ready to integrate WhatsApp? Get started free or contact us to learn more. Join our Discord community for support and updates.