WhatsApp AI Agent
What you build: a WhatsApp identity that, when a customer messages it, is answered by an AI agent. A hosted agent replies automatically; you can also send messages yourself, pull answers from a knowledge base, and switch a conversation to a human. You can reach out first with an approved template.
Who it’s for: Nigerian D2C brands, informal commerce, POS agents, and anyone whose customers live on WhatsApp rather than email. This is Voicebip’s clearest differentiator — a genuine WhatsApp-first AI channel, not a voice tool with messaging bolted on.
WhatsApp’s 24-hour window & billing. You can freely reply within 24 hours of the customer’s last message (a “service” conversation). To message a customer outside that window you must send a pre-approved template, which opens a new billable conversation. Voicebip bills per 24-hour conversation, per category (not per message).
Prerequisites
- A WhatsApp-enabled sender (a Voicebip number with the
whatsappchannel) and itsphone_number_id. - An agent to run the conversation. A hosted agent auto-replies; a BYOM agent receives each inbound message at its
webhook_urland you compose the reply. - A webhook receiver for
message.received/message.delivered.
Step 1 — Receive an inbound message
When a customer messages your WhatsApp number, Voicebip fires message.received to your workspace webhook:
For a hosted agent this is a notification — the AI dispatcher answers automatically while the conversation’s ai_mode is ai. For a BYOM agent, the inbound message is instead POSTed to the agent’s webhook_url as a BYOMMessagingWebhookRequest ({agent_id, conversation_id, channel, from_number, to_number, inbound_message, history, metadata}) and you return the reply text.
Step 2 — Send a message yourself
To send (or when a human is driving the thread), call POST /v1/messages. All of agent_id, channel, from_number, to_number, body are required; WhatsApp also needs phone_number_id:
To ground the reply first, query a knowledge base (POST …/query), compose from the returned chunks, then send.
Step 3 — Reach out first with a template
To start a conversation (or re-engage after 24h), send a pre-approved template. Positional variables go in parameters (an array of strings, filling {{1}}, {{2}}, …):
This opens a new billable conversation window; once the customer replies you’re back in the free 24h service window.
Step 4 — Hand off to a human
Conversations carry an ai_mode. To let a human take over a thread, transition it to human (the AI dispatcher stops answering):
ai_mode values: ai (AI dispatcher answers), human (operator has taken over), closed (terminated — the next inbound message starts a fresh conversation). The PATCH is idempotent (same-mode returns changed: false). Read the full history any time via GET /v1/conversations/{id} or stream it live with GET /v1/conversations/{id}/stream (SSE).
Step 5 — Respect opt-outs (NDPR)
If a customer sends a stop keyword, Voicebip enrols them in your workspace opt-out list and further sends to that number are refused. Don’t try to bypass it. (Opt-out enforcement is automatic; you’ll see sends to opted-out numbers rejected.)
Config summary
Test it (sandbox)
The test catalogue also covers message.sent, message.delivered, and message.failed, each with a realistic Nigerian payload and a real HMAC signature. See Sandbox Mode.
Troubleshooting
Next steps
- Ground WhatsApp replies in your docs → Knowledge Base deep-dive.
- Reach customers who don’t reply on WhatsApp by also trying voice and SMS → Multi-channel cascade.
- Send WhatsApp at list scale → Campaigns deep-dive.