WhatsApp API for developers
Send WhatsApp messages from your code and receive every reply on your webhook — on every number you connected, with one API key. Built on Meta's official WhatsApp Cloud API.
- ✓ Official WhatsApp Cloud API
- ✓ Templates to any number
- ✓ Delivered & read receipts
- ✓ Test mode that never sends
Send a WhatsApp template to any number
Full reference →curl -X POST "https://api.iotabot.com/v1/messages" \
-H "Authorization: Bearer $IOTABOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel": "whatsapp",
"to": "+919812345678",
"template": {
"name": "order_update",
"language": "en_US",
"parameters": [
"#1042",
"Friday"
]
}
}' \
-H "Idempotency-Key: order-1042-shipped"{
"data": {
"id": "6a4ba0f1c3f1a2b3c4d5e733",
"object": "message",
"status": "queued",
"channel": "whatsapp",
"conversation_id": "6a4b9e21c3f1a2b3c4d5e6f7",
"created_at": "2026-10-01T09:16:10.004Z"
}
}- 1 API call
- to message any number with an approved template
- Read receipts
- sent, delivered, read or failed — on your webhook
- Every number
- you connected, behind one API key
- Test mode
- every check runs, nothing is sent
Get started with the WhatsApp API in three steps
- 1
Connect your number
Connect your WhatsApp Business number to IotaBot and create your message templates. Meta approves them.
- 2
Create an API key
In Developers → API keys, create a key with the messages:send permission — live, or test for the sandbox.
- 3
Send and receive
POST /v1/messages to send. Add a webhook endpoint to receive every customer message and delivery update.
What you can build with the WhatsApp API
Template messages to any number
Start a conversation with anyone, any time, with a Meta-approved template — variables, header image, buttons, coupon codes and one-time codes.
See how →Marketing messages
Send offers and announcements through Meta's Marketing Messages API, and check whose 24-hour window is open so a free message can go instead of a paid template.
See how →Text, images, video and documents
Reply with free text and files while the 24-hour window is open. A caption rides on the file.
See how →Incoming messages on your webhook
Every customer message is POSTed to your server the moment it arrives — signed, retried for 3 days, in order per conversation.
See how →Delivered and read receipts
Each send reports sent, delivered, read or failed with the reason — as a webhook and on GET /v1/messages/{id}.
See how →Multiple WhatsApp numbers
Choose the sending number per message with whatsapp_account_id. Replies stay on the number the customer wrote to.
See how →Test mode
Test keys run every check against sandbox data, simulate customer messages, and never send anything.
See how →WhatsApp API use cases
Order and delivery updates
Send an order confirmation or shipping update the moment your system has it, with a utility template.
OTP and verification codes
Send one-time codes with an authentication template and a copy-code button.
CRM and helpdesk sync
Mirror every WhatsApp conversation into your CRM and reply from it — your team still sees everything in IotaBot.
AI plus your own logic
Let IotaBot's AI answer, and step in from your code for the cases it should not handle.
Appointment reminders
Remind customers of bookings and let them reply to reschedule — the reply lands on your webhook.
Payment and invoice messages
Send invoices as documents and payment links as template buttons.
WhatsApp's rules, handled for you
- Free text only within 24 hours of the customer's last message — otherwise the API refuses with window_closed and you send a template.
- Templates must be approved by Meta on that number — unapproved ones are refused with template_not_approved.
- Customers who replied STOP are never messaged — refused with recipient_opted_out.
- Meta's daily messaging limit per number applies; a refused send comes back as a failed status.
What WhatsApp charges: WhatsApp API pricing — or estimate your bill with the WhatsApp cost calculator.
WhatsApp API: frequently asked questions
What is the WhatsApp API?
The WhatsApp Business API lets your software send and receive WhatsApp messages. IotaBot gives you one REST endpoint to send (POST /v1/messages) and a webhook for everything that comes back, on top of Meta's official WhatsApp Cloud API.
Is this the official WhatsApp API?
Yes. Messages go through Meta's official WhatsApp Business Platform (Cloud API) on your own WhatsApp Business account — not a QR-code session on a personal number, which risks the number being banned.
Can I message a customer who has never messaged me?
Yes, with a message template that Meta has approved. Send it with channel, to and template — the API creates the conversation. Free text is allowed within 24 hours of the customer's last message.
How much does the WhatsApp API cost?
Meta charges per template message, by category (marketing, utility, authentication) and the recipient's country, billed to your WhatsApp Business account; replies within the 24-hour customer service window are free. API messages are included in IotaBot plans. See WhatsApp API pricing for how it works.
Can I use more than one WhatsApp number?
Yes. Every number you connect is available through the same API key; pass whatsapp_account_id to choose which one sends a new conversation.
How do I receive WhatsApp messages in my app?
Add a webhook endpoint for the WhatsApp channel. IotaBot POSTs each message.received event with the message and conversation, signed with your endpoint's secret, and retries for 3 days if your server is down.
Can I test without sending real messages?
Yes. A test key (ib_test_…) runs every check against sandbox data, can simulate a customer writing in, and never sends anything or uses quota.
Does my team see messages sent through the API?
Yes. They appear in the IotaBot inbox, labelled with the API key that sent them, so an agent can take over any conversation.
One API for every channel
The same endpoints, webhooks and errors on WhatsApp, Instagram, email and website chat.
Start building with the WhatsApp API
Create a key, send your first request, and try everything in test mode before it goes live.
