---
docId: doc_b6a207afa0cd45a2b2ac3bda42d800aa
title: Remove contacts from the audience
description: "Remove contacts from a campaign by phone, search, or ID."
api:
  group: campañas/audiencia
  auth: bearer
  operations:
    - operationId: removeCampaignAudience
      method: DELETE
      path: '/v1/campaigns/{campaignId}/audience/{phoneNumber}'
      postmanName: Remove a contact from the audience
    - operationId: removeCampaignAudienceBulk
      method: POST
      path: '/v1/campaigns/{campaignId}/audience/remove'
      postmanName: Remove several contacts from the audience
---

<script>
  import { Ways } from '$lib/components';
</script>

# Remove contacts from the audience

Remove contacts whose `phoneNumber` matches the supplied phone number from the audience.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
# Remove one
curl -X DELETE https://api.platic.ai/v1/campaigns/$CAMPAIGN_ID/audience/5215512345678 \
  -H "Authorization: Bearer $PLATIC_API_KEY"

# Remove several
curl https://api.platic.ai/v1/campaigns/$CAMPAIGN_ID/audience/remove \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phoneNumbers": ["5215512345678"] }'
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
// Remove one
await platic.campaigns.audience.remove("campaign_123", "5215512345678");

// Remove several
const result = await platic.campaigns.audience.removeMany("campaign_123", { phoneNumbers: ["5215512345678"] });
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Requirement |
| --- | --- | --- | --- |
| `campaignId` | string | Unique identifier of the campaign | required |
| `phoneNumber` | string | Phone number of the contact to remove, with country code and without symbols | required |

## Response `200 OK`

```json
{
  "status": "success",
  "message": "Client removed from campaign successfully",
  "data": {
    "success": true,
    "message": "Client removed from campaign successfully",
    "removedCount": 1
  }
}
```

## Notes

- The contact stays in the workspace; only the campaign tag is removed.
- If no contact exists with that `phoneNumber`, the endpoint answers `200` with `removedCount: 0`
- If several contacts have the same `phoneNumber`, the campaign tag is removed from all of them

## Remove several at once

Remove from the audience all the results of a [contact search](/api-reference/contacts/search), a list of ids, or a list of phones. The contacts stay in the workspace.

```json
{ "phoneNumbers": ["5215512345678", "5215587654321"] }
```

Send exactly one of these:

| Parameter | Type | Description |
| --- | --- | --- |
| `searchId` | string | The `searchId` of a search: removes all its results. With `topN`, only the first N |
| `clientIds` | string[] | Contact ids, up to 5,000 |
| `phoneNumbers` | string[] | Phones with country code, up to 5,000 |

```json
{
  "status": "success",
  "message": "2 contacts were removed from the audience",
  "data": {
    "target": "phones",
    "message": "2 contacts were removed from the audience",
    "removed": 2
  }
}
```

`target` is `search`, `client_ids`, or `phones`. `removed`, `notFound`, and `invalidPhoneCount` arrive when Platica reports them.
