List a group's members
Returns the members of the group, each with their JID and role (member or admin). **Capability:** requires `read`. **Served from stored data:** no live WhatsApp connection is needed. **Response:** a `List` envelope of group-member objects. The current implementation returns all members in a single page with an empty `nextCursor`. **Errors:** - **404 `not_found`** — the session does not exist (or is not yours), or no group with this `gid` is stored for it.
Send Authorization: Bearer <token>. The router accepts two kinds of token and tries each in turn: a frontend-minted login JWT (verified against the frontend JWKS; the person's org + role are read from it), or an api-key for a script/service (carrying a fixed set of gateway permissions). The bearerFormat: JWT label describes the person-login case.
In: header
Path Parameters
The WhatsApp session id that the group belongs to.
The group's JID, ending in @g.us. Percent-encode the @ as %40 in the URL path; the gateway URL-decodes it.
Response Body
application/json
application/json
curl -X GET "https://example.com/api/v1/sessions/01HZ0SESSION0000000000000/groups/120363041234567890@g.us/members"{ "data": [ { "firstSeenAt": 1719662400000, "groupJid": "120363021234567890@g.us", "id": 7781, "lastSeenAt": 1719662400000, "lid": "205227043110953@lid", "role": "member", "sessionId": "01J9ZX8K2QHV0M3T6R7P4N5W8C", "tag": "~Alice" } ], "nextCursor": "string"}{ "error": { "code": "not_found", "details": { "property1": null, "property2": null }, "message": "session not found" }}Reset the group invite link DELETE
Cancels the current invite link and generates a new one, then returns it in the shape `{ "invite": "https://chat.whatsapp.com/..." }`. **Side effect:** any previously shared link **stops working** immediately — share the returned link going forward. **Capability:** requires `send`. **Precondition (live action):** the session must be **connected** and its account must be a group **admin**. If the session is not connected the gateway responds **501 `not_implemented`**. **Errors:** - **404 `not_found`** — the session or group does not exist (or is not yours). - **403 `forbidden`** — the session's account is not an admin of this group. - **501 `not_implemented`** — the session is not connected.
Add members to a group POST
Adds the listed **participants** (user JIDs) to the group. **Capability:** requires `send`. **Precondition (live action):** the session must be **connected** and its account must be a group **admin**. If the session is not connected the gateway responds **501 `not_implemented`**. **Success:** **204 No Content** (empty body). **Notes:** WhatsApp may decline to add some numbers (privacy settings, invalid number) without failing the whole call. Adding a JID that is already a member is a no-op. **Errors:** - **400 `validation_error`** — empty participant list or a malformed JID. - **404 `not_found`** — the session or group does not exist (or is not yours). - **403 `forbidden`** — the session's account is not an admin of this group. - **501 `not_implemented`** — the session is not connected.