How to check and change admin-only mode in a WhatsApp group
You can use the Whapi Cloud API to check whether a group is set to admin-only mode (only admins can send messages) and to change that setting.
Checking the current setting
Call GET to get group details. In the response, look for the announcements field:
"announcements": trueis present — only admins can send messages.The
announcementsfield is absent — everyone can send messages.
API reference: Get groups Get group
Changing the setting
Call PATCH /groups/{GroupID} with this body:
{
"setting": "send_messages",
"policy": "admins"
}Set "policy" to "admins" to restrict messaging to admins, or "anyone" to let all participants write.
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"
}'Your channel must be an admin in the group to change this setting.
API reference: Update group setting
Last updated