WhatsApp Business Platform
WhatsApp services that hold up when millions of people use them.
I spent six years building a WhatsApp platform at Turn.io, used for health services around the world and handling millions of messages a day. I can build your Cloud API integration, chatbot or AI agent, or fix the one you have.
Animated split view of a WhatsApp Cloud API integration. Left: a phone conversation where a user asks for help, taps reply buttons, picks from a list, gets an AI agent answer, is handed over to a nurse, and days later receives an approved template reminder. Right: the backend events behind each step, including webhook signature verification, deduplication, per-contact ordering, agent runs with tools, a 429 retry, status callbacks and the 24-hour customer service window.
Hi, I'm 30 weeks pregnant and I need some advice
Hi! I'm the Clinic Central assistant. What can I help you with?
Ask a questionBook a visitTalk to a nurse- Hi! I'm the Clinic Central assistant. What can I help you with?
Ask a question
Sure. Which topic is it about?
Choose a topic- Sure. Which topic is it about?
Symptoms
I've had headaches most afternoons this week. Is that ok?
- ✦ AI agent
Headaches are common in pregnancy, but let me check one thing first: have you noticed blurry vision, or swelling in your face or hands?
yes, sometimes my vision goes blurry
- Nurse Amina joined the chat
- Nurse Amina
Hi, I'm Nurse Amina. Headaches with blurry vision need checking today. Can you come to Clinic Central at 14:00?
Yes, I'll be there at 2
- 3 days later
- template · appointment_reminder
Reminder: your follow-up check at Clinic Central is tomorrow at 09:00. Can you confirm?
ConfirmReschedule - Reminder: your follow-up check at Clinic Central is tomorrow at 09:00. Can you confirm?
Confirm
- in
POST /webhook ← messages[0].type=text200 · 3ms - sys
verify X-Hub-Signature-256✓ - sys
dedupe by message id · wamid.HBgL…a1new - sys
enqueue → conversation process (per-contact ordering)seq 1 - out
POST /{phone-number-id}/messages · status=read200 - sys
flow "prenatal_menu" → step welcome2ms - out
POST /{phone-number-id}/messages · type=interactive/button200 · wamid…c7 - in
POST /webhook ← statuses: sent → delivered → readread - in
POST /webhook ← interactive.button_reply.id="ask"200 - sys
dedupe ✓ · enqueue → same process, in orderseq 2 - out
POST /{phone-number-id}/messages · type=interactive/list429 - sys
429 throughput limit → retry in 200ms (+ jitter)backoff - out
POST /{phone-number-id}/messages · type=interactive/list200 · wamid…d4 - in
POST /webhook ← interactive.list_reply.id="symptoms"200 - in
POST /webhook ← messages[0].type=text200 - ai
agent.run (tools: 2, 1.8s)ok - ai
├ tool.call guidelines.search → 3 chunks212ms - ai
└ tool.call risk.screenmedium - out
POST /{phone-number-id}/messages · type=text200 · wamid…e9 - in
POST /webhook ← messages[0].type=text200 - ai
agent.run → risk.screenrisk: high - hum
handover → inbox assignmentAmina · 38s - sys
agent paused for this contactpaused - out
POST /{phone-number-id}/messages · inbox agent=amina200 · wamid…f1 - in
POST /webhook ← type=text → routed to inbox200 - 3 days later
- sys
24h window closed → template "appointment_reminder" (utility)approved - out
POST /{phone-number-id}/messages · type=template200 · wamid…g3 - in
POST /webhook ← statuses: sent → delivered → readread - in
POST /webhook ← button.payload="confirm"200 - sys
appointment.confirmed · 24h window reopenedopen
Why WhatsApp services break in production
A WhatsApp prototype is easy. The hard part is what happens once real people use it: webhooks arrive twice or out of order, a campaign triggers thousands of replies in a minute, the 24-hour customer-service window closes in the middle of a conversation, a template gets paused, and the one message that mattered never gets a delivered status.
I have spent six years working on these problems at Turn.io, a WhatsApp platform used by organisations like the WHO and national health programmes to reach millions of people. That included the bulk send engine behind large public-health campaigns, the job and trigger infrastructure, the Postgres and Elasticsearch storage as message data grew by millions of rows a day, and since 2023 the AI agents that answer on WhatsApp.
What I build
Cloud API integrations. A webhook receiver that verifies X-Hub-Signature-256 against the raw body, answers fast and processes asynchronously, deduplicates by message ID and keeps each contact’s messages in order. Outbound sending that handles throttling errors, template rules and media properly.
Bulk and campaign messaging. A demand-driven pipeline with rate limiting, backpressure, retries and delivery tracking, so a campaign to a million contacts neither overwhelms your system nor gets you throttled.
Chatbots and AI agents. Conversation flows, interactive messages (buttons, lists), AI agents with tools, and a handover to human operators that doesn’t lose context. I can connect them to your CRM, EMR, booking or payments system.
Voice. WhatsApp calling combined with real-time voice models and small, fast LLMs, for conversations with low enough latency to feel natural.
How I approach it
- Map the conversations first. What are users trying to do, what must never go wrong, which messages are business-initiated and need templates?
- Design for at-least-once delivery. Everything on WhatsApp can arrive twice or late, so idempotency and ordering come first.
- Ship a thin version early and watch real traffic: delivery rates, response times, drop-off points.
- Measure and iterate. For AI agents this means evals on simulated and real conversations, not vibes.
Related
- Real-time and distributed systems: the send engine and processing behind WhatsApp at scale.
- AI agent orchestration and evals: agents that answer on WhatsApp, and how to prove they are safe.
Ways to engage
Integration build
Scoped build of a WhatsApp Cloud API integration or service, from webhook receiver to production launch.
Architecture review
One to two weeks reviewing an existing WhatsApp integration for reliability, ordering, idempotency and cost.
Embedded senior engineer
Part-time in your team for a few months while you launch or scale a WhatsApp service.
Questions
Do you work with the WhatsApp Cloud API or the On-Premises API?
New projects should use the Cloud API, which Meta hosts, and that is what I build on today. I have also worked on older setups and can help plan a migration.
Can you build an AI agent that answers on WhatsApp?
Yes. I built the agent harness that organisations use to run AI agents on WhatsApp at Turn.io, including tool use, guardrails and handover to humans. I can build the same for your service, together with the evals that show it behaves.
How do you send millions of WhatsApp messages without getting throttled?
With a send pipeline that is demand-driven, applies per-number throughput limits with a token bucket, retries throttling errors with backoff and jitter, and records every status webhook. I built this kind of engine for national public-health campaigns.
Do you only work with health organisations?
No. Most of my WhatsApp experience comes from health and social-impact services, where reliability matters a lot, but the engineering is the same for commerce, support, fintech or logistics.
Related writing
Building a reliable WhatsApp Cloud API webhook receiver at scale
How to build a WhatsApp Cloud API webhook receiver that holds up: signature checks on the raw body, fast 200s, dedup, per-contact ordering and media handling.
Backpressure in Elixir: sending millions of WhatsApp messages without falling over
Designing a bulk WhatsApp send engine in Elixir: demand-driven Broadway pipelines, per-number token buckets, retries with jitter and batched status tracking.
How to partition a 1 TB PostgreSQL table without downtime: the default-partition method
Partition a live 1 TB Postgres table without downtime: attach it as the DEFAULT partition, copy history out with Oban jobs, then swap in one short transaction.
PostgreSQL partitioning in practice: partition keys, pruning, indexes and retention
How PostgreSQL partitioning behaves in practice: choosing the key and size, checking pruning with EXPLAIN, indexes, keys, retention and the Ecto gotchas.