WhatsApp API
WhatsApp API for AI Agents
Your AI Connector is a WhatsApp API for AI agents: send and receive WhatsApp messages from your app over REST, let an agent answer them, and get every message as a signed webhook. The same API covers Instagram, Messenger, SMS, Telegram, email, web chat, LINE, Viber, iMessage, Skool, LinkedIn, TikTok and Discord.
- Official Business API or linked number
- SendPOST /contacts/send
- Receivesigned webhooks
- MCPClaude, ChatGPT
curl https://api.youraiconnector.com/v1/contacts/send \
-X POST \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel": "whatsapp",
"phone_number": "+31612345678",
"body": "Hi! Your appointment is confirmed."
}'{
"success": true,
"message_id": "aB3dE5fG7hI9jK1lM2nO",
"contact_id": "contact123",
"channel": "whatsapp"
}Send, Answer and Receive WhatsApp Messages in Three Calls
Every request goes to https://api.youraiconnector.com/v1 with your key in the X-API-Key header. Create an agent, point WhatsApp at it, then subscribe your server to the conversation.
- Create the agent. Give it instructions and a goal, or pass
scrape_urlsand it learns your business from your website. - Route WhatsApp to it.
PUT /entry-points/channel-defaultsmakes the agent the default for new WhatsApp chats. - Listen.
POST /webhooksdelivers each new message, signed, so your app can log it, sync it or act on it.
curl https://api.youraiconnector.com/v1/agents \
-X POST \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Front Desk", "scrape_urls": ["https://example.com"] }'{ "success": true, "agent_id": "ag7HkQ2ZpLxR3mNb", ... }curl https://api.youraiconnector.com/v1/entry-points/channel-defaults \
-X PUT \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{ "channel": "whatsapp", "agent_id": "ag7HkQ2ZpLxR3mNb" }'{ "entry_point_id": "Xq81bTz0RkLm4Vw2" }/webhooksSigned message eventsWhat the WhatsApp API Covers
One key, the same calls as every other channel. Here is what you can do on WhatsApp today.
Messages
Send by phone number or contact id, list chats and read every message.
- POST
/contacts/send - GET
/chats - GET
/messages
- POST
Templates and Broadcasts
Create WhatsApp templates and send approved ones to a list.
- POST
/whatsapp-templates - POST
/broadcasts
- POST
AI Agent
Answers questions from its knowledge base, qualifies leads and books into the calendar.
- POST
/agents - GET
/appointments
- POST
Human Takeover
A person can take over any chat in the inbox and the agent steps back until they hand it back.
Voice
AI voice calls on WhatsApp, with voices and call settings per line.
/voice-calls
Customer Accounts
Platforms create an account per customer and pass
sub_account_idto run WhatsApp on it.- POST
/subaccounts
- POST
Already on another channel? The same send call takes instagram, messenger, sms or telegram. See the Instagram DM API and the comparison with 360dialog.
FAQ
WhatsApp API Questions
How do I send a WhatsApp message from my app?
Call POST /contacts/send on https://api.youraiconnector.com/v1 with channel: "whatsapp", the phone_number and a body. The response confirms the message was accepted; delivery is asynchronous. Contacts with do not disturb on are refused with a 422.
Is this the official WhatsApp Business API?
You can connect a WhatsApp Business number on the official API, which is what approved templates and broadcasts need. You can also link an existing WhatsApp number by QR code.
Can an AI agent answer WhatsApp messages automatically?
Yes. Create an agent with POST /agents, then make it the default for new WhatsApp conversations with PUT /entry-points/channel-defaults. It answers, books appointments and lets a person take over any chat.
How do I receive WhatsApp messages on my server?
Subscribe a URL with POST /webhooks. Every event carries an HMAC SHA256 signature, a timestamp and a unique delivery id.
Can I send WhatsApp templates and broadcasts?
Yes. /whatsapp-templates creates and lists templates, and /broadcasts sends to a list.
Does the agent take WhatsApp voice calls?
AI voice calls on WhatsApp are live, with voices and call settings per line through /voice-calls.
Get a WhatsApp API Key
Tell us what you are building and we reply by email with access.