Remove a member from a group
Removes the member named by `jid` from 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**. Idempotent in effect — removing someone who is not (or no longer) a member still ends with them not in the group. **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.
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 owns the group; must be connected for this live action.
The group's JID, ending in @g.us. Percent-encode the @ as %40 in the URL path.
The member's user JID to remove (ending in @s.whatsapp.net). Percent-encode the @ as %40 in the URL path.
Response Body
application/json
curl -X DELETE "https://example.com/api/v1/sessions/01HZ0SESSION0000000000000/groups/120363041234567890@g.us/members/6281234567890@s.whatsapp.net"{ "error": { "code": "not_found", "details": { "property1": null, "property2": null }, "message": "session not found" }}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.
Demote an admin to member POST
Removes admin rights from the member named by `jid`, making them a regular member. **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**. Demoting someone who is already a regular member is a no-op. **Errors:** - **404 `not_found`** — the session, group, or member 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.