This guide explains how to remove all members from a Customer Match audience
by sending a [`RemoveAllAudienceMembersRequest`](https://developers.google.com/data-manager/api/reference/rest/v1/audienceMembers/removeAll#request-body).

This method is useful if you need to clear a user list with a single request or
replace all audience members of a list.

## Clear the audience

To remove all members from an audience, send a
[`RemoveAllAudienceMembersRequest`](https://developers.google.com/data-manager/api/reference/rest/v1/audienceMembers/removeAll#request-body) and omit the
`removeAsOfTime` field. This defaults the removal time to the current time,
clearing all current members from the list.

## Replace all members

To replace all members in a Customer Match audience while avoiding an empty
user list, follow these steps:

1. Record the current time as **T**.
2. Begin [uploading the new members](https://developers.google.com/data-manager/api/devguides/audiences/google-ads/customer-match/upload-data) by sending an [`IngestAudienceMembersRequest`](https://developers.google.com/data-manager/api/reference/rest/v1/audienceMembers/ingest). You can make multiple ingestion requests if needed.
3. Wait until all ingestion requests have finished processing. You can
   check the status of your requests using [Diagnostics](https://developers.google.com/data-manager/api/devguides/diagnostics).

   > [!NOTE]
   > **Note:** If a temporarily empty user list isn't a concern, you can skip this step and go to Step #4. We still recommend checking the status of your ingestion requests to verify they've been successfully processed.

4. Send a [`RemoveAllAudienceMembersRequest`](https://developers.google.com/data-manager/api/reference/rest/v1/audienceMembers/removeAll#request-body) with
   `removeAsOfTime` set to the timestamp **T** recorded in Step #1.
   This removes only the members that were added *before* you began
   uploading the new members, leaving only the newly added members.

## Construct the request

Set the following fields in the
[`RemoveAllAudienceMembersRequest`](https://developers.google.com/data-manager/api/reference/rest/v1/audienceMembers/removeAll#request-body) body:

`destinations`
:   **Required** . The list of destinations. The `productDestinationId` field
    in each destination specifies the audience that you want to remove members
    from. See [Configure destinations](https://developers.google.com/data-manager/api/devguides/concepts/destinations) for
    more information.

`removeAsOfTime`
:   Optional. Only members added *before* this time will be removed.
    For formatting details, see [Timestamp format](https://developers.google.com/data-manager/api/devguides/concepts/formatting#timestamp_format). If not set, this value
    defaults to the current time.

`validateOnly`
:   Optional. Set to `true` to validate the request without applying the
    changes. When you're ready to apply the changes, set to `false`.

## Sample requests

Here is a sample request that removes all members from a Customer Match list.

1. Click **Open in API Explorer** to open the API Explorer in a new tab or window.
2. In the request body in the API Explorer, replace each string beginning with `REPLACE_WITH`, such as `REPLACE_WITH_OPERATING_ACCOUNT_TYPE`, with the relevant value.
3. Click **Execute** at the bottom of the API Explorer page and complete the authorization prompts to send the request.
4. Set `validateOnly` to `true` to validate the request without applying the changes. When you're ready to apply the changes, set `validateOnly` to `false`.

### Advertiser


[Open in API Explorer](https://developers.google.com/data-manager/api/reference/rest/v1/audienceMembers/removeAll?apix=true&apix_params=%0A%7B%22resource%22:%7B%22destinations%22:%5B%7B%22operatingAccount%22:%7B%22accountType%22:%22REPLACE_WITH_OPERATING_ACCOUNT_TYPE%22,%22accountId%22:%22REPLACE_WITH_OPERATING_ACCOUNT_ID%22%7D,%22loginAccount%22:%7B%22accountType%22:%22REPLACE_WITH_LOGIN_ACCOUNT_TYPE%22,%22accountId%22:%22REPLACE_WITH_LOGIN_ACCOUNT_ID%22%7D,%22productDestinationId%22:%22REPLACE_WITH_AUDIENCE_ID%22%7D%5D,%22removeAsOfTime%22:%222026-07-20T15:01:23Z%22,%22validateOnly%22:true%7D%7D "Open this sample in API Explorer")

```json
{
    "destinations": [
        {
            "operatingAccount": {
                "accountType": "OPERATING_ACCOUNT_TYPE",
                "accountId": "OPERATING_ACCOUNT_ID"
            },
            "loginAccount": {
                "accountType": "LOGIN_ACCOUNT_TYPE",
                "accountId": "LOGIN_ACCOUNT_ID"
            },
            "productDestinationId": "AUDIENCE_ID"
        }
    ],
    "removeAsOfTime": "2026-07-20T15:01:23Z",
    "validateOnly": true
}
```

<br />

### Data Partner


[Open in API Explorer](https://developers.google.com/data-manager/api/reference/rest/v1/audienceMembers/removeAll?apix=true&apix_params=%0A%7B%22resource%22:%7B%22destinations%22:%5B%7B%22operatingAccount%22:%7B%22accountType%22:%22REPLACE_WITH_OPERATING_ACCOUNT_TYPE%22,%22accountId%22:%22REPLACE_WITH_OPERATING_ACCOUNT_ID%22%7D,%22loginAccount%22:%7B%22accountType%22:%22DATA_PARTNER%22,%22accountId%22:%22REPLACE_WITH_DATA_PARTNER_ACCOUNT_ID%22%7D,%22linkedAccount%22:%7B%22accountType%22:%22REPLACE_WITH_LINKED_ACCOUNT_TYPE%22,%22accountId%22:%22REPLACE_WITH_LINKED_ACCOUNT_ID%22%7D,%22productDestinationId%22:%22REPLACE_WITH_AUDIENCE_ID%22%7D%5D,%22removeAsOfTime%22:%222026-07-20T15:01:23Z%22,%22validateOnly%22:true%7D%7D "Open this sample in API Explorer")

```json
{
    "destinations": [
        {
            "operatingAccount": {
                "accountType": "OPERATING_ACCOUNT_TYPE",
                "accountId": "OPERATING_ACCOUNT_ID"
            },
            "loginAccount": {
                "accountType": "DATA_PARTNER",
                "accountId": "DATA_PARTNER_ACCOUNT_ID"
            },
            "linkedAccount": {
                "accountType": "LINKED_ACCOUNT_TYPE",
                "accountId": "LINKED_ACCOUNT_ID"
            },
            "productDestinationId": "AUDIENCE_ID"
        }
    ],
    "removeAsOfTime": "2026-07-20T15:01:23Z",
    "validateOnly": true
}
```

<br />

## Send the request

Send the request to the [`removeAll`](https://developers.google.com/data-manager/api/reference/rest/v1/audienceMembers/removeAll) endpoint.

If the request succeeds, the response contains a `requestId` which you can use
to [track the status of the operation](https://developers.google.com/data-manager/api/devguides/diagnostics).

    {
      "requestId": "REQUEST_ID"
    }

If the request fails, [inspect the errors](https://developers.google.com/data-manager/api/devguides/concepts/understand-errors) to
determine the cause of the failure.