The ZeroClaw gateway is a lightweight HTTP server that accepts inbound webhooks, issues bearer tokens to paired clients, and routes Meta WhatsApp events to the agent. By default it binds toDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/openagen/zeroclaw/llms.txt
Use this file to discover all available pages before exploring further.
127.0.0.1:42617 and refuses public-interface binding unless a tunnel is active or allow_public_bind = true is set in config.toml.
Start the gateway directly or as part of the full daemon:
Authentication model
All requests exceptGET /health and GET /whatsapp require a bearer token. Obtain one by exchanging the 6-digit pairing code printed on gateway startup via POST /pair.
Endpoints
GET /health
Public health check. Returns a200 OK with a JSON body indicating gateway status. No credentials required and no sensitive information is returned.
Not required for this endpoint.
Gateway status string, for example
"ok".POST /pair
Exchanges the one-time 6-digit pairing code shown on gateway startup for a long-lived bearer token. The pairing code is valid for a single use.The 6-digit one-time pairing code printed to the terminal when the gateway starts.
Bearer token to use in the
Authorization header for all subsequent requests.Each pairing code can only be used once. If the gateway restarts, a new pairing code is generated and any existing bearer tokens issued by the previous session are invalidated.
POST /webhook
Sends a message to the agent. The gateway queues the message, runs the agent loop, and returns the response. Supply an idempotency key to prevent duplicate processing when retrying on network failure.Bearer <token> obtained from POST /pair.Optional. A unique string (UUID or similar) for this request. Duplicate requests with the same key within the deduplication window are ignored.
The prompt to send to the agent.
The agent’s reply text.
GET /whatsapp
Meta webhook verification endpoint. Meta calls this URL with query parameters to confirm your webhook subscription before enabling message delivery. No bearer token is required; verification is performed using thehub.verify_token value configured in config.toml.
Meta sets this to
"subscribe" for verification requests.Token that must match the value configured in your ZeroClaw WhatsApp channel settings.
Random string that ZeroClaw echoes back to Meta to confirm the subscription.
The raw
hub.challenge value echoed as plain text with status 200 OK.This endpoint is called by Meta’s servers during webhook setup. You do not call it yourself. Ensure the gateway is reachable from the internet via a tunnel (Cloudflare Tunnel, ngrok, Tailscale, or a custom tunnel) when registering the webhook in the Meta Developer portal.
POST /whatsapp
Receives incoming WhatsApp messages from Meta. Meta sends a signed JSON payload for each user message. Whenapp_secret is configured, ZeroClaw verifies the X-Hub-Signature-256 header before processing.
HMAC-SHA256 signature of the raw request body, prefixed with
sha256=. Required when app_secret is set in your WhatsApp channel configuration. Requests with an invalid signature are rejected with 403 Forbidden.Meta’s standard WhatsApp Business Cloud API event payload. ZeroClaw normalizes both text messages and media events before dispatching them to the agent.
Returns
200 OK to acknowledge receipt. Meta retries delivery on any non-2xx response.Endpoint summary
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /health | None | Health check |
| POST | /pair | X-Pairing-Code header | Exchange pairing code for bearer token |
| POST | /webhook | Authorization: Bearer | Send a message to the agent |
| GET | /whatsapp | Query params (Meta) | Meta webhook subscription verification |
| POST | /whatsapp | X-Hub-Signature-256 (Meta) | Incoming WhatsApp message delivery |