developer reference
WhatsApp-Use API and MCP.
Create a free API key, let the platform provision the hidden runtime, then call WhatsApp through REST or connect MCP through OAuth. The hosted agent harness uses the same account boundary and hidden runtime.
introduction
Introduction
WhatsApp-Use exposes one public platform endpoint. Your API key grants scoped access to a WhatsApp connection whose hidden runtime owns pairing, message access, MCP tools, hosted agent turns, and webhook delivery.
quickstart
Quickstart
Start with REST from any backend or connect a remote MCP client through OAuth. Modern clients can use client-ID metadata documents or dynamic registration, then authorization-code + PKCE. REST API keys and MCP OAuth grants are separate credential surfaces that can target the same hidden runtime.
export WHATSAPP_USE_BASE_URL="https://api.whatsapp-use.com"
export WHATSAPP_USE_API_KEY="wuse_live_..."
curl "$WHATSAPP_USE_BASE_URL/v1/me" \
-H "Authorization: Bearer $WHATSAPP_USE_API_KEY"
curl "$WHATSAPP_USE_BASE_URL/v1/whatsapp/status" \
-H "Authorization: Bearer $WHATSAPP_USE_API_KEY"# Add this hosted MCP URL in a modern MCP client.
https://api.whatsapp-use.com/mcp/whatsapp
# Compatibility for stdio-only clients.
npx mcp-remote https://api.whatsapp-use.com/mcp/whatsapp# Add this hosted MCP URL in a modern MCP client.
https://api.whatsapp-use.com/mcp/agent
# Compatibility for stdio-only clients.
npx mcp-remote https://api.whatsapp-use.com/mcp/agentauth
Authentication
Generate keys in the dashboard. Keys are shown once and should stay in your own backend or local secret manager. Send them towhatsapp-use-backend as an Authorization bearer token for HTTPS API routes. MCP clients use OAuth against the hosted remote MCP URL, not dashboard API keys.
# Generate a key
open https://api.whatsapp-use.com/app/keys
# Call the platform
curl "https://api.whatsapp-use.com/v1/me" \
-H "Authorization: Bearer wuse_live_..."rest
REST and OAuth reference
Public developer traffic enters through https://api.whatsapp-use.com. WhatsApp and hosted-agent runtime services are private implementation details; the backend validates credentials, records usage, and forwards signed internal requests to the correct connection runtime.
Platform REST
Account, runtime, usage, and webhook routes are served by whatsapp-use-backend and authenticate with dashboard API keys.
WhatsApp REST
WhatsApp routes are proxied through whatsapp-use-backend into the hidden per-connection WhatsApp runtime.
Agent REST
Hosted agent routes are proxied through whatsapp-use-backend into the hidden agent harness runtime.
MCP and OAuth
MCP clients use OAuth bearer tokens, not REST API keys. Both remote MCP endpoints are served by the public backend gateway.
conventions
Conventions
A few patterns apply across every tool. Read these once and the rest of the reference becomes a lot shorter.
Platform boundary
Developer traffic enters through whatsapp-use-backend. Hidden runtime services receive signed internal requests, not raw public API keys.
API keys
Keys are shown once at creation or rotation. The platform stores a peppered HMAC hash, not the raw bearer secret. Send keys from server-side code, SDKs, and HTTPS API calls. MCP clients use OAuth.
MCP OAuth
Modern remote MCP clients use OAuth authorization-code + PKCE with rotating refresh tokens. Client-ID metadata documents are preferred, dynamic registration remains available, and dashboard-created grants are only a manual testing path.
Runtime isolation
Each WhatsApp connection maps to its own hidden runtime. API keys and MCP grants are credentials attached to that connection; rotating or revoking them does not stop the runtime.
Memory
Agent memory lives behind whatsapp-use-agent-harness and uses HelixDB when configured. The model worker does not receive Helix credentials.
Webhooks
Runtime events are delivered to webhook endpoints configured in the dashboard. Deliveries are signed by whatsapp-use-backend.
connection
Connection tools
Pair the hidden runtime, inspect connector status, and read incremental WhatsApp state for the API key.
Get WhatsApp connection, pairing, and connector status.
Start WhatsApp pairing and return the current pairing result.
Read the current pairing status and QR data when available.
Read changed conversations, contacts, and messages after a sync cursor.
messages
Message tools
List messages, download stored media, send text, mutate messages, and track the durable command outbox.
List messages in a WhatsApp conversation. Requires a conversation_id returned by sync.
Download stored WhatsApp media for a message as base64 plus MIME metadata.
Send a WhatsApp text message through the runtime connector using conversation_id or contact_id.
React to a WhatsApp message, or clear the current reaction with an empty emoji.
Edit a sent WhatsApp message by conversation_id or chat JID and wa_message_id.
Delete or revoke a sent WhatsApp message.
Mark one or more WhatsApp messages as read.
Create a WhatsApp group with an initial subject and participants.
Add, remove, promote, or demote WhatsApp group participants.
Unlink the paired WhatsApp device and clear runtime WhatsApp state.
Escape hatch for lower-level command kinds when a first-class tool is not enough.
Read a queued WhatsApp command status and result by command_id.
agent
Hosted agent MCP
OAuth-connected MCP clients can call the hosted agent harness MCP endpoint. It runs sessions, turns, durable events, and Helix-backed memory behind the platform boundary.
Create a durable hosted-agent session for an API key runtime.
Read a hosted-agent session and its turns.
Run a hosted agent turn with WhatsApp tools and harness memory available.
Read durable session and turn events from the harness store.
Close a hosted-agent session.
Search harness memory through the Helix-backed memory boundary.
Write memory through the harness API, not from the model worker.
Create a durable hosted-agent background task.
List durable hosted-agent background tasks.
Update task state, title, goal prompt, trigger kind, or metadata.
Create a child-task record under a hosted-agent session.
List child-task records under a hosted-agent session.
Cancel a child-task record under a hosted-agent session.
Record and dispatch a user-facing hosted-agent notification.
Schedule or replace a hosted-agent reminder/check-in.
Cancel a hosted-agent reminder/check-in.
notifications
Notifications
Runtime events are delivered through dashboard-configured webhooks. WhatsApp Use backend receives signed internal events from the hidden WhatsApp and agent runtimes, records delivery history, and signs outbound webhook requests.
errors
Errors
Tool errors return a JSON body with a code, a human-readable message, and optional fields for validation issues. HTTP-style status codes are surfaced for parity.