Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jihvijhojhviihogyuvi/whatsapp-api/llms.txt

Use this file to discover all available pages before exploring further.

The /api/status endpoint returns a snapshot of the internal WhatsApp Web client — its connection lifecycle state, Chrome configuration, QR availability, and the authenticated account’s details when connected. Poll this endpoint to drive UI feedback or to gate downstream API calls on ready: true.

Endpoint

GET /api/status
No request parameters are required.

Response Fields

state
string
required
The current lifecycle state of the WhatsApp Web client. Possible values:
ValueMeaning
stoppedClient has not been started yet (or was logged out)
startingChrome is launching and client.initialize() is running
qrA QR code has been generated; waiting for the user to scan it
authenticatedQR was scanned; session credentials are being saved
readyFully connected and ready to send/receive messages
auth_failureAuthentication failed; see last_error for details
disconnectedClient was previously ready but lost the connection
ready
boolean
required
true when the client is in the ready state and all messaging endpoints are safe to call.
authenticated
boolean
required
Mirrors ready. Set to true at the same time the ready flag becomes true.
auth_dir
string
required
Absolute filesystem path to the directory where whatsapp-web.js stores LocalAuth session credentials. Defaults to ../.wwebjs_auth relative to the project root, configurable via WHATSAPP_AUTH_DIR.
chrome_executable
string
required
Absolute path to the Chrome binary that will be launched by Puppeteer. Configurable via WHATSAPP_CHROME_EXECUTABLE.
headless
boolean
required
true when Chrome is configured to run without a visible window (WHATSAPP_HEADLESS=true). Defaults to false.
has_qr
boolean
required
true when a QR code is currently available at GET /qr. Becomes false once the client reaches the ready state (the QR is cleared on successful auth).
last_error
string | null
required
The most recent error message, or null if no error has occurred. Populated on auth_failure and disconnected states.
account
object | null
required
Account details for the authenticated WhatsApp identity. null when the client is not yet ready.

Example Request

curl http://127.0.0.1:8790/api/status

Example Response

The following shows a fully authenticated, ready client:
{
  "state": "ready",
  "ready": true,
  "authenticated": true,
  "auth_dir": "/home/user/whatsapp-mcp-api/.wwebjs_auth",
  "chrome_executable": "/usr/bin/google-chrome",
  "headless": false,
  "has_qr": false,
  "last_error": null,
  "account": {
    "wid": "15551234567@c.us",
    "pushname": "Alice",
    "platform": "smba"
  }
}
GET / and GET /health return the same status object nested inside a larger envelope that also includes the server name and MCP endpoint URL:
{
  "ok": true,
  "name": "whatsapp-mcp-api",
  "mcp": "http://127.0.0.1:8790/mcp",
  "status": { ... }
}
Use GET /api/status when you only need the WhatsApp client state.

Build docs developers (and LLMs) love