What is a WhatsApp session?
Definition
A session is the live connection between a WhatsApp engine and WhatsApp's servers on behalf of one linked number, plus the credentials and state that make it resumable. It is what actually sends and receives; the API around it is only a façade. When a session dies, nothing can be sent until it is restored or re-paired.
In more depth
Linking a device gives the engine a set of cryptographic keys and an identity that let it act as one of the number's companion devices. That state is persisted so the session survives a process restart, which is what separates a production setup from a script that must scan a QR every morning. Sessions have a lifecycle worth modelling explicitly in your own system: starting, waiting to be linked, connected, and stopped or failed. They end for several distinct reasons, and the difference matters: the phone's owner can unlink the device from the linked-devices screen, WhatsApp drops devices whose phone has not been seen for roughly two weeks, the engine itself can fail, and WhatsApp can ban the number outright. Wapito reports the reason on the channel webhook rather than collapsing them all into disconnected, because a ban needs a human and a restart does not. The practical consequence for anyone building on an unofficial API is that session health is a first-class operational concern, monitored like a database connection rather than assumed.
In the Wapito API
On the wire it is the field previous_status:
{
"status": "disconnected",
"previous_status": "connected",
"reason": "logged_out"
}On the official Cloud API
The Cloud API has no session to manage. Meta hosts the connection, which removes this whole class of operational work and, with it, the ability to use the number in the WhatsApp app.
Wapito is an independent product. It is not affiliated with, endorsed by, sponsored by or certified by WhatsApp or Meta Platforms, Inc. WhatsApp is a trademark of Meta Platforms, Inc.
Related terms
Related
Endpoints that use it
Feature guides
Reference
Try it on your own number
Create a channel, link a WhatsApp number by QR or pairing code, and call the API in a couple of minutes. The Sandbox plan is free and needs no card.