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

# Overview

> Add, remove, and manage members within CometChat groups.

The **Group Members** API manages the membership of users within a group. Each member is assigned a scope that determines their permissions inside the group.

### Key behaviors

* A maximum of **25 users** can be added per API call across all scope arrays (`admins`, `moderators`, `participants`, `usersToBan`).
* If the same UID appears in multiple scope arrays, the highest scope applies in the order: admin > moderator > participant.
* Individual member addition failures do not cause the overall request to fail — check the `error` objects in the response for per-member status.
* For groups with more than **300 members**, conversations and unread message counts are not updated.

### Member scopes

| Scope         | Default assignment   | Privileges                                                                                           |
| ------------- | -------------------- | ---------------------------------------------------------------------------------------------------- |
| `admin`       | Group creator        | Change member scopes, add/kick/ban members, update/delete group, send & receive messages & calls     |
| `moderator`   | Promoted by an admin | Change scope of participants, kick & ban participants, update group, send & receive messages & calls |
| `participant` | All other members    | Send & receive messages & calls                                                                      |

### How group members connect to other resources

* **Groups** — Members belong to a [Group](/rest-api/groups), identified by its GUID.
* **Users** — Each member is a [User](/rest-api/users), identified by their UID.
* **Banned Users** — Members can be [banned](/rest-api/banned-users) from a group by admins or moderators.
* **Roles & RBAC** — A member's app-wide [Role](/rest-api/roles) is checked alongside their group scope. Both must allow an action for it to succeed. See [RBAC & SBAC](/rest-api/rbac-overview).

### Available operations

| Operation                                            | Method   | Endpoint                       | Description                                |
| ---------------------------------------------------- | -------- | ------------------------------ | ------------------------------------------ |
| [List Members](/rest-api/group-members/list)         | `GET`    | `/groups/{guid}/members`       | Retrieve all members of a group            |
| [Add Members](/rest-api/group-members/add-members)   | `POST`   | `/groups/{guid}/members`       | Add users to a group with specified scopes |
| [Change Scope](/rest-api/group-members/change-scope) | `PUT`    | `/groups/{guid}/members/{uid}` | Change a member's scope within the group   |
| [Kick Member](/rest-api/group-members/kick)          | `DELETE` | `/groups/{guid}/members/{uid}` | Remove a member from the group             |

### Group member properties

| Property         | Type             | Description                                      |
| ---------------- | ---------------- | ------------------------------------------------ |
| **admins**       | array of strings | UIDs of users to be added as group admins.       |
| **moderators**   | array of strings | UIDs of users to be added as group moderators.   |
| **participants** | array of strings | UIDs of users to be added as group participants. |
| **usersToBan**   | array of strings | UIDs of users to be banned from the group.       |

### Error handling

| Error Code           | Description                                |
| -------------------- | ------------------------------------------ |
| `ERR_GUID_NOT_FOUND` | The specified group does not exist         |
| `ERR_UID_NOT_FOUND`  | The specified user does not exist          |
| `ERR_NOT_A_MEMBER`   | The user is not a member of this group     |
| `ERR_ALREADY_JOINED` | The user is already a member of this group |

For the complete list of error codes, see [Error Guide](/articles/error-guide).

For all system limits (member caps, group thresholds, etc.), see [Properties and Constraints](/articles/properties-and-constraints).
