Skip to content

WhatsApp

Send WhatsApp Business messages — approved templates to start conversations, and free-form text inside an open customer service window.

Terminal window
curl -X POST https://api.9bits.net/whatsapp/ng/v1/sendwhatsapp \
-H "Authorization: Bearer 9bk_xxx" \
-H "Content-Type: application/json" \
-d '{
"to": "2348020000000",
"message_type": "template",
"template_name": "order_shipped",
"language": "en",
"params": ["Jane", "AB123"]
}'

WhatsApp is not SMS. You cannot message someone out of the blue with free text. This is Meta’s rule, not ours, and there is no way around it.

The 24-hour session window

  1. To start a conversation you must send a template that Meta has pre-approved. Nothing else is permitted.
  2. When the customer replies, a 24-hour window opens.
  3. Inside that window you can send free-form text messages.
  4. When it closes, you’re back to templates only.

So message_type: "text" only works inside an open window. Outside one it gets rejected — use message_type: "template".

Recipients must have opted in to hear from you.

Sending to people who haven’t is the fastest way to get your number’s quality rating downgraded — and Meta will eventually block it outright. Unlike SMS, where a bad campaign costs you money, on WhatsApp a bad campaign can cost you the channel permanently.

Track opt-in state via the contacts endpoints and check it before you send.

Cost depends on the template, not the message

Section titled “Cost depends on the template, not the message”

The response tells you which billing category Meta applied:

{
"message_id": "wamid.HBgNMjM0ODAyMDAwMDAwMBUCABEYEjZBNUQ2",
"status": "sent",
"cost": 32.5,
"currency": "NGN",
"category": "utility",
"sender": "2349000000000"
}

utility, marketing, authentication and service are priced differently — marketing costs the most. The category is determined by the template you use, so you commit to the price when you pick the template, not when you send.

WhatsApp uses the same scoped 9bk_ API keys as Email:

Authorization: Bearer 9bk_xxx