For developers · Updated 3 October 2026

Building a WhatsApp AI agent yourself

Meta's Cloud API plus an LLM looks like a weekend project. The model is the easy part. Here is the list of what production needs, and what one call to Altrnative's API does instead.

What you would build

Piece What it involves
Webhook Verify Meta's challenge, check the X-Hub-Signature-256 of every event against the right app secret, answer fast, and survive Meta retrying the same event
Routing Several numbers and apps on one endpoint; each event to the right number, tenant and conversation
The 24-hour window Free-form replies only within 24 hours of the customer's last message; a template outside it
Templates Submit for approval, map named and numbered variables, headers and buttons; handle rejections and recategorisation
Sending at scale Meta's per-number throughput and daily messaging tiers, backoff on throttling, a queue that survives a deploy
Never twice Idempotency so a retried batch doesn't message real people again
Opt-outs STOP, "unsubscribe", "band karo": honoured before every send
The agent The prompt, the whole conversation as context, what to capture, when to hand over, what never to say, and replies in the customer's language
Captured answers Structured fields from free text, merged across replies, typed, exportable
Receipts Delivered, read, failed with Meta's reason, button presses, all matched back to the right contact
Billing Meta's charge per category, and (since 1 October 2026) per reply inside the window too

Each piece is a few days; together they are months, and then they need running.

Or: one call

POST /api/v1/chats { "agent": "ag_…", "number": "+919812345678", "template_name": "visit_followup", "variables": {"1": "Riya"}, "context": "Lead L-2231, asked about Sunrise Residency 3 BHK" }

The template goes out; the agent answers every reply; GET /api/v1/chats/{id} returns the status, the messages and what the agent captured. An Idempotency-Key header makes a retry safe. Opt-outs, the 24-hour window, template checks and credit are checked before anything is sent. See the API docs.

What it costs

No monthly fee. ₹0.30 per 24-hour agent conversation, AI included, plus Meta's own charges at cost; a conversation with 6 agent replies is about ₹0.99.

When building it yourself is right

For everyone else, the agent is the part that matters, and that is the part Altrnative lets you write in plain words.

Questions

Can I build a WhatsApp AI agent with the Cloud API and an LLM?

Yes. You need a webhook with signature checks, routing per number, the 24-hour window rule, approved templates, throttling and retries, opt-outs, receipts, and the agent logic itself. Altrnative's API does all of that; you write the agent in plain words and start chats with POST /api/v1/chats.

Does Altrnative have a WhatsApp AI agent API?

Yes. POST /api/v1/chats starts a WhatsApp chat that an agent answers, GET /api/v1/chats/{id} returns its status, messages and captured fields, and GET /api/v1/agents lists your agents. Account API keys are made in the dashboard.

How much does the Altrnative API cost?

The same as the product: ₹0.30 per 24-hour agent conversation plus Meta's charges at cost, with no monthly fee and $5 free to start.

Try it on your own number

Describe your agent in plain words, test it in a chat, and put it on your WhatsApp. $5 free to start, no subscription.

Start free   Book a demo

Read next