Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(sdk): document every method the clients ship, and gate it
Yudhi Armyndharis385369e3c8ff
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex c5163de5d..818b63559 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -64,6 +64,12 @@ jobs:- name: Check SDK webhook events against the contractrun: npm run check:sdk-events+ # Same reason again: a docs-only PR matches none of sdk-ci.yml's path filter, and the drift this+ # catches is a documentation one — fourteen feature commits shipped a client method that the+ # design doc never learned about.+ - name: Check SDK docs cover the shipped client surface+ run: npm run check:sdk-docs+# Deliberately its own job rather than a step inside Lint. `npm audit` reports against the# advisory database, not against the diff, so a newly published advisory turns red on unrelated# PRs. While it lived as the first step of Lint, that failure aborted the job before ESLint, thediff --git a/CHANGELOG.md b/CHANGELOG.mdindex 7a3a2ddaa..bbfb6daba 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- `docs/29-engine-capability-matrix.md` (`docs/29`) now covers all 152 Baileys socket methods, all 81 whatsapp-web.js Client methods, all 34 + 31 library events and all five install-time patches, each mapped to the interface method that uses it or marked unexposed.- An onboarding modal the "What's new" probe does not recognise is now logged once with its heading and confirm-button labels (`onboarding_dialog_unrecognized`), so it can be covered via `WWEBJS_ONBOARDING_CONTINUE_LABELS` before WhatsApp unlinks the companion. Refs #1072.- `npm run check:sdk-events` compares each typed SDK's webhook event list to the contract, so an event the gateway accepts can no longer be missing from the SDKs.+- `npm run check:sdk-docs` compares the SDK design doc and the coverage tables to the shipped client surface, so a client method can no longer ship undocumented.### Fixed@@ -25,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- The chat-media retention purge and orphan sweep now run while `CHAT_MEDIA_ARCHIVE_ENABLED` is off; previously turning archiving off stopped both, leaving files past their TTL and crash-leftover orphans in the store indefinitely. Note the consequence for a deployment that has archiving off: the orphan sweep now deletes any file under the `chat-media/` prefix that no message row references, once it has been unreferenced for the grace window (`CHAT_MEDIA_ORPHAN_GRACE_MS`, default 1h). A file a surviving row points at is never touched.- A plugin whose code went missing is recoverable through the API again: reinstalling now writes over its surviving `ctx.storage` directory instead of answering `409`, and uninstalling a known-but-unloaded id no longer answers `404`.- A sticker sent through the Baileys engine no longer reaches WhatsApp as non-WebP bytes labelled `image/webp`; the adapter converts `image/*` to a 512×512 WebP before the socket, passes genuine WebP through byte-identical, and refuses anything it cannot convert with a `400` instead of reporting success.+- `docs/18-sdk-design.md` and the SDK READMEs now list every method the five clients ship: the whole `media` resource plus 26 methods across nine others were missing, so server-side media conversion, presence subscription, session config and webhook delivery diagnostics read as unavailable.### Securitydiff --git a/docs/09-testing-strategy.md b/docs/09-testing-strategy.mdindex 68916f817..d60a24625 100644--- a/docs/09-testing-strategy.md+++ b/docs/09-testing-strategy.md@@ -234,17 +234,17 @@ on broad integration coverage.Main CI is defined in `.github/workflows/ci.yml`.-| Job | Checks |-| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| `lint` | backend ESLint, full-program TypeScript check, formatting, version consistency, .dockerignore context, OpenAPI snapshot, SDK routes and webhook events against the contract |-| `audit` | dependency security audit |-| `test` | backend coverage run, script unit tests (node:test), e2e smoke tests, Codecov upload |-| `test-postgres` | real PostgreSQL 16 service, backend build, migration smoke, and PostgreSQL FTS provider spec |-| `dashboard` | dashboard install, lint, formatting, type-check, i18n parity, build, unit tests |-| `scripts-smoke` | shellcheck on `docker-entrypoint.sh` and every `scripts/*.sh`, plus the backup/restore smoke test |-| `chart` | helm lint, helm template with default and fully-toggled values, kubeconform on both renders, actionlint on the workflows |-| `build` | backend build after lint/audit/test/dashboard/scripts-smoke/chart jobs pass |-| `docker` | multi-arch Docker build on pushes and pull requests; publishes to GHCR only on push, so fork pull requests validate both architectures without publishing |+| Job | Checks |+| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |+| `lint` | backend ESLint, full-program TypeScript check, formatting, version consistency, .dockerignore context, OpenAPI snapshot, SDK routes and webhook events against the contract, SDK docs against the shipped client surface |+| `audit` | dependency security audit |+| `test` | backend coverage run, script unit tests (node:test), e2e smoke tests, Codecov upload |+| `test-postgres` | real PostgreSQL 16 service, backend build, migration smoke, and PostgreSQL FTS provider spec |+| `dashboard` | dashboard install, lint, formatting, type-check, i18n parity, build, unit tests |+| `scripts-smoke` | shellcheck on `docker-entrypoint.sh` and every `scripts/*.sh`, plus the backup/restore smoke test |+| `chart` | helm lint, helm template with default and fully-toggled values, kubeconform on both renders, actionlint on the workflows |+| `build` | backend build after lint/audit/test/dashboard/scripts-smoke/chart jobs pass |+| `docker` | multi-arch Docker build on pushes and pull requests; publishes to GHCR only on push, so fork pull requests validate both architectures without publishing |SDK CI is defined in `.github/workflows/sdk-ci.yml` and is path-filtered to SDK sources plus servercontract surfaces that SDKs mirror (`src/**/dto/**`, `src/**/*.controller.ts`, `src/**/*.service.ts`, anddiff --git a/docs/18-sdk-design.md b/docs/18-sdk-design.mdindex e2f3a78d7..aa63007e6 100644--- a/docs/18-sdk-design.md+++ b/docs/18-sdk-design.md@@ -28,20 +28,21 @@ All five SDKs expose the same fluent surface:| Resource | Methods || ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| `sessions` | list, get, create, delete, start, stop, logout, forceKill, getQrCode, requestPairingCode, stats |+| `sessions` | list, get, getConfig, updateConfig, create, delete, start, stop, logout, forceKill, getQrCode, requestPairingCode, stats || `messages` | list, sendText, sendImage/Video/Audio/Document/Sticker, sendLocation, sendContact, sendTemplate, sendPoll, reply, forward, react, delete, editMessage, history, reactions, media, pin, unpin, star, votePoll, sendBulk, batchStatus, cancelBatch || `contacts` | list, get, check, profilePicture, profilePictures, phone, upsert, delete, block, unblock |-| `groups` | list, get, create, joinGroup, add/remove/promote/demoteParticipants, setSubject, setDescription, getGroupSettings, updateGroupSettings, leave, getPicture, setPicture, deletePicture, inviteCode, revokeInviteCode |-| `webhooks` | list, get, create, update, delete, test |-| `chats` | list, markRead, markUnread, archive, clearMessages, delete, sendState |-| `labels` | list, get, forChat, addToChat, removeFromChat _(WhatsApp Business)_ |-| `channels` | list, get, messages, subscribe, unsubscribe _(Newsletters)_ |+| `groups` | list, get, create, joinInfo, joinGroup, add/remove/promote/demoteParticipants, setSubject, setDescription, getGroupSettings, updateGroupSettings, leave, getPicture, setPicture, deletePicture, inviteCode, revokeInviteCode |+| `webhooks` | list, listAll, deliveryFailures, get, create, update, delete, test |+| `chats` | list, subscribePresence, getPresence, markRead, markUnread, archive, clearMessages, delete, sendState |+| `labels` | list, get, chats, upsert, delete, forChat, addToChat, removeFromChat _(WhatsApp Business)_ |+| `channels` | list, get, messages, create, delete, mute, subscribe, unsubscribe _(Newsletters)_ || `catalog` | info, products, product, sendProduct, sendCatalog _(WhatsApp Business)_ |-| `status` | list, fromContact, media, sendText, sendImage, sendVideo, delete _(Stories)_ |+| `status` | list, fromContact, media, sendText, sendImage, sendVideo, sendVoice, delete _(Stories)_ || `search` | search || `templates` | list, get, create, update, delete || `profile` | setProfileName, setProfileStatus, setProfilePicture || `calls` | rejectCall |+| `media` | conversionStatus, convertVoice, convertVideo _(OPERATOR)_ || `health` | check, live, ready |> The SDKs cover the user-facing resources above and stop there. The administrative and operational surfaces are deliberately left out — `auth/api-keys`, `audit`, `settings`, `stats`, `automation`, `infra`, `plugins` and the `integration` management routes are predominantly `ADMIN`-gated; `metrics` is a `@Public()` Prometheus scrape gated by `METRICS_TOKEN` rather than by role; `mcp` is a Streamable-HTTP transport mounted straight onto the Express adapter; and `ingress` is the `@Public()` receiver that integration providers post into. `docker` has no HTTP surface at all — it is an internal service module. Methods that require an `OPERATOR`-level key are annotated **OPERATOR** in the per-language tables below.@@ -126,6 +127,8 @@ The top-level client also exposes:| Method | Signature | Description || -------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- || `list` | `list()` | List all sessions (scoped to the key's `allowedSessions`). |+| `getConfig` | `getConfig(id)` | Read a session's engine configuration. |+| `updateConfig` | `updateConfig(id, body)` | Update a running session's configuration; takes effect without re-linking the account. **OPERATOR** || `get` | `get(id)` | Get a single session by id. || `create` | `create(body)` | Create a new session (`body.name` required). **OPERATOR** || `delete` | `delete(id)` | Delete a session. **OPERATOR** |@@ -139,105 +142,128 @@ The top-level client also exposes:#### `messages`-| Method | Signature | Description |-| -------------- | ----------------------------------------- | ---------------------------------------------------------------------------------- |-| `list` | `list(sessionId, query?)` | List messages (filter by chat/sender); returns `{ messages, total }`. |-| `sendText` | `sendText(sessionId, { chatId, text })` | Send a text message (`text` max 4096 chars). **OPERATOR** |-| `sendImage` | `sendImage(sessionId, body)` | Send an image (`url` or `base64`). **OPERATOR** |-| `sendVideo` | `sendVideo(sessionId, body)` | Send a video (`url` or `base64`). **OPERATOR** |-| `sendAudio` | `sendAudio(sessionId, body)` | Send an audio file (`url` or `base64`). **OPERATOR** |-| `sendDocument` | `sendDocument(sessionId, body)` | Send a document (`url` or `base64`; `filename` recommended). **OPERATOR** |-| `sendSticker` | `sendSticker(sessionId, body)` | Send a sticker (`url` or `base64`). **OPERATOR** |-| `sendLocation` | `sendLocation(sessionId, body)` | Send a location (`{ chatId, latitude, longitude, description? }`). **OPERATOR** |-| `sendContact` | `sendContact(sessionId, body)` | Send a contact card. **OPERATOR** |-| `sendTemplate` | `sendTemplate(sessionId, body)` | Render and send a stored message template. **OPERATOR** |-| `sendPoll` | `sendPoll(sessionId, body)` | Send a poll message. **OPERATOR** |-| `reply` | `reply(sessionId, body)` | Reply to a specific message. **OPERATOR** |-| `forward` | `forward(sessionId, body)` | Forward a message to another chat. **OPERATOR** |-| `react` | `react(sessionId, body)` | React to a message (empty `reaction` removes it). **OPERATOR** |-| `delete` | `delete(sessionId, body)` | Delete a message. **OPERATOR** |-| `editMessage` | `editMessage(sessionId, body)` | Edit the text of a message already sent. **OPERATOR** |-| `history` | `history(sessionId, chatId, query?)` | Get message history for a chat (read live from WhatsApp). |-| `reactions` | `reactions(sessionId, chatId, messageId)` | Get reactions for a specific message. |-| `sendBulk` | `sendBulk(sessionId, body)` | Send a batch asynchronously (202 + batch id); poll via `batchStatus`. **OPERATOR** |-| `batchStatus` | `batchStatus(sessionId, batchId)` | Poll the status/progress of a bulk-send batch. |-| `cancelBatch` | `cancelBatch(sessionId, batchId)` | Cancel a running batch. **OPERATOR** |+| Method | Signature | Description |+| -------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(sessionId, query?)` | List messages (filter by chat/sender); returns `{ messages, total }`. |+| `sendText` | `sendText(sessionId, { chatId, text })` | Send a text message (`text` max 4096 chars). **OPERATOR** |+| `sendImage` | `sendImage(sessionId, body)` | Send an image (`url` or `base64`). **OPERATOR** |+| `sendVideo` | `sendVideo(sessionId, body)` | Send a video (`url` or `base64`). **OPERATOR** |+| `sendAudio` | `sendAudio(sessionId, body)` | Send an audio file (`url` or `base64`). **OPERATOR** |+| `sendDocument` | `sendDocument(sessionId, body)` | Send a document (`url` or `base64`; `filename` recommended). **OPERATOR** |+| `sendSticker` | `sendSticker(sessionId, body)` | Send a sticker (`url` or `base64`). **OPERATOR** |+| `sendLocation` | `sendLocation(sessionId, body)` | Send a location (`{ chatId, latitude, longitude, description? }`). **OPERATOR** |+| `sendContact` | `sendContact(sessionId, body)` | Send a contact card. **OPERATOR** |+| `sendTemplate` | `sendTemplate(sessionId, body)` | Render and send a stored message template. **OPERATOR** |+| `sendPoll` | `sendPoll(sessionId, body)` | Send a poll message. **OPERATOR** |+| `reply` | `reply(sessionId, body)` | Reply to a specific message. **OPERATOR** |+| `forward` | `forward(sessionId, body)` | Forward a message to another chat. **OPERATOR** |+| `react` | `react(sessionId, body)` | React to a message (empty `reaction` removes it). **OPERATOR** |+| `delete` | `delete(sessionId, body)` | Delete a message. **OPERATOR** |+| `editMessage` | `editMessage(sessionId, body)` | Edit the text of a message already sent. **OPERATOR** |+| `history` | `history(sessionId, chatId, query?)` | Get message history for a chat (read live from WhatsApp). |+| `reactions` | `reactions(sessionId, chatId, messageId)` | Get reactions for a specific message. |+| `pin` | `pin(sessionId, body)` | Pin a message in its chat. `durationSeconds` must be 86400, 604800 or 2592000; in a group only admins may pin. **OPERATOR** |+| `votePoll` | `votePoll(sessionId, body)` | Cast a vote on a poll; `options` are the option texts, not ids. Not supported on Baileys (`501`). **OPERATOR** |+| `star` | `star(sessionId, body)` | Star or unstar a message. Best-effort on whatsapp-web.js, which silently ignores a message it will not star. **OPERATOR** |+| `unpin` | `unpin(sessionId, body)` | Unpin a pinned message. **OPERATOR** |+| `media` | `media(sessionId, chatId, messageId)` | Fetch a message's stored media bytes: the archived file when one exists, else the inline copy on the message row. `404` when neither holds bytes. |+| `sendBulk` | `sendBulk(sessionId, body)` | Send a batch asynchronously (202 + batch id); poll via `batchStatus`. **OPERATOR** |+| `batchStatus` | `batchStatus(sessionId, batchId)` | Poll the status/progress of a bulk-send batch. |+| `cancelBatch` | `cancelBatch(sessionId, batchId)` | Cancel a running batch. **OPERATOR** |Media bodies share the `SendMediaRequest` shape: `{ chatId, url? | base64?, mimetype?, filename?, caption? }` (`url` and `base64` are mutually exclusive; `base64` requires `mimetype`).#### `contacts`-| Method | Signature | Description |-| ----------------- | -------------------------------------- | ------------------------------------------------------------------------ |-| `list` | `list(sessionId, query?)` | List contacts known to the session. |-| `get` | `get(sessionId, contactId)` | Get details for a single contact by JID. |-| `check` | `check(sessionId, number)` | Check whether a phone number is registered on WhatsApp. |-| `profilePicture` | `profilePicture(sessionId, contactId)` | Get the contact's profile picture URL (or null). |-| `profilePictures` | `profilePictures(sessionId, ids)` | Batch-resolve profile picture URLs for up to 50 contacts in one request. |-| `phone` | `phone(sessionId, contactId)` | Resolve a contact id (e.g. a `@lid`) to a phone number. |-| `block` | `block(sessionId, contactId)` | Block a contact. **OPERATOR** |-| `unblock` | `unblock(sessionId, contactId)` | Unblock a contact. **OPERATOR** |+| Method | Signature | Description |+| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------ |+| `list` | `list(sessionId, query?)` | List contacts known to the session. |+| `get` | `get(sessionId, contactId)` | Get details for a single contact by JID. |+| `check` | `check(sessionId, number)` | Check whether a phone number is registered on WhatsApp. |+| `profilePicture` | `profilePicture(sessionId, contactId)` | Get the contact's profile picture URL (or null). |+| `profilePictures` | `profilePictures(sessionId, ids)` | Batch-resolve profile picture URLs for up to 50 contacts in one request. |+| `phone` | `phone(sessionId, contactId)` | Resolve a contact id (e.g. a `@lid`) to a phone number. |+| `block` | `block(sessionId, contactId)` | Block a contact. **OPERATOR** |+| `upsert` | `upsert(sessionId, contactId, body)` | Save a contact to the account's addressbook, or edit an existing entry. **OPERATOR** |+| `delete` | `delete(sessionId, contactId)` | Remove a contact from the account's addressbook. **OPERATOR** |+| `unblock` | `unblock(sessionId, contactId)` | Unblock a contact. **OPERATOR** |#### `groups`-| Method | Signature | Description |-| --------------------- | ------------------------------------------------------- | --------------------------------------------------------------------- |-| `list` | `list(sessionId, query?)` | List all groups for the session. |-| `get` | `get(sessionId, groupId)` | Get detailed group info including participants. |-| `create` | `create(sessionId, body)` | Create a new group. **OPERATOR** |-| `joinGroup` | `joinGroup(sessionId, body)` | Join a group via its invite code. **OPERATOR** |-| `addParticipants` | `addParticipants(sessionId, groupId, participants)` | Add participants (`string[]`) to a group. **OPERATOR** |-| `removeParticipants` | `removeParticipants(sessionId, groupId, participants)` | Remove participants from a group. **OPERATOR** |-| `promoteParticipants` | `promoteParticipants(sessionId, groupId, participants)` | Promote participants to group admin. **OPERATOR** |-| `demoteParticipants` | `demoteParticipants(sessionId, groupId, participants)` | Demote participants from group admin. **OPERATOR** |-| `setSubject` | `setSubject(sessionId, groupId, subject)` | Update the group subject (name). **OPERATOR** |-| `setDescription` | `setDescription(sessionId, groupId, description)` | Update the group description (empty clears it). **OPERATOR** |-| `getGroupSettings` | `getGroupSettings(sessionId, groupId)` | Get the group settings (announce / locked / ephemeral timer). |-| `updateGroupSettings` | `updateGroupSettings(sessionId, groupId, body)` | Update the group settings (at least one field required). **OPERATOR** |-| `leave` | `leave(sessionId, groupId)` | Leave a group. **OPERATOR** |-| `inviteCode` | `inviteCode(sessionId, groupId)` | Get the group invite code and link. |-| `revokeInviteCode` | `revokeInviteCode(sessionId, groupId)` | Revoke the current invite code and generate a new one. **OPERATOR** |+| Method | Signature | Description |+| --------------------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(sessionId, query?)` | List all groups for the session. |+| `get` | `get(sessionId, groupId)` | Get detailed group info including participants. |+| `create` | `create(sessionId, body)` | Create a new group. **OPERATOR** |+| `joinInfo` | `joinInfo(sessionId, code)` | Preview a group from its invite code WITHOUT joining. Read-only, so it is safe to call on a code from an untrusted source. |+| `joinGroup` | `joinGroup(sessionId, body)` | Join a group via its invite code. **OPERATOR** |+| `addParticipants` | `addParticipants(sessionId, groupId, participants)` | Add participants (`string[]`) to a group. **OPERATOR** |+| `removeParticipants` | `removeParticipants(sessionId, groupId, participants)` | Remove participants from a group. **OPERATOR** |+| `promoteParticipants` | `promoteParticipants(sessionId, groupId, participants)` | Promote participants to group admin. **OPERATOR** |+| `demoteParticipants` | `demoteParticipants(sessionId, groupId, participants)` | Demote participants from group admin. **OPERATOR** |+| `setSubject` | `setSubject(sessionId, groupId, subject)` | Update the group subject (name). **OPERATOR** |+| `setDescription` | `setDescription(sessionId, groupId, description)` | Update the group description (empty clears it). **OPERATOR** |+| `getGroupSettings` | `getGroupSettings(sessionId, groupId)` | Get the group settings (announce / locked / ephemeral timer). |+| `updateGroupSettings` | `updateGroupSettings(sessionId, groupId, body)` | Update the group settings (at least one field required). **OPERATOR** |+| `leave` | `leave(sessionId, groupId)` | Leave a group. **OPERATOR** |+| `getPicture` | `getPicture(sessionId, groupId)` | The group's picture URL, or `null` when it has none. |+| `setPicture` | `setPicture(sessionId, groupId, body)` | Set the group's picture. **OPERATOR** |+| `deletePicture` | `deletePicture(sessionId, groupId)` | Remove the group's picture. **OPERATOR** |+| `inviteCode` | `inviteCode(sessionId, groupId)` | Get the group invite code and link. |+| `revokeInviteCode` | `revokeInviteCode(sessionId, groupId)` | Revoke the current invite code and generate a new one. **OPERATOR** |#### `chats`-| Method | Signature | Description |-| ------------ | ----------------------------- | ------------------------------------------------------------------ |-| `list` | `list(sessionId, query?)` | List active chats, most recent first. |-| `markRead` | `markRead(sessionId, body)` | Mark a chat as read/seen. **OPERATOR** |-| `markUnread` | `markUnread(sessionId, body)` | Mark a chat as unread. **OPERATOR** |-| `delete` | `delete(sessionId, body)` | Delete a chat from the chat list. **OPERATOR** |-| `sendState` | `sendState(sessionId, body)` | Send a chat presence state (typing/recording/paused). **OPERATOR** |+| Method | Signature | Description |+| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(sessionId, query?)` | List active chats, most recent first. |+| `subscribePresence` | `subscribePresence(sessionId, body)` | Subscribe to a chat's presence; updates then arrive as `presence.update` events. The subscription belongs to the connection and does not survive a reconnect. **OPERATOR** |+| `getPresence` | `getPresence(sessionId, chatId)` | The last presence reported for a chat, or `null` when none has been. Held in memory, so a restart clears it. |+| `markRead` | `markRead(sessionId, body)` | Mark a chat as read/seen. **OPERATOR** |+| `markUnread` | `markUnread(sessionId, body)` | Mark a chat as unread. **OPERATOR** |+| `archive` | `archive(sessionId, body)` | Archive or unarchive a chat. `success: false` means the engine declined. **OPERATOR** |+| `clearMessages` | `clearMessages(sessionId, chatId)` | Delete every message in a chat, keeping the chat itself. **OPERATOR** |+| `delete` | `delete(sessionId, body)` | Delete a chat from the chat list. **OPERATOR** |+| `sendState` | `sendState(sessionId, body)` | Send a chat presence state (typing/recording/paused). **OPERATOR** |#### `webhooks`-| Method | Signature | Description |-| -------- | ----------------------------- | ------------------------------------------------------------------------------ |-| `list` | `list(sessionId)` | List all webhooks for a session. **OPERATOR** |-| `get` | `get(sessionId, id)` | Get a single webhook by id. **OPERATOR** |-| `create` | `create(sessionId, body)` | Create a new webhook. **OPERATOR** |-| `update` | `update(sessionId, id, body)` | Update a webhook. **OPERATOR** |-| `delete` | `delete(sessionId, id)` | Delete a webhook. **OPERATOR** |-| `test` | `test(sessionId, id)` | Trigger a test dispatch to the webhook URL and report the result. **OPERATOR** |+| Method | Signature | Description |+| ------------------ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `listAll` | `listAll(query?)` | List webhooks across EVERY session the key can see, not one session's. **OPERATOR** |+| `deliveryFailures` | `deliveryFailures(query?)` | Deliveries that were attempted and failed — the diagnostic for a webhook that stopped arriving. A delivery a smart filter suppressed never reaches this log. **ADMIN** |+| `list` | `list(sessionId)` | List all webhooks for a session. **OPERATOR** |+| `get` | `get(sessionId, id)` | Get a single webhook by id. **OPERATOR** |+| `create` | `create(sessionId, body)` | Create a new webhook. **OPERATOR** |+| `update` | `update(sessionId, id, body)` | Update a webhook. **OPERATOR** |+| `delete` | `delete(sessionId, id)` | Delete a webhook. **OPERATOR** |+| `test` | `test(sessionId, id)` | Trigger a test dispatch to the webhook URL and report the result. **OPERATOR** |#### `labels` _(WhatsApp Business)_-| Method | Signature | Description |-| ---------------- | -------------------------------------------- | -------------------------------------------------- |-| `list` | `list(sessionId)` | List all labels available in the business account. |-| `get` | `get(sessionId, labelId)` | Get a single label by id. |-| `forChat` | `forChat(sessionId, chatId)` | Get the labels currently applied to a chat. |-| `addToChat` | `addToChat(sessionId, chatId, body)` | Add a label to a chat. **OPERATOR** |-| `removeFromChat` | `removeFromChat(sessionId, chatId, labelId)` | Remove a label from a chat. **OPERATOR** |+| Method | Signature | Description |+| ---------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------- |+| `list` | `list(sessionId)` | List all labels available in the business account. |+| `get` | `get(sessionId, labelId)` | Get a single label by id. |+| `chats` | `chats(sessionId, labelId)` | Every chat carrying a label. **whatsapp-web.js only** — Baileys answers `501`. |+| `upsert` | `upsert(sessionId, labelId, body)` | Create or update a label. **Baileys only** — whatsapp-web.js answers `501`. **OPERATOR** |+| `delete` | `delete(sessionId, labelId)` | Delete a label. **OPERATOR** |+| `forChat` | `forChat(sessionId, chatId)` | Get the labels currently applied to a chat. |+| `addToChat` | `addToChat(sessionId, chatId, body)` | Add a label to a chat. **OPERATOR** |+| `removeFromChat` | `removeFromChat(sessionId, chatId, labelId)` | Remove a label from a chat. **OPERATOR** |#### `channels` _(Newsletters)_-| Method | Signature | Description |-| ------------- | ---------------------------------------- | ----------------------------------------------------------- |-| `list` | `list(sessionId)` | List all channels/newsletters the session is subscribed to. |-| `get` | `get(sessionId, channelId)` | Get a single channel by id. |-| `messages` | `messages(sessionId, channelId, query?)` | Get recent messages from a channel. |-| `subscribe` | `subscribe(sessionId, body)` | Subscribe to a channel using its invite code. **OPERATOR** |-| `unsubscribe` | `unsubscribe(sessionId, channelId)` | Unsubscribe from a channel. **OPERATOR** |+| Method | Signature | Description |+| ------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(sessionId)` | List all channels/newsletters the session is subscribed to. |+| `get` | `get(sessionId, channelId)` | Get a single channel by id. |+| `messages` | `messages(sessionId, channelId, query?)` | Get recent messages from a channel. |+| `create` | `create(sessionId, body)` | Create a channel this account owns. **OPERATOR** |+| `delete` | `delete(sessionId, channelId)` | Delete a channel this account owns. Irreversible, and every subscriber loses it — distinct from `unsubscribe`. **OPERATOR** |+| `mute` | `mute(sessionId, channelId, body)` | Mute or unmute a channel's notifications. **OPERATOR** |+| `subscribe` | `subscribe(sessionId, body)` | Subscribe to a channel using its invite code. **OPERATOR** |+| `unsubscribe` | `unsubscribe(sessionId, channelId)` | Unsubscribe from a channel. **OPERATOR** |#### `catalog` _(WhatsApp Business)_@@ -251,15 +277,16 @@ Media bodies share the `SendMediaRequest` shape: `{ chatId, url? | base64?, mime#### `status` _(Stories)_-| Method | Signature | Description |-| ------------- | ----------------------------------- | -------------------------------------------------------------------------- |-| `list` | `list(sessionId)` | Get all status updates (`{ statuses }`). |-| `fromContact` | `fromContact(sessionId, contactId)` | Get status updates from a specific contact. |-| `media` | `media(sessionId, statusId)` | Fetch the stored media bytes for a status update (404 when there is none). |-| `sendText` | `sendText(sessionId, body)` | Post a text status update. **OPERATOR** |-| `sendImage` | `sendImage(sessionId, body)` | Post an image status update. **OPERATOR** |-| `sendVideo` | `sendVideo(sessionId, body)` | Post a video status update. **OPERATOR** |-| `delete` | `delete(sessionId, statusId)` | Delete a status update by id. **OPERATOR** |+| Method | Signature | Description |+| ------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(sessionId)` | Get all status updates (`{ statuses }`). |+| `fromContact` | `fromContact(sessionId, contactId)` | Get status updates from a specific contact. |+| `media` | `media(sessionId, statusId)` | Fetch the stored media bytes for a status update (404 when there is none). |+| `sendText` | `sendText(sessionId, body)` | Post a text status update. **OPERATOR** |+| `sendImage` | `sendImage(sessionId, body)` | Post an image status update. **OPERATOR** |+| `sendVideo` | `sendVideo(sessionId, body)` | Post a video status update. **OPERATOR** |+| `sendVoice` | `sendVoice(sessionId, body)` | Post an audio status as a voice note. WhatsApp plays one only as Ogg/Opus and neither engine transcodes, so convert with `media.convertVoice` first. **OPERATOR** |+| `delete` | `delete(sessionId, statusId)` | Delete a status update by id. **OPERATOR** |> This is WhatsApp "Status/Stories", distinct from session lifecycle status.@@ -293,6 +320,14 @@ Media bodies share the `SendMediaRequest` shape: `{ chatId, url? | base64?, mime| ------------ | ------------------------------- | -------------------------------------------------------------------------------------------- || `rejectCall` | `rejectCall(sessionId, callId)` | Reject a ringing incoming call (`callId` comes from the `call.received` event). **OPERATOR** |+#### `media`++| Method | Signature | Description |+| ------------------ | -------------------------------- | -------------------------------------------------------------------------------------------- |+| `conversionStatus` | `conversionStatus(sessionId)` | Whether conversion is switched on for this deployment AND the ffmpeg binary can be run. |+| `convertVoice` | `convertVoice(sessionId, input)` | Convert audio into a WhatsApp voice note (Ogg/Opus, mono, tuned for speech). **OPERATOR** |+| `convertVideo` | `convertVideo(sessionId, input)` | Convert video into an MP4 every WhatsApp client accepts (baseline H.264 + AAC). **OPERATOR** |+#### `health`| Method | Signature | Description |@@ -453,6 +488,8 @@ Resources are accessed as properties on the client (e.g. `client.messages`). All| Method | Signature | Description || ---------------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- || `list` | `list() -> list[SessionResponse]` | List all sessions. |+| `get_config` | `get_config(session_id) -> SessionConfig` | Read a session's engine configuration. |+| `update_config` | `update_config(session_id, body) -> SessionConfig` | Update a running session's configuration; takes effect without re-linking the account. **OPERATOR** || `get` | `get(session_id) -> SessionResponse` | Get one session. || `create` | `create(body) -> SessionResponse` | Create a session (`body["name"]` required). **OPERATOR** || `delete` | `delete(session_id) -> None` | Delete a session. **OPERATOR** |@@ -466,103 +503,126 @@ Resources are accessed as properties on the client (e.g. `client.messages`). All#### `client.messages`-| Method | Signature | Description |-| --------------- | ---------------------------------------------------------------------- | ----------------------------------------------------- |-| `list` | `list(session_id, query=None) -> MessageListResponse` | List stored messages. |-| `send_text` | `send_text(session_id, body) -> MessageResponse` | Send a text message. **OPERATOR** |-| `send_image` | `send_image(session_id, body) -> MessageResponse` | Send an image. **OPERATOR** |-| `send_video` | `send_video(session_id, body) -> MessageResponse` | Send a video. **OPERATOR** |-| `send_audio` | `send_audio(session_id, body) -> MessageResponse` | Send audio. **OPERATOR** |-| `send_document` | `send_document(session_id, body) -> MessageResponse` | Send a document. **OPERATOR** |-| `send_sticker` | `send_sticker(session_id, body) -> MessageResponse` | Send a sticker. **OPERATOR** |-| `send_location` | `send_location(session_id, body) -> MessageResponse` | Send a location. **OPERATOR** |-| `send_contact` | `send_contact(session_id, body) -> MessageResponse` | Send a contact card. **OPERATOR** |-| `send_template` | `send_template(session_id, body) -> MessageResponse` | Send a stored template. **OPERATOR** |-| `send_poll` | `send_poll(session_id, body) -> MessageResponse` | Send a poll message. **OPERATOR** |-| `reply` | `reply(session_id, body) -> MessageResponse` | Reply to a message. **OPERATOR** |-| `forward` | `forward(session_id, body) -> MessageResponse` | Forward a message. **OPERATOR** |-| `react` | `react(session_id, body) -> SuccessResult` | React to a message. **OPERATOR** |-| `delete` | `delete(session_id, body) -> SuccessResult` | Delete a message. **OPERATOR** |-| `edit_message` | `edit_message(session_id, body) -> MessageResponse` | Edit the text of a message already sent. **OPERATOR** |-| `history` | `history(session_id, chat_id, query=None) -> list[ChatHistoryMessage]` | Fetch chat history. |-| `reactions` | `reactions(session_id, chat_id, message_id) -> list[ReactionRecord]` | List reactions on a message. |-| `send_bulk` | `send_bulk(session_id, body) -> BulkMessageResponse` | Enqueue a bulk send batch. **OPERATOR** |-| `batch_status` | `batch_status(session_id, batch_id) -> BatchStatusResponse` | Get bulk batch status. |-| `cancel_batch` | `cancel_batch(session_id, batch_id) -> BatchStatusResponse` | Cancel a running batch. **OPERATOR** |+| Method | Signature | Description |+| --------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(session_id, query=None) -> MessageListResponse` | List stored messages. |+| `send_text` | `send_text(session_id, body) -> MessageResponse` | Send a text message. **OPERATOR** |+| `send_image` | `send_image(session_id, body) -> MessageResponse` | Send an image. **OPERATOR** |+| `send_video` | `send_video(session_id, body) -> MessageResponse` | Send a video. **OPERATOR** |+| `send_audio` | `send_audio(session_id, body) -> MessageResponse` | Send audio. **OPERATOR** |+| `send_document` | `send_document(session_id, body) -> MessageResponse` | Send a document. **OPERATOR** |+| `send_sticker` | `send_sticker(session_id, body) -> MessageResponse` | Send a sticker. **OPERATOR** |+| `send_location` | `send_location(session_id, body) -> MessageResponse` | Send a location. **OPERATOR** |+| `send_contact` | `send_contact(session_id, body) -> MessageResponse` | Send a contact card. **OPERATOR** |+| `send_template` | `send_template(session_id, body) -> MessageResponse` | Send a stored template. **OPERATOR** |+| `send_poll` | `send_poll(session_id, body) -> MessageResponse` | Send a poll message. **OPERATOR** |+| `reply` | `reply(session_id, body) -> MessageResponse` | Reply to a message. **OPERATOR** |+| `forward` | `forward(session_id, body) -> MessageResponse` | Forward a message. **OPERATOR** |+| `react` | `react(session_id, body) -> SuccessResult` | React to a message. **OPERATOR** |+| `delete` | `delete(session_id, body) -> SuccessResult` | Delete a message. **OPERATOR** |+| `edit_message` | `edit_message(session_id, body) -> MessageResponse` | Edit the text of a message already sent. **OPERATOR** |+| `history` | `history(session_id, chat_id, query=None) -> list[ChatHistoryMessage]` | Fetch chat history. |+| `reactions` | `reactions(session_id, chat_id, message_id) -> list[ReactionRecord]` | List reactions on a message. |+| `pin` | `pin(session_id, body) -> SuccessResult` | Pin a message in its chat. `durationSeconds` must be 86400, 604800 or 2592000; in a group only admins may pin. **OPERATOR** |+| `vote_poll` | `vote_poll(session_id, body) -> SuccessResult` | Cast a vote on a poll; `options` are the option texts, not ids. Not supported on Baileys (`501`). **OPERATOR** |+| `star` | `star(session_id, body) -> SuccessResult` | Star or unstar a message. Best-effort on whatsapp-web.js, which silently ignores a message it will not star. **OPERATOR** |+| `unpin` | `unpin(session_id, body) -> SuccessResult` | Unpin a pinned message. **OPERATOR** |+| `media` | `media(session_id, chat_id, message_id) -> MessageMedia` | Fetch a message's stored media bytes: the archived file when one exists, else the inline copy on the message row. `404` when neither holds bytes. |+| `send_bulk` | `send_bulk(session_id, body) -> BulkMessageResponse` | Enqueue a bulk send batch. **OPERATOR** |+| `batch_status` | `batch_status(session_id, batch_id) -> BatchStatusResponse` | Get bulk batch status. |+| `cancel_batch` | `cancel_batch(session_id, batch_id) -> BatchStatusResponse` | Cancel a running batch. **OPERATOR** |#### `client.contacts`-| Method | Signature | Description |-| ------------------ | ------------------------------------------------------------------- | --------------------------------------------------------- |-| `list` | `list(session_id, query=None) -> list[ContactRecord]` | List contacts (`query`: `limit`, `offset`). |-| `get` | `get(session_id, contact_id) -> ContactRecord` | Get one contact. |-| `check` | `check(session_id, number) -> CheckNumberResponse` | Check whether a number is on WhatsApp. |-| `profile_picture` | `profile_picture(session_id, contact_id) -> ProfilePictureResponse` | Get a contact's profile picture. |-| `profile_pictures` | `profile_pictures(session_id, ids) -> ProfilePicturesResponse` | Batch-resolve profile picture URLs for up to 50 contacts. |-| `phone` | `phone(session_id, contact_id) -> ContactPhoneResponse` | Resolve a contact's phone number. |-| `block` | `block(session_id, contact_id) -> SuccessResult` | Block a contact. **OPERATOR** |-| `unblock` | `unblock(session_id, contact_id) -> SuccessResult` | Unblock a contact. **OPERATOR** |+| Method | Signature | Description |+| ------------------ | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |+| `list` | `list(session_id, query=None) -> list[ContactRecord]` | List contacts (`query`: `limit`, `offset`). |+| `get` | `get(session_id, contact_id) -> ContactRecord` | Get one contact. |+| `check` | `check(session_id, number) -> CheckNumberResponse` | Check whether a number is on WhatsApp. |+| `profile_picture` | `profile_picture(session_id, contact_id) -> ProfilePictureResponse` | Get a contact's profile picture. |+| `profile_pictures` | `profile_pictures(session_id, ids) -> ProfilePicturesResponse` | Batch-resolve profile picture URLs for up to 50 contacts. |+| `phone` | `phone(session_id, contact_id) -> ContactPhoneResponse` | Resolve a contact's phone number. |+| `block` | `block(session_id, contact_id) -> SuccessResult` | Block a contact. **OPERATOR** |+| `upsert` | `upsert(session_id, contact_id, body) -> SuccessResult` | Save a contact to the account's addressbook, or edit an existing entry. **OPERATOR** |+| `delete` | `delete(session_id, contact_id) -> SuccessResult` | Remove a contact from the account's addressbook. **OPERATOR** |+| `unblock` | `unblock(session_id, contact_id) -> SuccessResult` | Unblock a contact. **OPERATOR** |#### `client.groups`-| Method | Signature | Description |-| ----------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------- |-| `list` | `list(session_id, query=None) -> list[GroupSummary]` | List groups (`query`: `limit`, `offset`). |-| `get` | `get(session_id, group_id) -> GroupInfo` | Get group details. |-| `create` | `create(session_id, body) -> GroupInfo` | Create a group. **OPERATOR** |-| `join_group` | `join_group(session_id, body) -> JoinGroupResponse` | Join a group via its invite code. **OPERATOR** |-| `add_participants` | `add_participants(session_id, group_id, participants) -> SuccessResult` | Add participants (`list[str]`). **OPERATOR** |-| `remove_participants` | `remove_participants(session_id, group_id, participants) -> SuccessResult` | Remove participants. **OPERATOR** |-| `promote_participants` | `promote_participants(session_id, group_id, participants) -> SuccessResult` | Promote to admin. **OPERATOR** |-| `demote_participants` | `demote_participants(session_id, group_id, participants) -> SuccessResult` | Demote from admin. **OPERATOR** |-| `set_subject` | `set_subject(session_id, group_id, subject) -> SuccessResult` | Set group subject. **OPERATOR** |-| `set_description` | `set_description(session_id, group_id, description) -> SuccessResult` | Set group description. **OPERATOR** |-| `get_group_settings` | `get_group_settings(session_id, group_id) -> GroupSettings` | Get the group settings (announce / locked / ephemeral timer). |-| `update_group_settings` | `update_group_settings(session_id, group_id, body) -> SuccessResult` | Update the group settings (at least one field required). **OPERATOR** |-| `leave` | `leave(session_id, group_id) -> SuccessResult` | Leave the group. **OPERATOR** |-| `invite_code` | `invite_code(session_id, group_id) -> InviteCodeResponse` | Get the invite code. |-| `revoke_invite_code` | `revoke_invite_code(session_id, group_id) -> InviteCodeResponse` | Revoke and regenerate the invite code. **OPERATOR** |+| Method | Signature | Description |+| ----------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(session_id, query=None) -> list[GroupSummary]` | List groups (`query`: `limit`, `offset`). |+| `get` | `get(session_id, group_id) -> GroupInfo` | Get group details. |+| `create` | `create(session_id, body) -> GroupInfo` | Create a group. **OPERATOR** |+| `join_info` | `join_info(session_id, code) -> GroupJoinInfo` | Preview a group from its invite code WITHOUT joining. Read-only, so it is safe to call on a code from an untrusted source. |+| `join_group` | `join_group(session_id, body) -> JoinGroupResponse` | Join a group via its invite code. **OPERATOR** |+| `add_participants` | `add_participants(session_id, group_id, participants) -> SuccessResult` | Add participants (`list[str]`). **OPERATOR** |+| `remove_participants` | `remove_participants(session_id, group_id, participants) -> SuccessResult` | Remove participants. **OPERATOR** |+| `promote_participants` | `promote_participants(session_id, group_id, participants) -> SuccessResult` | Promote to admin. **OPERATOR** |+| `demote_participants` | `demote_participants(session_id, group_id, participants) -> SuccessResult` | Demote from admin. **OPERATOR** |+| `set_subject` | `set_subject(session_id, group_id, subject) -> SuccessResult` | Set group subject. **OPERATOR** |+| `set_description` | `set_description(session_id, group_id, description) -> SuccessResult` | Set group description. **OPERATOR** |+| `get_group_settings` | `get_group_settings(session_id, group_id) -> GroupSettings` | Get the group settings (announce / locked / ephemeral timer). |+| `update_group_settings` | `update_group_settings(session_id, group_id, body) -> SuccessResult` | Update the group settings (at least one field required). **OPERATOR** |+| `leave` | `leave(session_id, group_id) -> SuccessResult` | Leave the group. **OPERATOR** |+| `get_picture` | `get_picture(session_id, group_id) -> dict[str, Any]` | The group's picture URL, or `null` when it has none. |+| `set_picture` | `set_picture(session_id, group_id, body) -> SuccessResult` | Set the group's picture. **OPERATOR** |+| `delete_picture` | `delete_picture(session_id, group_id) -> SuccessResult` | Remove the group's picture. **OPERATOR** |+| `invite_code` | `invite_code(session_id, group_id) -> InviteCodeResponse` | Get the invite code. |+| `revoke_invite_code` | `revoke_invite_code(session_id, group_id) -> InviteCodeResponse` | Revoke and regenerate the invite code. **OPERATOR** |#### `client.chats`-| Method | Signature | Description |-| ------------- | --------------------------------------------------- | ------------------------------------------------ |-| `list` | `list(session_id, query=None) -> list[ChatSummary]` | List chats (`query`: `limit`, `offset`). |-| `mark_read` | `mark_read(session_id, body) -> SuccessResult` | Mark a chat as read. **OPERATOR** |-| `mark_unread` | `mark_unread(session_id, body) -> SuccessResult` | Mark a chat as unread. **OPERATOR** |-| `delete` | `delete(session_id, body) -> SuccessResult` | Delete a chat. **OPERATOR** |-| `send_state` | `send_state(session_id, body) -> SuccessResult` | Send a typing/recording chat state. **OPERATOR** |+| Method | Signature | Description |+| -------------------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(session_id, query=None) -> list[ChatSummary]` | List chats (`query`: `limit`, `offset`). |+| `subscribe_presence` | `subscribe_presence(session_id, body) -> SuccessResult` | Subscribe to a chat's presence; updates then arrive as `presence.update` events. The subscription belongs to the connection and does not survive a reconnect. **OPERATOR** |+| `get_presence` | `get_presence(session_id, chat_id) -> ChatPresence | None` | The last presence reported for a chat, or `null` when none has been. Held in memory, so a restart clears it. |+| `mark_read` | `mark_read(session_id, body) -> SuccessResult` | Mark a chat as read. **OPERATOR** |+| `mark_unread` | `mark_unread(session_id, body) -> SuccessResult` | Mark a chat as unread. **OPERATOR** |+| `archive` | `archive(session_id, body) -> SuccessResult` | Archive or unarchive a chat. `success: false` means the engine declined. **OPERATOR** |+| `clear_messages` | `clear_messages(session_id, chat_id) -> SuccessResult` | Delete every message in a chat, keeping the chat itself. **OPERATOR** |+| `delete` | `delete(session_id, body) -> SuccessResult` | Delete a chat. **OPERATOR** |+| `send_state` | `send_state(session_id, body) -> SuccessResult` | Send a typing/recording chat state. **OPERATOR** |#### `client.webhooks`-| Method | Signature | Description |-| -------- | --------------------------------------------------------- | ---------------------------------- |-| `list` | `list(session_id) -> list[WebhookResponse]` | List webhooks. **OPERATOR** |-| `get` | `get(session_id, webhook_id) -> WebhookResponse` | Get one webhook. **OPERATOR** |-| `create` | `create(session_id, body) -> WebhookResponse` | Create a webhook. **OPERATOR** |-| `update` | `update(session_id, webhook_id, body) -> WebhookResponse` | Update a webhook. **OPERATOR** |-| `delete` | `delete(session_id, webhook_id) -> None` | Delete a webhook. **OPERATOR** |-| `test` | `test(session_id, webhook_id) -> WebhookTestResult` | Send a test delivery. **OPERATOR** |+| Method | Signature | Description |+| ------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `list_all` | `list_all(query=None) -> list[WebhookResponse]` | List webhooks across EVERY session the key can see, not one session's. **OPERATOR** |+| `delivery_failures` | `delivery_failures(query=None) -> Any` | Deliveries that were attempted and failed — the diagnostic for a webhook that stopped arriving. A delivery a smart filter suppressed never reaches this log. **ADMIN** |+| `list` | `list(session_id) -> list[WebhookResponse]` | List webhooks. **OPERATOR** |+| `get` | `get(session_id, webhook_id) -> WebhookResponse` | Get one webhook. **OPERATOR** |+| `create` | `create(session_id, body) -> WebhookResponse` | Create a webhook. **OPERATOR** |+| `update` | `update(session_id, webhook_id, body) -> WebhookResponse` | Update a webhook. **OPERATOR** |+| `delete` | `delete(session_id, webhook_id) -> None` | Delete a webhook. **OPERATOR** |+| `test` | `test(session_id, webhook_id) -> WebhookTestResult` | Send a test delivery. **OPERATOR** |#### `client.labels` _(WhatsApp Business)_-| Method | Signature | Description |-| ------------------ | ------------------------------------------------------------------ | ---------------------------------------- |-| `list` | `list(session_id) -> list[LabelRecord]` | List labels. |-| `get` | `get(session_id, label_id) -> LabelRecord` | Get one label. |-| `for_chat` | `for_chat(session_id, chat_id) -> list[LabelRecord]` | Labels applied to a chat. |-| `add_to_chat` | `add_to_chat(session_id, chat_id, body) -> SuccessResult` | Add a label to a chat. **OPERATOR** |-| `remove_from_chat` | `remove_from_chat(session_id, chat_id, label_id) -> SuccessResult` | Remove a label from a chat. **OPERATOR** |+| Method | Signature | Description |+| ------------------ | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |+| `list` | `list(session_id) -> list[LabelRecord]` | List labels. |+| `get` | `get(session_id, label_id) -> LabelRecord` | Get one label. |+| `chats` | `chats(session_id, label_id) -> list[ChatSummary]` | Every chat carrying a label. **whatsapp-web.js only** — Baileys answers `501`. |+| `upsert` | `upsert(session_id, label_id, body) -> SuccessResult` | Create or update a label. **Baileys only** — whatsapp-web.js answers `501`. **OPERATOR** |+| `delete` | `delete(session_id, label_id) -> SuccessResult` | Delete a label. **OPERATOR** |+| `for_chat` | `for_chat(session_id, chat_id) -> list[LabelRecord]` | Labels applied to a chat. |+| `add_to_chat` | `add_to_chat(session_id, chat_id, body) -> SuccessResult` | Add a label to a chat. **OPERATOR** |+| `remove_from_chat` | `remove_from_chat(session_id, chat_id, label_id) -> SuccessResult` | Remove a label from a chat. **OPERATOR** |#### `client.channels` _(Newsletters)_-| Method | Signature | Description |-| ------------- | ---------------------------------------------------------------------------- | ---------------------------------------- |-| `list` | `list(session_id) -> list[ChannelRecord]` | List subscribed channels. |-| `get` | `get(session_id, channel_id) -> ChannelRecord` | Get one channel. |-| `messages` | `messages(session_id, channel_id, query=None) -> list[ChannelMessageRecord]` | List channel messages. |-| `subscribe` | `subscribe(session_id, body) -> ChannelRecord` | Subscribe via invite code. **OPERATOR** |-| `unsubscribe` | `unsubscribe(session_id, channel_id) -> SuccessResult` | Unsubscribe from a channel. **OPERATOR** |+| Method | Signature | Description |+| ------------- | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(session_id) -> list[ChannelRecord]` | List subscribed channels. |+| `get` | `get(session_id, channel_id) -> ChannelRecord` | Get one channel. |+| `messages` | `messages(session_id, channel_id, query=None) -> list[ChannelMessageRecord]` | List channel messages. |+| `create` | `create(session_id, body) -> ChannelRecord` | Create a channel this account owns. **OPERATOR** |+| `delete` | `delete(session_id, channel_id) -> SuccessResult` | Delete a channel this account owns. Irreversible, and every subscriber loses it — distinct from `unsubscribe`. **OPERATOR** |+| `mute` | `mute(session_id, channel_id, body) -> SuccessResult` | Mute or unmute a channel's notifications. **OPERATOR** |+| `subscribe` | `subscribe(session_id, body) -> ChannelRecord` | Subscribe via invite code. **OPERATOR** |+| `unsubscribe` | `unsubscribe(session_id, channel_id) -> SuccessResult` | Unsubscribe from a channel. **OPERATOR** |#### `client.catalog` _(WhatsApp Business)_@@ -576,15 +636,16 @@ Resources are accessed as properties on the client (e.g. `client.messages`). All#### `client.status` _(Stories)_-| Method | Signature | Description |-| -------------- | ----------------------------------------------------------------------- | ------------------------------------------------- |-| `list` | `list(session_id) -> dict[str, list[StatusRecord]]` | List all status updates. |-| `from_contact` | `from_contact(session_id, contact_id) -> dict[str, list[StatusRecord]]` | Status updates from one contact. |-| `media` | `media(session_id, status_id) -> StatusMedia` | Fetch the stored media bytes for a status update. |-| `send_text` | `send_text(session_id, body) -> StatusResult` | Post a text status. **OPERATOR** |-| `send_image` | `send_image(session_id, body) -> StatusResult` | Post an image status. **OPERATOR** |-| `send_video` | `send_video(session_id, body) -> StatusResult` | Post a video status. **OPERATOR** |-| `delete` | `delete(session_id, status_id) -> None` | Delete a status. **OPERATOR** |+| Method | Signature | Description |+| -------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(session_id) -> dict[str, list[StatusRecord]]` | List all status updates. |+| `from_contact` | `from_contact(session_id, contact_id) -> dict[str, list[StatusRecord]]` | Status updates from one contact. |+| `media` | `media(session_id, status_id) -> StatusMedia` | Fetch the stored media bytes for a status update. |+| `send_text` | `send_text(session_id, body) -> StatusResult` | Post a text status. **OPERATOR** |+| `send_image` | `send_image(session_id, body) -> StatusResult` | Post an image status. **OPERATOR** |+| `send_video` | `send_video(session_id, body) -> StatusResult` | Post a video status. **OPERATOR** |+| `send_voice` | `send_voice(session_id, body) -> StatusResult` | Post an audio status as a voice note. WhatsApp plays one only as Ogg/Opus and neither engine transcodes, so convert with `media.convertVoice` first. **OPERATOR** |+| `delete` | `delete(session_id, status_id) -> None` | Delete a status. **OPERATOR** |#### `client.search`@@ -616,6 +677,14 @@ Resources are accessed as properties on the client (e.g. `client.messages`). All| ------------- | --------------------------------------------------- | -------------------------------------------- || `reject_call` | `reject_call(session_id, call_id) -> SuccessResult` | Reject a ringing incoming call. **OPERATOR** |+#### `client.media`++| Method | Signature | Description |+| ------------------- | ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |+| `conversion_status` | `conversion_status(session_id) -> MediaConversionAvailability` | Whether conversion is switched on for this deployment AND the ffmpeg binary can be run. |+| `convert_voice` | `convert_voice(session_id, *, url=None, base64=None) -> ConvertedMedia` | Convert audio into a WhatsApp voice note (Ogg/Opus, mono, tuned for speech). **OPERATOR** |+| `convert_video` | `convert_video(session_id, *, url=None, base64=None) -> ConvertedMedia` | Convert video into an MP4 every WhatsApp client accepts (baseline H.264 + AAC). **OPERATOR** |+#### `client.health`| Method | Signature | Description |@@ -751,6 +820,8 @@ All payloads are associative arrays; all listed methods are synchronous and retu| Method | Signature | Description || -------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- || `list` | `list(): array` | List all sessions. |+| `getConfig` | `getConfig(string $id): array` | Read a session's engine configuration. |+| `updateConfig` | `updateConfig(string $id, array $body): array` | Update a running session's configuration; takes effect without re-linking the account. **OPERATOR** || `get` | `get(string $id): array` | Get one session. || `create` | `create(array $body): array` | Create a session (`$body['name']` required). **OPERATOR** || `delete` | `delete(string $id): void` | Delete a session. **OPERATOR** |@@ -764,103 +835,126 @@ All payloads are associative arrays; all listed methods are synchronous and retu#### `messages`-| Method | Signature | Description |-| -------------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- |-| `list` | `list(string $sessionId, array $query = []): array` | List stored messages. |-| `sendText` | `sendText(string $sessionId, array $body): array` | Send a text message (`send-text`). **OPERATOR** |-| `sendImage` | `sendImage(string $sessionId, array $body): array` | Send an image. **OPERATOR** |-| `sendVideo` | `sendVideo(string $sessionId, array $body): array` | Send a video. **OPERATOR** |-| `sendAudio` | `sendAudio(string $sessionId, array $body): array` | Send audio. **OPERATOR** |-| `sendDocument` | `sendDocument(string $sessionId, array $body): array` | Send a document. **OPERATOR** |-| `sendSticker` | `sendSticker(string $sessionId, array $body): array` | Send a sticker. **OPERATOR** |-| `sendLocation` | `sendLocation(string $sessionId, array $body): array` | Send a location. **OPERATOR** |-| `sendContact` | `sendContact(string $sessionId, array $body): array` | Send a contact card. **OPERATOR** |-| `sendTemplate` | `sendTemplate(string $sessionId, array $body): array` | Send a stored template. **OPERATOR** |-| `sendPoll` | `sendPoll(string $sessionId, array $body): array` | Send a native poll (2–12 options). **OPERATOR** |-| `reply` | `reply(string $sessionId, array $body): array` | Reply to a message. **OPERATOR** |-| `forward` | `forward(string $sessionId, array $body): array` | Forward a message. **OPERATOR** |-| `react` | `react(string $sessionId, array $body): array` | React to a message. **OPERATOR** |-| `delete` | `delete(string $sessionId, array $body): array` | Delete a message. **OPERATOR** |-| `editMessage` | `editMessage(string $sessionId, array $body): array` | Edit the text of a message already sent (`$body` needs `chatId`, `messageId`, `body`). **OPERATOR** |-| `history` | `history(string $sessionId, string $chatId, array $query = []): array` | Fetch chat history. |-| `reactions` | `reactions(string $sessionId, string $chatId, string $messageId): array` | List reactions on a message. |-| `sendBulk` | `sendBulk(string $sessionId, array $body): array` | Enqueue a bulk send batch. **OPERATOR** |-| `batchStatus` | `batchStatus(string $sessionId, string $batchId): array` | Get bulk batch status. |-| `cancelBatch` | `cancelBatch(string $sessionId, string $batchId): array` | Cancel a bulk batch. **OPERATOR** |+| Method | Signature | Description |+| -------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(string $sessionId, array $query = []): array` | List stored messages. |+| `sendText` | `sendText(string $sessionId, array $body): array` | Send a text message (`send-text`). **OPERATOR** |+| `sendImage` | `sendImage(string $sessionId, array $body): array` | Send an image. **OPERATOR** |+| `sendVideo` | `sendVideo(string $sessionId, array $body): array` | Send a video. **OPERATOR** |+| `sendAudio` | `sendAudio(string $sessionId, array $body): array` | Send audio. **OPERATOR** |+| `sendDocument` | `sendDocument(string $sessionId, array $body): array` | Send a document. **OPERATOR** |+| `sendSticker` | `sendSticker(string $sessionId, array $body): array` | Send a sticker. **OPERATOR** |+| `sendLocation` | `sendLocation(string $sessionId, array $body): array` | Send a location. **OPERATOR** |+| `sendContact` | `sendContact(string $sessionId, array $body): array` | Send a contact card. **OPERATOR** |+| `sendTemplate` | `sendTemplate(string $sessionId, array $body): array` | Send a stored template. **OPERATOR** |+| `sendPoll` | `sendPoll(string $sessionId, array $body): array` | Send a native poll (2–12 options). **OPERATOR** |+| `reply` | `reply(string $sessionId, array $body): array` | Reply to a message. **OPERATOR** |+| `forward` | `forward(string $sessionId, array $body): array` | Forward a message. **OPERATOR** |+| `react` | `react(string $sessionId, array $body): array` | React to a message. **OPERATOR** |+| `delete` | `delete(string $sessionId, array $body): array` | Delete a message. **OPERATOR** |+| `editMessage` | `editMessage(string $sessionId, array $body): array` | Edit the text of a message already sent (`$body` needs `chatId`, `messageId`, `body`). **OPERATOR** |+| `history` | `history(string $sessionId, string $chatId, array $query = []): array` | Fetch chat history. |+| `reactions` | `reactions(string $sessionId, string $chatId, string $messageId): array` | List reactions on a message. |+| `pin` | `pin(string $sessionId, array $body): array` | Pin a message in its chat. `durationSeconds` must be 86400, 604800 or 2592000; in a group only admins may pin. **OPERATOR** |+| `votePoll` | `votePoll(string $sessionId, array $body): array` | Cast a vote on a poll; `options` are the option texts, not ids. Not supported on Baileys (`501`). **OPERATOR** |+| `star` | `star(string $sessionId, array $body): array` | Star or unstar a message. Best-effort on whatsapp-web.js, which silently ignores a message it will not star. **OPERATOR** |+| `unpin` | `unpin(string $sessionId, array $body): array` | Unpin a pinned message. **OPERATOR** |+| `media` | `media(string $sessionId, string $chatId, string $messageId): array` | Fetch a message's stored media bytes: the archived file when one exists, else the inline copy on the message row. `404` when neither holds bytes. |+| `sendBulk` | `sendBulk(string $sessionId, array $body): array` | Enqueue a bulk send batch. **OPERATOR** |+| `batchStatus` | `batchStatus(string $sessionId, string $batchId): array` | Get bulk batch status. |+| `cancelBatch` | `cancelBatch(string $sessionId, string $batchId): array` | Cancel a bulk batch. **OPERATOR** |#### `contacts`-| Method | Signature | Description |-| ----------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------ |-| `list` | `list(string $sessionId, array $query = []): array` | List contacts. |-| `get` | `get(string $sessionId, string $contactId): array` | Get one contact. |-| `check` | `check(string $sessionId, string $number): array` | Check whether a number is on WhatsApp. |-| `profilePicture` | `profilePicture(string $sessionId, string $contactId): array` | Get a contact's profile picture. |-| `profilePictures` | `profilePictures(string $sessionId, array $ids): array` | Batch-resolve profile picture URLs for up to 50 contacts in one request. |-| `phone` | `phone(string $sessionId, string $contactId): array` | Resolve a contact's phone number. |-| `block` | `block(string $sessionId, string $contactId): array` | Block a contact. **OPERATOR** |-| `unblock` | `unblock(string $sessionId, string $contactId): array` | Unblock a contact. **OPERATOR** |+| Method | Signature | Description |+| ----------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |+| `list` | `list(string $sessionId, array $query = []): array` | List contacts. |+| `get` | `get(string $sessionId, string $contactId): array` | Get one contact. |+| `check` | `check(string $sessionId, string $number): array` | Check whether a number is on WhatsApp. |+| `profilePicture` | `profilePicture(string $sessionId, string $contactId): array` | Get a contact's profile picture. |+| `profilePictures` | `profilePictures(string $sessionId, array $ids): array` | Batch-resolve profile picture URLs for up to 50 contacts in one request. |+| `phone` | `phone(string $sessionId, string $contactId): array` | Resolve a contact's phone number. |+| `block` | `block(string $sessionId, string $contactId): array` | Block a contact. **OPERATOR** |+| `upsert` | `upsert(string $sessionId, string $contactId, array $body): array` | Save a contact to the account's addressbook, or edit an existing entry. **OPERATOR** |+| `delete` | `delete(string $sessionId, string $contactId): array` | Remove a contact from the account's addressbook. **OPERATOR** |+| `unblock` | `unblock(string $sessionId, string $contactId): array` | Unblock a contact. **OPERATOR** |#### `groups`-| Method | Signature | Description |-| --------------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |-| `list` | `list(string $sessionId, array $query = []): array` | List groups. |-| `get` | `get(string $sessionId, string $groupId): array` | Get one group. |-| `create` | `create(string $sessionId, array $body): array` | Create a group. **OPERATOR** |-| `joinGroup` | `joinGroup(string $sessionId, string $inviteCode): array` | Join a group via its invite code. **OPERATOR** |-| `addParticipants` | `addParticipants(string $sessionId, string $groupId, array $participants): array` | Add participants. **OPERATOR** |-| `removeParticipants` | `removeParticipants(string $sessionId, string $groupId, array $participants): array` | Remove participants. **OPERATOR** |-| `promoteParticipants` | `promoteParticipants(string $sessionId, string $groupId, array $participants): array` | Promote to admin. **OPERATOR** |-| `demoteParticipants` | `demoteParticipants(string $sessionId, string $groupId, array $participants): array` | Demote admins. **OPERATOR** |-| `setSubject` | `setSubject(string $sessionId, string $groupId, string $subject): array` | Update the group subject. **OPERATOR** |-| `setDescription` | `setDescription(string $sessionId, string $groupId, string $description): array` | Update the group description. **OPERATOR** |-| `getGroupSettings` | `getGroupSettings(string $sessionId, string $groupId): array` | Get the group settings (only the ones the active engine supports are present). |-| `updateGroupSettings` | `updateGroupSettings(string $sessionId, string $groupId, array $settings): array` | Update the group settings (at least one of `announce`, `locked`, `ephemeralSeconds`). **OPERATOR** |-| `leave` | `leave(string $sessionId, string $groupId): array` | Leave the group. **OPERATOR** |-| `inviteCode` | `inviteCode(string $sessionId, string $groupId): array` | Get the invite code. |-| `revokeInviteCode` | `revokeInviteCode(string $sessionId, string $groupId): array` | Revoke and regenerate the invite code. **OPERATOR** |+| Method | Signature | Description |+| --------------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(string $sessionId, array $query = []): array` | List groups. |+| `get` | `get(string $sessionId, string $groupId): array` | Get one group. |+| `create` | `create(string $sessionId, array $body): array` | Create a group. **OPERATOR** |+| `joinInfo` | `joinInfo(string $sessionId, string $code): array` | Preview a group from its invite code WITHOUT joining. Read-only, so it is safe to call on a code from an untrusted source. |+| `joinGroup` | `joinGroup(string $sessionId, string $inviteCode): array` | Join a group via its invite code. **OPERATOR** |+| `addParticipants` | `addParticipants(string $sessionId, string $groupId, array $participants): array` | Add participants. **OPERATOR** |+| `removeParticipants` | `removeParticipants(string $sessionId, string $groupId, array $participants): array` | Remove participants. **OPERATOR** |+| `promoteParticipants` | `promoteParticipants(string $sessionId, string $groupId, array $participants): array` | Promote to admin. **OPERATOR** |+| `demoteParticipants` | `demoteParticipants(string $sessionId, string $groupId, array $participants): array` | Demote admins. **OPERATOR** |+| `setSubject` | `setSubject(string $sessionId, string $groupId, string $subject): array` | Update the group subject. **OPERATOR** |+| `setDescription` | `setDescription(string $sessionId, string $groupId, string $description): array` | Update the group description. **OPERATOR** |+| `getGroupSettings` | `getGroupSettings(string $sessionId, string $groupId): array` | Get the group settings (only the ones the active engine supports are present). |+| `updateGroupSettings` | `updateGroupSettings(string $sessionId, string $groupId, array $settings): array` | Update the group settings (at least one of `announce`, `locked`, `ephemeralSeconds`). **OPERATOR** |+| `leave` | `leave(string $sessionId, string $groupId): array` | Leave the group. **OPERATOR** |+| `getPicture` | `getPicture(string $sessionId, string $groupId): array` | The group's picture URL, or `null` when it has none. |+| `setPicture` | `setPicture(string $sessionId, string $groupId, array $body): array` | Set the group's picture. **OPERATOR** |+| `deletePicture` | `deletePicture(string $sessionId, string $groupId): array` | Remove the group's picture. **OPERATOR** |+| `inviteCode` | `inviteCode(string $sessionId, string $groupId): array` | Get the invite code. |+| `revokeInviteCode` | `revokeInviteCode(string $sessionId, string $groupId): array` | Revoke and regenerate the invite code. **OPERATOR** |#### `chats`-| Method | Signature | Description |-| ------------ | --------------------------------------------------- | ------------------------------------------- |-| `list` | `list(string $sessionId, array $query = []): array` | List chats. |-| `markRead` | `markRead(string $sessionId, array $body): array` | Mark chat(s) read. **OPERATOR** |-| `markUnread` | `markUnread(string $sessionId, array $body): array` | Mark chat(s) unread. **OPERATOR** |-| `delete` | `delete(string $sessionId, array $body): array` | Delete chat(s). **OPERATOR** |-| `sendState` | `sendState(string $sessionId, array $body): array` | Send a typing/recording state. **OPERATOR** |+| Method | Signature | Description |+| ------------------- | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(string $sessionId, array $query = []): array` | List chats. |+| `subscribePresence` | `subscribePresence(string $sessionId, array $body): array` | Subscribe to a chat's presence; updates then arrive as `presence.update` events. The subscription belongs to the connection and does not survive a reconnect. **OPERATOR** |+| `getPresence` | `getPresence(string $sessionId, string $chatId): ?array` | The last presence reported for a chat, or `null` when none has been. Held in memory, so a restart clears it. |+| `markRead` | `markRead(string $sessionId, array $body): array` | Mark chat(s) read. **OPERATOR** |+| `markUnread` | `markUnread(string $sessionId, array $body): array` | Mark chat(s) unread. **OPERATOR** |+| `archive` | `archive(string $sessionId, array $body): array` | Archive or unarchive a chat. `success: false` means the engine declined. **OPERATOR** |+| `clearMessages` | `clearMessages(string $sessionId, string $chatId): array` | Delete every message in a chat, keeping the chat itself. **OPERATOR** |+| `delete` | `delete(string $sessionId, array $body): array` | Delete chat(s). **OPERATOR** |+| `sendState` | `sendState(string $sessionId, array $body): array` | Send a typing/recording state. **OPERATOR** |#### `webhooks`-| Method | Signature | Description |-| -------- | ----------------------------------------------------------- | ------------------------------- |-| `list` | `list(string $sessionId): array` | List webhooks. **OPERATOR** |-| `get` | `get(string $sessionId, string $id): array` | Get one webhook. **OPERATOR** |-| `create` | `create(string $sessionId, array $body): array` | Create a webhook. **OPERATOR** |-| `update` | `update(string $sessionId, string $id, array $body): array` | Update a webhook. **OPERATOR** |-| `delete` | `delete(string $sessionId, string $id): void` | Delete a webhook. **OPERATOR** |-| `test` | `test(string $sessionId, string $id): array` | Send a test event. **OPERATOR** |+| Method | Signature | Description |+| ------------------ | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `listAll` | `listAll(array $query = []): array` | List webhooks across EVERY session the key can see, not one session's. **OPERATOR** |+| `deliveryFailures` | `deliveryFailures(array $query = [])` | Deliveries that were attempted and failed — the diagnostic for a webhook that stopped arriving. A delivery a smart filter suppressed never reaches this log. **ADMIN** |+| `list` | `list(string $sessionId): array` | List webhooks. **OPERATOR** |+| `get` | `get(string $sessionId, string $id): array` | Get one webhook. **OPERATOR** |+| `create` | `create(string $sessionId, array $body): array` | Create a webhook. **OPERATOR** |+| `update` | `update(string $sessionId, string $id, array $body): array` | Update a webhook. **OPERATOR** |+| `delete` | `delete(string $sessionId, string $id): void` | Delete a webhook. **OPERATOR** |+| `test` | `test(string $sessionId, string $id): array` | Send a test event. **OPERATOR** |#### `labels` _(WhatsApp Business)_-| Method | Signature | Description |-| ---------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------- |-| `list` | `list(string $sessionId): array` | List labels. |-| `get` | `get(string $sessionId, string $labelId): array` | Get one label. |-| `forChat` | `forChat(string $sessionId, string $chatId): array` | List labels applied to a chat. |-| `addToChat` | `addToChat(string $sessionId, string $chatId, array $body): array` | Add a label to a chat (`$body` needs `labelId`). **OPERATOR** |-| `removeFromChat` | `removeFromChat(string $sessionId, string $chatId, string $labelId): array` | Remove a label from a chat. **OPERATOR** |+| Method | Signature | Description |+| ---------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |+| `list` | `list(string $sessionId): array` | List labels. |+| `get` | `get(string $sessionId, string $labelId): array` | Get one label. |+| `chats` | `chats(string $sessionId, string $labelId): array` | Every chat carrying a label. **whatsapp-web.js only** — Baileys answers `501`. |+| `upsert` | `upsert(string $sessionId, string $labelId, array $body): array` | Create or update a label. **Baileys only** — whatsapp-web.js answers `501`. **OPERATOR** |+| `delete` | `delete(string $sessionId, string $labelId): array` | Delete a label. **OPERATOR** |+| `forChat` | `forChat(string $sessionId, string $chatId): array` | List labels applied to a chat. |+| `addToChat` | `addToChat(string $sessionId, string $chatId, array $body): array` | Add a label to a chat (`$body` needs `labelId`). **OPERATOR** |+| `removeFromChat` | `removeFromChat(string $sessionId, string $chatId, string $labelId): array` | Remove a label from a chat. **OPERATOR** |#### `channels` _(Newsletters)_-| Method | Signature | Description |-| ------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------- |-| `list` | `list(string $sessionId): array` | List channels. |-| `get` | `get(string $sessionId, string $channelId): array` | Get one channel. |-| `messages` | `messages(string $sessionId, string $channelId, array $query = []): array` | Recent channel messages. |-| `subscribe` | `subscribe(string $sessionId, array $body): array` | Subscribe via invite code (`$body` needs `inviteCode`). **OPERATOR** |-| `unsubscribe` | `unsubscribe(string $sessionId, string $channelId): array` | Unsubscribe from a channel. **OPERATOR** |+| Method | Signature | Description |+| ------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(string $sessionId): array` | List channels. |+| `get` | `get(string $sessionId, string $channelId): array` | Get one channel. |+| `messages` | `messages(string $sessionId, string $channelId, array $query = []): array` | Recent channel messages. |+| `create` | `create(string $sessionId, array $body): array` | Create a channel this account owns. **OPERATOR** |+| `delete` | `delete(string $sessionId, string $channelId): array` | Delete a channel this account owns. Irreversible, and every subscriber loses it — distinct from `unsubscribe`. **OPERATOR** |+| `mute` | `mute(string $sessionId, string $channelId, array $body): array` | Mute or unmute a channel's notifications. **OPERATOR** |+| `subscribe` | `subscribe(string $sessionId, array $body): array` | Subscribe via invite code (`$body` needs `inviteCode`). **OPERATOR** |+| `unsubscribe` | `unsubscribe(string $sessionId, string $channelId): array` | Unsubscribe from a channel. **OPERATOR** |#### `catalog` _(WhatsApp Business)_@@ -874,15 +968,16 @@ All payloads are associative arrays; all listed methods are synchronous and retu#### `status` _(Stories)_-| Method | Signature | Description |-| ------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |-| `list` | `list(string $sessionId): array` | List status updates. |-| `fromContact` | `fromContact(string $sessionId, string $contactId): array` | Status updates from one contact. |-| `media` | `media(string $sessionId, string $statusId): array` | Fetch the stored media bytes for a status update (`{data, contentType}`; 404 when there is none). |-| `sendText` | `sendText(string $sessionId, array $body): array` | Post a text status. **OPERATOR** |-| `sendImage` | `sendImage(string $sessionId, array $body): array` | Post an image status. **OPERATOR** |-| `sendVideo` | `sendVideo(string $sessionId, array $body): array` | Post a video status. **OPERATOR** |-| `delete` | `delete(string $sessionId, string $statusId): void` | Delete a status. **OPERATOR** |+| Method | Signature | Description |+| ------------- | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `list` | `list(string $sessionId): array` | List status updates. |+| `fromContact` | `fromContact(string $sessionId, string $contactId): array` | Status updates from one contact. |+| `media` | `media(string $sessionId, string $statusId): array` | Fetch the stored media bytes for a status update (`{data, contentType}`; 404 when there is none). |+| `sendText` | `sendText(string $sessionId, array $body): array` | Post a text status. **OPERATOR** |+| `sendImage` | `sendImage(string $sessionId, array $body): array` | Post an image status. **OPERATOR** |+| `sendVideo` | `sendVideo(string $sessionId, array $body): array` | Post a video status. **OPERATOR** |+| `sendVoice` | `sendVoice(string $sessionId, array $body): array` | Post an audio status as a voice note. WhatsApp plays one only as Ogg/Opus and neither engine transcodes, so convert with `media.convertVoice` first. **OPERATOR** |+| `delete` | `delete(string $sessionId, string $statusId): void` | Delete a status. **OPERATOR** |#### `search`@@ -914,6 +1009,14 @@ All payloads are associative arrays; all listed methods are synchronous and retu| ------------ | ------------------------------------------------------ | -------------------------------------------------------------------------------------------- || `rejectCall` | `rejectCall(string $sessionId, string $callId): array` | Reject a ringing incoming call (404 when it is not found or no longer ringing). **OPERATOR** |+#### `media`++| Method | Signature | Description |+| ------------------ | ------------------------------------------------------ | -------------------------------------------------------------------------------------------- |+| `conversionStatus` | `conversionStatus(string $sessionId): array` | Whether conversion is switched on for this deployment AND the ffmpeg binary can be run. |+| `convertVoice` | `convertVoice(string $sessionId, array $media): array` | Convert audio into a WhatsApp voice note (Ogg/Opus, mono, tuned for speech). **OPERATOR** |+| `convertVideo` | `convertVideo(string $sessionId, array $media): array` | Convert video into an MP4 every WhatsApp client accepts (baseline H.264 + AAC). **OPERATOR** |+#### `health`| Method | Signature | Description |diff --git a/package.json b/package.jsonindex 0c5599bad..c2055e2b1 100644--- a/package.json+++ b/package.json@@ -31,12 +31,13 @@"check:dockerignore": "node scripts/check-dockerignore.mjs","check:sdk-routes": "node scripts/check-sdk-routes.mjs","check:sdk-events": "node scripts/check-sdk-events.mjs",+ "check:sdk-docs": "node scripts/check-sdk-docs.mjs","openapi:export": "ts-node scripts/export-openapi.ts openapi.json","openapi:check": "ts-node scripts/export-openapi.ts /tmp/openapi.generated.json && diff -u openapi.json /tmp/openapi.generated.json","lint": "eslint \"{src,apps,libs,test}/**/*.ts\"","lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix","test": "jest",- "test:scripts": "node --test scripts/postinstall.spec.js scripts/patch-wwebjs-newsletter-preview.spec.js scripts/patch-wwebjs-status.spec.js scripts/patch-wwebjs-ready-sync.spec.js scripts/patch-baileys-appstate.spec.js scripts/dockerfile-patchers.spec.js scripts/check-upstream-surface.spec.mjs",+ "test:scripts": "node --test scripts/postinstall.spec.js scripts/patch-wwebjs-newsletter-preview.spec.js scripts/patch-wwebjs-status.spec.js scripts/patch-wwebjs-ready-sync.spec.js scripts/patch-baileys-appstate.spec.js scripts/dockerfile-patchers.spec.js scripts/check-upstream-surface.spec.mjs scripts/check-sdk-docs.spec.mjs","test:watch": "jest --watch","test:cov": "jest --coverage","test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",diff --git a/scripts/check-sdk-docs.mjs b/scripts/check-sdk-docs.mjsnew file mode 100644index 000000000..869fc76cc--- /dev/null+++ b/scripts/check-sdk-docs.mjs@@ -0,0 +1,225 @@+#!/usr/bin/env node+/**+ * SDK documentation-coverage guard.+ *+ * The SDK surface is enumerated at six independent hand-maintained prose sites while the shipped+ * surface lives in `sdk/javascript/src/resources/*.ts`. Nothing bound the two, so fourteen feature+ * commits drifted them: seven edited only the §18.1 summary row and left the three per-language+ * tables behind, and seven never touched `docs/18` at all — which is how server-side media+ * conversion, presence subscription and session config came to ship in all five clients while the+ * document that calls itself the authoritative surface said they did not exist.+ *+ * The drift was strictly one-directional, so nobody was misled toward a method that does not exist.+ * They were misled away from a dozen that do, and either re-implemented them through+ * `client.request()` or judged the gateway feature unusable.+ *+ * SCOPE, stated so the guarantee is not read wider than it is:+ * - Method-level for the five sites that enumerate methods: `docs/18` §18.1 and its §18.2/§18.3/+ * §18.4 per-language tables, and `sdk/README.md`'s Coverage table.+ * - Resource-level only for `sdk/java/README.md` and `sdk/go/README.md`, which list resources and+ * deliberately delegate their method tables (docs/18 lines 12-13).+ * - Compares the SET of names in each language's own idiom — Python snake_case, everyone else+ * camelCase. It does NOT check signatures, descriptions or **OPERATOR** annotations, which carry+ * information that exists nowhere else and cannot be derived from the source.+ * - One direction is enough to catch the drift that happened, but both are reported: a documented+ * method that does not ship is a false promise and worse than an omission.+ *+ * Lives in ci.yml's lint job rather than sdk-ci.yml for the same reason as the route and event+ * guards: sdk-ci is path-filtered, so a docs-only PR runs none of it.+ *+ * Run locally: `npm run check:sdk-docs`.+ */+import { readFileSync, readdirSync } from 'node:fs';+import { join, resolve, dirname } from 'node:path';+import { fileURLToPath } from 'node:url';++const root = join(dirname(fileURLToPath(import.meta.url)), '..');+const read = (...parts) => readFileSync(join(root, ...parts), 'utf8');++const RESOURCE_DIR = 'sdk/javascript/src/resources';++/** Resources whose per-language tables are headed by a name other than the file's. */+const SECTION_SUFFIX = /\s*_\([^)]*\)_\s*$/;++/** `getQrCode` -> `get_qr_code`, the spelling the Python client ships. */+export const snake = name => name.replace(/([a-z0-9])([A-Z])/g, '$1_$2').toLowerCase();++/**+ * Summary tables abbreviate families of methods, in two idioms: a shared suffix+ * (`add/remove/promote/demoteParticipants`) and a shared prefix (`sendImage/Video/Audio`). Expanding+ * both is what lets the tables stay readable without the guard reporting a wall of false gaps.+ */+export function methodsInSummaryCell(cell) {+ const found = new Set();+ for (const token of cell+ .replace(/_\([^)]*\)_/g, '')+ .split(/[,\s]+/)+ .filter(Boolean)) {+ const name = token.replace(/`/g, '');+ if (!/^[A-Za-z][A-Za-z0-9/]*$/.test(name)) continue;+ if (!name.includes('/')) {+ found.add(name);+ continue;+ }+ const parts = name.split('/');+ const first = parts[0];+ const last = parts[parts.length - 1];+ found.add(first);+ found.add(last);+ const tailAt = last.search(/[A-Z]/);+ if (tailAt > 0) for (const part of parts.slice(0, -1)) found.add(part + last.slice(tailAt));+ const headAt = first.search(/[A-Z]/);+ if (headAt > 0) for (const part of parts.slice(1)) found.add(first.slice(0, headAt) + part);+ }+ return found;+}++/** The `| \`resource\` | methods |` row of a summary table, or null when the resource has no row. */+export function summaryRow(text, resource) {+ const row = text.match(new RegExp(`^\\|\\s*\`${resource}\`\\s*\\|([^\\n]*)\\|`, 'm'));+ return row ? methodsInSummaryCell(row[1]) : null;+}++/** The first-column method names of a `#### \`resource\`` table, or null when the section is absent. */+export function sectionMethods(text, heading) {+ const start = text.search(new RegExp(`^#### \`${heading}\``, 'm'));+ if (start === -1) return null;+ // Resume after the heading's own line: slicing one character in would leave `###` at position 0,+ // where the next-heading search matches immediately and every table reads as empty.+ const rest = text.slice(text.indexOf('\n', start) + 1);+ const end = rest.search(/^#{3,4} /m);+ const table = end === -1 ? rest : rest.slice(0, end);+ return new Set([...table.matchAll(/^\|\s*`([A-Za-z_][A-Za-z0-9_]*)`\s*\|/gm)].map(m => m[1]));+}++/** Slice a document between two headings, so §18.2's `#### \`sessions\`` is not read as §18.4's. */+export function slice(text, from, to) {+ const start = text.indexOf(from);+ if (start === -1) return '';+ const end = to ? text.indexOf(to, start + from.length) : -1;+ return end === -1 ? text.slice(start) : text.slice(start, end);+}++/** Harvest the shipped surface: resource name -> public method names, in declaration order. */+export function harvestShipped(dir = RESOURCE_DIR) {+ const shipped = new Map();+ for (const file of readdirSync(join(root, dir)).sort()) {+ if (!file.endsWith('.ts')) continue;+ const source = read(dir, file)+ .replace(/\/\*[\s\S]*?\*\//g, '')+ .replace(/^\s*\/\/.*$/gm, '');+ const body = source.slice(source.indexOf('export class'));+ const methods = [+ ...body.matchAll(/^ {2}(?!constructor\b|private\b|readonly\b|static\b)([a-zA-Z][A-Za-z0-9]*)\s*[(<]/gm),+ ];+ shipped.set(file.replace(/\.ts$/, ''), [...new Set(methods.map(m => m[1]))]);+ }+ return shipped;+}++function main() {+ const shipped = harvestShipped();++ const totalMethods = [...shipped.values()].reduce((n, m) => n + m.length, 0);+ const errors = [];++ // A pattern that silently stopped matching would make this gate vacuous, so an implausibly small+ // harvest is a failure rather than a pass. The per-resource check is the one that matters: drift+ // arrives one restyled file at a time, and a single resource falling to zero barely moves the+ // total — the guard would report a clean pass over a resource it had stopped reading entirely.+ const unharvested = [...shipped].filter(([, methods]) => methods.length === 0).map(([name]) => name);+ if (shipped.size < 10 || totalMethods < 100 || unharvested.length) {+ console.error(+ `\n✖ harvested ${shipped.size} resources / ${totalMethods} methods from ${RESOURCE_DIR} — the scan pattern has drifted.`,+ );+ if (unharvested.length) console.error(` no methods found in: ${unharvested.join(', ')}`);+ console.error('');+ process.exit(1);+ }++ const doc18 = read('docs/18-sdk-design.md');+ const SITES = [+ {+ label: 'docs/18 §18.1 Resource Coverage',+ text: slice(doc18, '## 18.1 Overview', '## 18.2 '),+ lookup: (text, resource) => summaryRow(text, resource),+ missingSection: resource => `\`${resource}\` has no row (${shipped.get(resource).length} methods ship)`,+ },+ {+ label: 'docs/18 §18.2 (JavaScript)',+ text: slice(doc18, '## 18.2 ', '## 18.3 '),+ lookup: (text, resource) => sectionMethods(text, resource),+ missingSection: resource => `no \`#### ${resource}\` section`,+ },+ {+ label: 'docs/18 §18.3 (Python)',+ text: slice(doc18, '## 18.3 ', '## 18.4 '),+ lookup: (text, resource) => sectionMethods(text, `client\\.${resource}`),+ spell: snake,+ missingSection: resource => `no \`#### client.${resource}\` section`,+ },+ {+ label: 'docs/18 §18.4 (PHP)',+ text: slice(doc18, '## 18.4 ', '## 18.5 '),+ lookup: (text, resource) => sectionMethods(text, resource),+ missingSection: resource => `no \`#### ${resource}\` section`,+ },+ {+ label: 'sdk/README.md Coverage',+ text: slice(read('sdk/README.md'), '## Coverage', '\n## '),+ lookup: (text, resource) => summaryRow(text, resource),+ missingSection: resource => `\`${resource}\` has no row (${shipped.get(resource).length} methods ship)`,+ },+ ];++ for (const site of SITES) {+ const spell = site.spell ?? (name => name);+ for (const [resource, methods] of shipped) {+ const documented = site.lookup(site.text, resource.replace(SECTION_SUFFIX, ''));+ if (documented === null) {+ errors.push(`${site.label}: ${site.missingSection(resource)}.`);+ continue;+ }+ for (const method of methods) {+ if (!documented.has(spell(method))) {+ errors.push(`${site.label}: \`${resource}\` omits \`${spell(method)}\`, which the client ships.`);+ }+ }+ }+ }++ // Resource-level only: these two delegate their method tables to the language's own idiom.+ const RESOURCE_LISTS = [+ {+ label: 'sdk/java/README.md',+ text: slice(read('sdk/java/README.md'), '## Resources', '\n## '),+ token: r => `\`${r}\``,+ },+ {+ label: 'sdk/go/README.md',+ text: read('sdk/go/README.md'),+ token: r => `client.${r.charAt(0).toUpperCase()}${r.slice(1)}`,+ },+ ];+ for (const list of RESOURCE_LISTS) {+ for (const resource of shipped.keys()) {+ if (!list.text.includes(list.token(resource))) {+ errors.push(`${list.label}: does not list \`${resource}\`, which the client ships.`);+ }+ }+ }++ if (errors.length) {+ console.error('\n✖ SDK docs do not cover the shipped client surface:');+ for (const e of errors) console.error(` - ${e}`);+ console.error(`\n${errors.length} finding(s). Document the method, or remove it from the client.\n`);+ process.exit(1);+ }+ console.log(+ `✓ SDK docs cover every shipped client method (${totalMethods} methods across ${shipped.size} resources).`,+ );+}++if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {+ main();+}diff --git a/scripts/check-sdk-docs.spec.mjs b/scripts/check-sdk-docs.spec.mjsnew file mode 100644index 000000000..cb800080c--- /dev/null+++ b/scripts/check-sdk-docs.spec.mjs@@ -0,0 +1,89 @@+import test from 'node:test';+import assert from 'node:assert/strict';+import { snake, methodsInSummaryCell, summaryRow, sectionMethods, slice, harvestShipped } from './check-sdk-docs.mjs';++test('snake-cases a JS method into the Python spelling', () => {+ assert.equal(snake('getQrCode'), 'get_qr_code');+ assert.equal(snake('conversionStatus'), 'conversion_status');+ assert.equal(snake('list'), 'list');+});++// The summary tables abbreviate, so an expander that stopped expanding would report a wall of gaps+// that are not gaps — and the natural "fix" for that noise is to weaken the guard.+test('expands a shared-suffix abbreviation', () => {+ const found = methodsInSummaryCell('list, add/remove/promote/demoteParticipants, leave');+ for (const m of ['addParticipants', 'removeParticipants', 'promoteParticipants', 'demoteParticipants']) {+ assert.ok(found.has(m), `expected ${m}`);+ }+ assert.ok(found.has('list') && found.has('leave'));+});++test('expands a shared-prefix abbreviation', () => {+ const found = methodsInSummaryCell('sendText, sendImage/Video/Audio/Document/Sticker');+ for (const m of ['sendImage', 'sendVideo', 'sendAudio', 'sendDocument', 'sendSticker']) {+ assert.ok(found.has(m), `expected ${m}`);+ }+});++test('expands a two-part abbreviation whose first half is a bare prefix', () => {+ const found = methodsInSummaryCell('get/updateGroupSettings');+ assert.ok(found.has('getGroupSettings'));+ assert.ok(found.has('updateGroupSettings'));+});++test('drops the trailing italic qualifier rather than reading it as a method', () => {+ const found = methodsInSummaryCell('list, get _(WhatsApp Business)_');+ assert.deepEqual([...found].sort(), ['get', 'list']);+});++test('reports a missing summary row as absent, not as empty', () => {+ const table = ['| Resource | Methods |', '| --- | --- |', '| `calls` | rejectCall |'].join('\n');+ assert.equal(summaryRow(table, 'media'), null);+ assert.deepEqual([...summaryRow(table, 'calls')], ['rejectCall']);+});++// The bug this file exists to keep fixed: resuming one character into the heading leaves `###` at+// position 0, the next-heading search matches immediately, and every table reads as empty — which+// presents as a false failure on every documented method at once.+test('reads a section table without swallowing it at the heading', () => {+ const doc = [+ '#### `sessions`',+ '',+ '| Method | Signature | Description |',+ '| --- | --- | --- |',+ '| `list` | `list()` | List sessions. |',+ '| `getConfig` | `getConfig(id)` | Read config. |',+ '',+ '#### `messages`',+ '',+ '| `send` | `send()` | Send. |',+ ].join('\n');+ assert.deepEqual([...sectionMethods(doc, 'sessions')].sort(), ['getConfig', 'list']);+ assert.equal(sectionMethods(doc, 'media'), null);+});++test('matches a heading carrying an italic qualifier', () => {+ const doc = ['#### `labels` _(WhatsApp Business)_', '', '| `list` | `list()` | List. |'].join('\n');+ assert.deepEqual([...sectionMethods(doc, 'labels')], ['list']);+});++test('slices a language section so an identical heading elsewhere is not read', () => {+ const doc = ['## 18.2 JS', '#### `sessions`', '| `a` | x | y |', '## 18.4 PHP', '#### `sessions`', '| `b` | x | y |'].join(+ '\n',+ );+ assert.deepEqual([...sectionMethods(slice(doc, '## 18.2 ', '## 18.4 '), 'sessions')], ['a']);+ assert.deepEqual([...sectionMethods(slice(doc, '## 18.4 ', null), 'sessions')], ['b']);+});++// Vacuity: the guard's own scan pattern is the thing most likely to rot silently, and a harvest that+// quietly returns nothing would turn every check below it into a pass.+test('harvests the real client surface, and every resource has at least one method', () => {+ const shipped = harvestShipped();+ assert.ok(shipped.size >= 16, `expected >= 16 resources, got ${shipped.size}`);+ const total = [...shipped.values()].reduce((n, m) => n + m.length, 0);+ assert.ok(total >= 130, `expected >= 130 methods, got ${total}`);+ for (const [resource, methods] of shipped) {+ assert.ok(methods.length > 0, `${resource} harvested no methods`);+ assert.ok(!methods.includes('constructor'), `${resource} harvested its constructor`);+ }+});diff --git a/sdk/README.md b/sdk/README.mdindex 28df8d815..ba754ed04 100644--- a/sdk/README.md+++ b/sdk/README.md@@ -24,11 +24,11 @@ All five SDKs expose the same fluent resource surface:| Resource | Methods || ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| `sessions` | list, get, create, delete, start, stop, logout, forceKill, getQrCode, requestPairingCode, stats |+| `sessions` | list, get, getConfig, updateConfig, create, delete, start, stop, logout, forceKill, getQrCode, requestPairingCode, stats || `messages` | list, sendText, sendImage/Video/Audio/Document/Sticker, sendLocation, sendContact, sendTemplate, sendPoll, reply, forward, react, delete, editMessage, history, reactions, media, pin, unpin, star, votePoll, sendBulk, batchStatus, cancelBatch || `contacts` | list, get, check, profilePicture, profilePictures, phone, upsert, delete, block, unblock || `groups` | list, get, create, joinGroup, joinInfo, add/remove/promote/demoteParticipants, setSubject, setDescription, get/updateGroupSettings, leave, getPicture, setPicture, deletePicture, inviteCode, revokeInviteCode |-| `webhooks` | list, get, create, update, delete, test |+| `webhooks` | list, listAll, deliveryFailures, get, create, update, delete, test || `chats` | list, markRead, markUnread, archive, clearMessages, delete, sendState, subscribePresence, getPresence || `labels` | list, get, chats, forChat, upsert, delete, addToChat, removeFromChat _(WhatsApp Business)_ || `channels` | list, get, messages, create, delete, mute, subscribe, unsubscribe _(Newsletters)_ |diff --git a/sdk/go/README.md b/sdk/go/README.mdindex ecd9835a7..7954e012f 100644--- a/sdk/go/README.md+++ b/sdk/go/README.md@@ -53,7 +53,8 @@ func main() {`client.Sessions`, `client.Messages`, `client.Contacts`, `client.Groups`,`client.Webhooks`, `client.Chats`, `client.Status`, `client.Labels`,`client.Channels`, `client.Catalog`, `client.Templates`, `client.Health`,- `client.Search`, `client.Auth`, `client.Profile`, `client.Calls`.+ `client.Search`, `client.Auth`, `client.Profile`, `client.Calls`,+ `client.Media`.- **Context-first** — every network method takes `ctx context.Context` as itsfirst argument; the context bounds the request (and any retries).- **Functional options + DI** — inject dependencies instead of relying ondiff --git a/sdk/java/README.md b/sdk/java/README.mdindex 8a93bfafa..d698fa327 100644--- a/sdk/java/README.md+++ b/sdk/java/README.md@@ -67,7 +67,7 @@ and PHP SDKs:`sessions` · `messages` · `contacts` · `groups` · `webhooks` · `chats` ·`labels` · `channels` · `catalog` · `status` · `templates` · `health` · `search` ·-`profile` · `calls`,+`profile` · `calls` · `media`,plus `client.auth()`.Operator-only modules (`docker`, `metrics`, `infra`, `plugins`, `mcp`) are