> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Create and manage WhatsApp groups

**Auth:** `TokenAccount` or `TokenInstance` on every route. Each call validates the instance ownership.

This section covers all `/api/group/*` routes: creation, listing, details, participant management, metadata updates, invite link reset, joining, and leaving. For communities (parent groups), see [Communities](/en/api/communities/overview).

## Endpoints

| Method | Path                                | Function                                                                          |
| ------ | ----------------------------------- | --------------------------------------------------------------------------------- |
| POST   | `/api/group/create/:instance`       | [Create group](/en/api/groups/create)                                             |
| GET    | `/api/group/list/:instance`         | [List groups](/en/api/groups/list)                                                |
| GET    | `/api/group/info/:instance`         | [Group details](/en/api/groups/info)                                              |
| PUT    | `/api/group/update/:instance`       | [Update name / description / picture / permissions](/en/api/groups/update)        |
| POST   | `/api/group/participants/:instance` | [Add / remove / promote / demote / approve / reject](/en/api/groups/participants) |
| POST   | `/api/group/join/:instance`         | [Join via code / link](/en/api/groups/join)                                       |
| POST   | `/api/group/resetLink/:instance`    | [Revoke and regenerate invite link](/en/api/groups/reset-link)                    |
| GET    | `/api/group/requests/:instance`     | [List pending requests](/en/api/groups/requests)                                  |
| DELETE | `/api/group/leave/:instance`        | [Leave group](/en/api/groups/leave)                                               |

## Accepted identifiers

Most endpoints accept an `identifier` field, which can be:

| Form        | Example                               |
| ----------- | ------------------------------------- |
| Group JID   | `120363406289005073@g.us`             |
| Invite code | `ABC123XYZ`                           |
| Full link   | `https://chat.whatsapp.com/ABC123XYZ` |

<Warning>
  **Exceptions:**

  * `POST /api/group/join` accepts **only** a code or link (no JID).
  * `GET /api/community/listSubGroups` requires a JID in the query `?communityJid=`.
</Warning>

## Data structures

### `GroupInfo`

Standard response for the create and update routes.

```json theme={null}
{
  "name": "Dev Team",
  "jid": "120363406289005073@g.us",
  "description": "Technical discussions",
  "inviteCode": "ABC123XYZ",
  "inviteLink": "https://chat.whatsapp.com/ABC123XYZ",
  "createdBy": "5511999999999@s.whatsapp.net",
  "participantCount": 3,
  "participants": [
    { "jid": "5511999999999@s.whatsapp.net", "isAdmin": true, "isSuperAdmin": false }
  ],
  "groupSettings": {
    "membersCanEditInfo": true,
    "membersCanSendMessages": true,
    "membersCanAddOthers": false,
    "requireAdminApproval": false
  },
  "isCommunity": false,
  "isParent": false,
  "linkedParentJid": null
}
```

### `GroupDetail`

Response from [`GET /info`](/en/api/groups/info). Includes extra fields beyond `GroupInfo`: `image`, `createdAt`, `metadata` (author of the last name / description change), `isEphemeral`, `isIncognito`, `isSuspended`, `isDefaultSubGroup`.

### `GroupPermissions`

| Field                    | Type | WhatsApp meaning             |
| ------------------------ | ---- | ---------------------------- |
| `membersCanEditInfo`     | bool | Inverse of `IsLocked`        |
| `membersCanSendMessages` | bool | Inverse of `IsAnnounce`      |
| `membersCanAddOthers`    | bool | `MemberAddMode == AllMember` |
| `requireAdminApproval`   | bool | `IsJoinApprovalRequired`     |

## Error envelope

All routes use the API's standard envelope:

```json theme={null}
{
  "success": false,
  "error": { "message": "Identifier is required" }
}
```

## Error reference (summary)

| Category   | Message                                                                         |
| ---------- | ------------------------------------------------------------------------------- |
| Auth       | `Not authorized to view group requests (must be admin)`                         |
| Auth       | `Not authorized to perform this action (must be admin)`                         |
| Auth       | `Not authorized to update this group (must be admin)`                           |
| Auth       | `Not authorized to reset group invite link (must be admin)`                     |
| Auth       | `Not allowed to join this group`                                                |
| Auth       | `Not allowed to leave this group`                                               |
| Validation | `Identifier is required`                                                        |
| Validation | `At least one participant is required`                                          |
| Validation | `Invalid action. Must be one of: add, remove, promote, demote, approve, reject` |
| Identifier | `failed to resolve group from identifier (not a valid JID, code, or link)`      |
| Identifier | `invalid group JID <jid>: <reason>`                                             |
| Identifier | `not a group JID`                                                               |
| State      | `Instance is not connected to WhatsApp`                                         |
| State      | `Group not found or you are not a member of this group`                         |
| Invite     | `Invite link has been revoked or expired`                                       |
| Invite     | `Invalid invite link or code`                                                   |
| Throttle   | `rate limit exceeded (429): wait before creating again`                         |

## Next

<CardGroup cols={2}>
  <Card title="Create group" icon="users-rectangle" href="/en/api/groups/create">
    Create a new group with initial participants.
  </Card>

  <Card title="List groups" icon="list" href="/en/api/groups/list">
    Return all groups for the instance.
  </Card>
</CardGroup>
