> ## Documentation Index
> Fetch the complete documentation index at: https://developer.z-api.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable Announcement Group Protection

> Protect your announcement groups from scam messages by automatically removing content sent by participants who are not admins, and receiving the sender's data via webhook.

> [!WARNING]
>
> Notes about this endpoint
>
> * Only works in announcement groups where the instance is an admin.
> * Ignores admins.
> * Each message generates a webhook event.
> * The author is not removed automatically.

## Overview

The Anti-Scam Protection in Announcement Groups automatically removes, for all participants, messages sent by scammers — that is, participants who are not admins — in community announcement groups, where only admins can send messages. Whenever a message is removed, you receive a webhook event containing the author's data. This way, your application can identify the responsible party and take the necessary action, such as removing them from the group.

## Attributes

**instanceId** `string` *required*

Your instance ID. Available in the Z-API panel under **Instances**.

**token** `string` *required*

Your Z-API instance token.

### Headers

| Header | Value |
| :- | :- |
| `Client-Token` | Account security token |
| `Content-Type` | `application/json` |

### Request Body

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
    "value": true
}
```

**value** `boolean` *required*

Value that toggles the protection, TRUE enables and FALSE disables (Default = FALSE)

## Response

### 200

**value** `boolean`

Returned with the status provided in the request (TRUE or FALSE)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.