WhatsApp Gateway
API referenceGroups

Reset the group invite link

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.

DELETE
/api/v1/sessions/{session}/groups/{gid}/invite

Authorization

AuthorizationBearer <token>

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

session*string

The WhatsApp session id that owns the group; must be connected for this live action.

gid*string

The group's JID, ending in @g.us. Percent-encode the @ as %40 in the URL path.

Response Body

application/json

application/json

curl -X DELETE "https://example.com/api/v1/sessions/01HZ0SESSION0000000000000/groups/120363041234567890@g.us/invite"
{  "invite": "string"}
{  "error": {    "code": "not_found",    "details": {      "property1": null,      "property2": null    },    "message": "session not found"  }}