WhatsApp Web API: What Exists and What People Mean
Search for WhatsApp Web API and you get GitHub repositories, hosted services with monthly plans and Meta's developer docs, all answering a slightly different question. That's because there is no official WhatsApp Web API. WhatsApp Web is an app, not a developer product, and Meta has never published an interface for it.
What people mean depends on who's asking. A marketer usually wants a link that opens a chat. A developer wants to send and receive messages from code on an ordinary number. A founder wants "what WhatsApp Web does, but automated and shared with my team."
This post separates the three, explains how WhatsApp Web actually connects to your account, and covers what it takes to run software on top of that connection for more than a week.
There is no official WhatsApp Web API
Meta offers two ways to build on WhatsApp: the Business Platform (the Cloud API) and plain links. Nothing is called a WhatsApp Web API.
| What you want | What actually exists | Official? |
|---|---|---|
| A link or QR code that opens a chat with you, text prefilled | Click to chat links on wa.me | Yes, no API needed |
| Send and receive from code, with templates, at volume | The WhatsApp Cloud API | Yes |
| Automate the account you already use in WhatsApp Web | Linked-device clients and services built on them | No |
Click to chat is the one most people overlook. Per WhatsApp's help center, you put the full international number after wa.me (no zeros, brackets or dashes) and URL-encode any prefilled text:
https://wa.me/919811122233?text=Hi%2C%20I%27d%20like%20to%20book%20a%20table%20for%20Friday
It's not an API, but it matters to API users. When a customer taps that link and sends the message, they've written to you first, which on the Cloud API opens a 24-hour customer service window where you can reply without a template.
How WhatsApp Web actually connects
WhatsApp Web is a linked device: a companion with its own keys that talks to WhatsApp's servers without relaying through your phone.
Early versions of WhatsApp Web mirrored the phone, which had to stay online. Since the multi-device rebuild, which Meta's engineering team described in 2021, each companion device has its own identity and messages are encrypted separately for each device on the account. A few consequences follow:
- Pairing is a QR scan. The phone approves the new device, and from then on the device connects by itself.
- History arrives once, at link time. The phone packages an encrypted bundle of recent chats and sends it to the new device. Anything older may stay on the phone only. Our post on WhatsApp API chat history goes deeper.
- The phone can be off, but not forever. WhatsApp's help center says linked devices log out if the phone goes unused for more than 14 days.
- The phone stays in charge. Removing a device under Linked devices cuts it off immediately.
The important implication: any software that completes pairing and speaks the protocol is, to WhatsApp's servers, just another companion device. That is what every "WhatsApp Web API" really is.
The three ways people build one
Drive the browser, speak the protocol, or rent someone who does.
- Browser automation. Run the real WhatsApp Web page in a headless browser and script it: find the chat, type, press send, scrape what arrives. It behaves exactly like the web client, but each number needs a full browser process, and a change to the page's markup can break your selectors overnight.
- Protocol clients. Implement the multi-device protocol directly over a WebSocket, with no browser. Far lighter and faster, but you are tracking a protocol WhatsApp has never documented, so when it changes you wait for maintainers to catch up.
- Hosted services. Someone runs option 1 or 2 for you and sells a REST API, webhooks and a page to scan the QR code. Simplest to adopt; you trust them with the session and every decrypted message.
Open-source projects exist for both build approaches in JavaScript, Go and Python. We don't recommend any of them here, and none is endorsed by Meta. Whichever you choose, the account is subject to WhatsApp's terms, which don't authorize unofficial clients; our explainer on the unofficial WhatsApp API covers the risks in full.
What running it yourself really involves
Sending the first message takes an afternoon. Keeping a number connected and trustworthy for a year is the actual job.
If you self-host, budget for all of this:
- Session secrets. The stored auth state is equivalent to the account. Encrypt it at rest, keep it out of logs and backups that many people can read, and never run two clients on the same session.
- Reconnects and logouts. Networks drop and servers restart. The client must resume without a fresh QR scan, and detect real logouts (someone removed the device, or the 14-day rule kicked in) so a person gets alerted to rescan.
- Your own message store. There is no server-side history to query later. Whatever your client doesn't save is gone from your systems.
- Media. Download and store incoming media when it arrives rather than relying on fetching it later.
- A send queue per number. One queue, with seconds between sends, so a bug or a big import can't fire hundreds of messages at once.
- Upstream updates. Watch releases, and after each one test pairing, sending, receiving, media and groups before it touches production.
- Monitoring. Alert when a number disconnects, when sends start failing, and when replies dry up.
That list is why most teams that start with a script end up on a hosted service or a full product.
WhatsApp Web API vs the Cloud API
They solve different problems, and many businesses use both.
| Linked-device ("Web") API | WhatsApp Cloud API | |
|---|---|---|
| Number | Your existing number, phone keeps working | A number registered to the platform |
| Groups | The groups your number is in | Only new Groups API groups, for Official Business Accounts |
| Templates | None | Required outside the 24-hour window |
| Cost model | Usually a flat fee | Per delivered message, by category and country |
| Speed | Human pace | 80 messages per second per number by default |
| Buttons, lists, Flows | No | Yes |
| Status with Meta | Not authorized | Official |
If your use is OTPs, order alerts at volume or tappable buttons, go official. If it's people talking to customers on a number they already know, a linked-device service is often the better fit. For the official send call itself, see how to send a WhatsApp message by API.
Where Tenashi fits
Tenashi is the hosted kind of WhatsApp Web API, with a team workspace attached. You link your WhatsApp or WhatsApp Business number by QR scan, the same way you'd open WhatsApp Web, and Tenashi runs and maintains the session. You get a documented REST API and signed webhooks: send to a phone number or to any existing chat, including groups, check message status, and receive number.connected and number.disconnected events so someone knows when to rescan.
curl https://usetenashi.com/api/v1/messages \
-H "Authorization: Bearer $TENASHI_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "+919811122233", "text": "Hi Arjun, your table for 4 on Friday at 8 pm is confirmed."}'
Sends are queued and paced at one every 4 to 12 seconds per number, and everything lands in a shared inbox with a CRM, where messages typed on the phone show up too. The limits are the protocol's limits: no templates or buttons, not endorsed by Meta, ban risk reduced but not removed, and the phone that owns the number needs to stay in use.
Read the API docs · Get started
FAQ
Is there an official WhatsApp Web API?
No. Meta has never published an API for WhatsApp Web. Its official developer product is the WhatsApp Business Platform, mainly the Cloud API. Tools sold as a "WhatsApp Web API" connect to an ordinary account as a linked device, which WhatsApp's terms don't authorize. The only official web-adjacent feature is click to chat links on wa.me.
Does a WhatsApp Web API need my phone online?
Not continuously. Since multi-device, linked devices connect to WhatsApp on their own, so the phone can be off or offline. WhatsApp's help center says linked devices are logged out if the phone goes unused for more than 14 days, so the phone that owns the number has to be opened regularly.
Can I automate WhatsApp Web for my business?
Technically yes, by browser automation, a protocol client or a hosted service. WhatsApp's terms don't authorize it, and numbers that send spam or bulk messages get banned. It works best for conversations with people who already know you, at a human pace. For OTPs or high-volume alerts, use the official Cloud API.
What's the difference between a WhatsApp Web API and the Cloud API?
A Web API automates your existing account as a linked device: your number, your groups, no templates, flat pricing, but unofficial and slow by design. The Cloud API is Meta's hosted platform: templates outside the 24-hour window, per-message pricing, high throughput, buttons and Flows, and no access to groups your number already belongs to.
Is a wa.me link an API?
No. A wa.me click to chat link just opens a WhatsApp chat with a number, optionally with prefilled text, on the phone or in WhatsApp Web. Nothing is sent until the person presses send. It is official and free, and useful for getting customers to message you first.
There's no WhatsApp Web API from Meta, only linked devices and the people who build on them. If you want that route without running sessions yourself, read the Tenashi API docs. For every official and unofficial option side by side, see our complete guide to the WhatsApp API.