> For the complete documentation index, see [llms.txt](https://support.whapi.cloud/help-desk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.whapi.cloud/help-desk/groups/groups-other-questions/admin-only-mode-and-other-group-permissions-how-to-check-and-change-them.md).

# Admin-only mode and other group permissions: how to check and change them

You can use the Whapi.Cloud API to check whether a group is in admin-only mode (only admins can send messages, also called announcement mode) and to turn it on or off.

### Checking the current setting

Call `GET /groups/{GroupID}` and look for the `announcements` field in the response:

* `"announcements": true` — only admins can send messages.
* No `announcements` field — everyone can send messages.

API reference: [Get group](https://whapi.readme.io/reference/getgroup), [Get groups](https://whapi.readme.io/reference/getgroups)

### Changing the setting

Call `PATCH /groups/{GroupID}` with this body:

```json
{
  "setting": "send_messages",
  "policy": "admins"
}
```

Set `policy` to `admins` to restrict messaging to admins, or to `anyone` to let all participants write.

```bash
curl --request PATCH \
  --url https://gate.whapi.cloud/groups/{GroupID} \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR_API_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"setting": "send_messages", "policy": "admins"}'
```

{% hint style="warning" %}
Your channel must be an admin of the group to change this or any other group permission.
{% endhint %}

API reference: [Update group setting](https://whapi.readme.io/reference/updategroupsetting)

### Other group permissions

The group object has more permission fields. The **Values** column shows how each one reads: most are present only while the restriction is on, while `joinApprovalMode` is always returned as `true` or `false`. To change them, use the same `PATCH` request with a different `setting`:

| Restriction                                                  | Field in the GET response | Values                           | `setting` in PATCH     |
| ------------------------------------------------------------ | ------------------------- | -------------------------------- | ---------------------- |
| Only admins can send messages                                | `announcements`           | `true` — on; field missing — off | `send_messages`        |
| Only admins can add participants                             | `adminAddMemberMode`      | `true` — on; field missing — off | `add_participants`     |
| Only admins can edit group info (subject, description, icon) | `restricted`              | `true` — on; field missing — off | `edit_group_info`      |
| Admins must approve new members who join via the invite link | `joinApprovalMode`        | `true` — on; `false` — off       | `approve_participants` |

`policy` is `admins` or `anyone` for all of them.
