Skip to main content
The prepared customer API exposes the same transport reads and chat-state actions used by the signed-in console. Browser sessions keep their own origin/CSRF controls; customer keys remain server-side. A shared handler never grants one caller another caller’s authority.

Verify installed capabilities

GET /api/v1/capabilities requires status:read. It reports contractVersion and feature booleans. Check it before depending on additive routes; an older installation may return 404. inboxReadOnly describes the current transport gate, not a promise that your key has sending permission. GET /api/v1/updates?after=revision requires messages:read and waits for an Inbox change revision. It contains no message bodies. Revisions are refresh hints, not durable event cursors. Use events for persistent integrations.

Exact messages, access and pictures

  • GET /chats/{chatId}/messages/{messageId} requires messages:read and positive account/chat/message proof. It returns an accountId, chatId and display-safe message. It does not mark the chat read or download an attachment.
  • GET /chats/{chatId}/access requires the separate opt-in chats:access:read. It returns verified self/participant aliases, native roles and a membership hash. An LID is not a phone number. This response is evidence, not a Dietboite staff identity or permission grant.
  • GET /chats/{chatId}/picture requires chats:read. It returns validated private PNG/JPEG/WebP bytes when available, with a 1 MiB bound. The SDK’s downloadPicture returns the same bounded byte/response wrapper as media downloads.
Use opaque returned IDs. Missing profile names or pictures must remain unavailable, not invented.

Explicit chat actions

POST /chats/{chatId}/actions requires chats:write, the selected chat and a stable Idempotency-Key. Its body is exactly { "action": "read" }, unread, archive or unarchive. Reading a chat or history never implies this action.
An unknown action stays locked. Inspect the original operation and actual chat state; never automatically retry with another key.

Two different histories

GET /history requires history:read. It exposes only currently selected-chat records from the latest 100 transport records, before filtering. Text is omitted without messages:read. This is an operations log, not complete WhatsApp history. GET /groups/{groupId}/history requires both history:read and messages:read, plus selected-group access and current membership. It exposes the retained group text/caption index with ISO since/until, ascending after cursor and limit 1–200 (default 100). Keep the same date range while paging with nextCursor. Results include coverage and recordedSince; they do not claim older backfill or media content. The SDK maps these to capabilities, updates, access, message, downloadPicture, chatAction, history and groupHistory. API scopes and installed capability checks remain authoritative.