WhatsApp Business API
Connect to the official Meta WhatsApp Business API to send personalized campaigns, automate conversations, and manage customer engagement at scale.
Prerequisites
Setup Guide
1Connect WhatsApp in BeeCastly
Click "Connect WhatsApp Business API". You'll be redirected to Meta's embedded signup flow.
Follow the prompts to select your Meta Business account and phone number.
Once connected, your WhatsApp Business Account ID, Phone Number ID, and access token are automatically configured.
2Create Message Templates
Go to Campaigns → Templates and click "Create Template".
Choose a category: Marketing, Utility, or Authentication.
Write your template with variables like
{{1}}, {{2}} for personalization.Submit for Meta review. Approval typically takes 1-24 hours.
3Send a Broadcast Campaign
Select WhatsApp as the channel.
Choose your approved template and audience (contacts, tags, or segments).
Map template variables to contact fields (name, phone, custom fields).
Preview the message, then click Send Now or Schedule.
4Manage Conversations
Reply to customers directly from the inbox — within the 24-hour window, you can send freeform messages.
Enable AI Auto-Reply to let your AI bot handle common queries automatically.
Assign conversations to team members for manual handling.
Best Practices
Maintain high quality rating
Keep your message quality rating HIGH by avoiding spam. If users block you or report messages, Meta may restrict your sending limits.
Get opt-in consent
Always get explicit opt-in before sending marketing messages. Use forms, website widgets, or in-person consent collection.
Use AI auto-reply wisely
AI auto-reply works best when you've trained your bot with relevant knowledge base articles. Always provide a way for customers to reach a human agent.
Important: 24-Hour Messaging Window
WhatsApp Business API has a 24-hour messaging window. You can only send freeform messages within 24 hours of the customer's last message. Outside this window, you must use approved templates.
API Examples
Use the BeeCastly REST API to send WhatsApp messages programmatically.
curl -X POST https://api.beecastly.com/api/whatsapp/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "+1234567890",
"message": "Hello from BeeCastly!"
}const response = await fetch('https://api.beecastly.com/api/whatsapp/send', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
phone: '+1234567890',
message: 'Hello from BeeCastly!',
}),
});
const data = await response.json();
console.log(data);