WhatsApp Gateway
API referenceGroups

Update group settings

Changes the group's settings — **subject**, **description**, whether only admins can post (**announce**), and whether only admins can edit group info (**locked**). **Partial update:** send only the fields you want to change; omitted fields are left untouched. Each field maps to a separate WhatsApp operation, applied in order. **Capability:** requires `send`. **Precondition (live action):** the session must be **connected** and (for most settings) its account must be a group **admin**. If the session is not connected the gateway responds **501 `not_implemented`**. **Success:** **204 No Content**. **Errors:** - **400 `validation_error`** — malformed body. - **404 `not_found`** — the session or group does not exist (or is not yours). - **403 `forbidden`** — the session's account lacks the rights to change this setting. - **501 `not_implemented`** — the session is not connected.

PATCH
/api/v1/sessions/{session}/groups/{gid}

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.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

announce?boolean

Announcement mode. When true, only admins may post messages; when false, all members may post. Omit to leave unchanged.

description?string

New group description / topic text shown in the group info screen. Omit to leave unchanged.

locked?boolean

Locked (info-edit) mode. When true, only admins may edit the group subject, description, and icon; when false, any member may. Omit to leave unchanged.

subject?string

New group subject (display name). Omit to leave unchanged. Sending null is not a valid update — only present fields are applied.

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/sessions/01HZ0SESSION0000000000000/groups/120363041234567890@g.us" \  -H "Content-Type: application/json" \  -d '{}'
Empty
{  "error": {    "code": "not_found",    "details": {      "property1": null,      "property2": null    },    "message": "session not found"  }}