Introduction
WhatsApp Business API allows you to automate conversations with customers on WhatsApp, the world's most popular messaging platform.
Benefits:
- Access to 2+ billion WhatsApp users
- 98%+ open rates (vs. 20% email)
- Multimedia support (images, video, documents)
- Official verification (green checkmark)
WhatsApp Business API is different from the WhatsApp Business app. The API requires a Business Solution Provider (BSP).
Prerequisites
1. Facebook Business Manager Account
- Create an account at business.facebook.com
- Verify business identity
2. Dedicated Phone Number
- Cannot be used on personal WhatsApp
- Must be able to receive SMS for verification
3. Business Solution Provider Bravin AI recommends:
- Twilio
- MessageBird
- 360Dialog
Facebook verification process takes 3-5 business days.
Provider Setup
Step 1: Register with BSP Choose a provider and create an account. For Twilio:
Never share Twilio credentials publicly or in frontend code!
TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_AUTH_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_PHONE_NUMBER=+1234567890Configure Webhooks
Webhooks are essential for receiving messages in real-time.
In Twilio Console:
- Go to Phone Numbers → Active Numbers
- Select your WhatsApp number
- Under "When a message comes in", set:
Bravin AI automatically processes all received messages and routes them to the AI agent.
https://api.bravin.ai/webhooks/whatsapp/YOUR_ACCOUNT_IDMessage Templates
WhatsApp requires approved templates to initiate conversations (first 24h).
Create a Template:
- Go to WhatsApp → Message Templates
- Click Create Template
- Define name, category, language
- Add content with variables
Templates are reviewed by WhatsApp within 24-48 hours. Make sure they comply with their policies.
Hi {{1}}! 👋
Your order #{{2}} has been confirmed and will arrive in {{3}} days.
Questions? Message us anytime!Test Integration
1. Test Inbound Message
- Send a WhatsApp message to your connected number
- Check Dashboard → Conversations
- You should see the message and agent response
2. Test Outbound Message
- Use an approved template
- Send from Dashboard to your number
- Verify receipt and formatting
Test with 3-5 complete conversations before announcing to customers.
Best Practices
1. Respect 24h Window
- After customer message, you have 24h for free responses
- Then you must use templates
2. Explicit Opt-in
- Get customer permission for WhatsApp
- Provide opt-out option
3. Monitor Rating
- WhatsApp Rating must be > 80% (High Quality)
- Below 80% = warning, below 60% = restrictions
4. Respond Quickly
- Target: < 5 minutes for first interaction
- Use AI agent for 24/7 availability
Violating WhatsApp policies can lead to permanent account suspension.