Skip to main content
DocsGuidesWhatsApp

WhatsApp Business API

Connect to the official Meta WhatsApp Business API to send personalized campaigns, automate conversations, and manage customer engagement at scale.

Prerequisites

A BeeCastly account (free tier works)
A Meta Business account (business.facebook.com)
A verified business phone number (not already on WhatsApp)
Business verification completed in Meta Business Manager

Setup Guide

1Connect WhatsApp in BeeCastly

Navigate to Settings → Integrations → WhatsApp in your BeeCastly dashboard.
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

WhatsApp requires pre-approved templates for outbound messages (you cannot send freeform messages outside a 24-hour window).
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

Go to Campaigns → Broadcasts → Create.
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

All incoming WhatsApp messages appear in Messages → WhatsApp.
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.

bash
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!"
  }
javascript·send-message.js
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);

Troubleshooting

Template not approved

If your template is rejected by Meta, check that it follows WhatsApp's guidelines: no promotional content in utility templates, proper formatting, and clear call-to-action buttons.

Messages not delivering

Ensure the recipient has opted in to receive messages. Check your WhatsApp Business Account health status in the Meta Business Manager.

Rate limits

WhatsApp Cloud API has rate limits. Start with small batches and scale gradually. Use the BeeCastly campaign scheduler to manage sending rates.

Frequently Asked Questions

How long does Meta verification take?
Meta Business verification typically takes 2-5 business days. Ensure your business documents are clear and match your Business Manager details.
Can I use my personal WhatsApp number?
No, you need a dedicated WhatsApp Business API number. This cannot be a personal WhatsApp or WhatsApp Business App number.
What is the cost per message?
WhatsApp charges per conversation (24-hour window), not per message. The first message in a conversation is charged; all subsequent messages within 24 hours are free.