# Remove users from audience

Removes users from audience. Works with Meta Ads and Reddit Ads.

```http
DELETE https://api.pozy.ai/v1/ads/audiences/{audienceId}/users
```

- Area: Ads / Ad Audiences
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `audienceId` (string, required)

## Request body

Content type: `application/json`

- `users`, array of object, required: At least 1 item. Up to 10000 items
  - `email`, string (email)
  - `phone`, string

## Example request

```bash
curl -X DELETE "https://api.pozy.ai/v1/ads/audiences/6cb6496d2ca0017ff720f51f/users" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "users": [
    {
      "email": "alex@example.com",
      "phone": "+14155550123"
    }
  ]
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/ads/audiences/6cb6496d2ca0017ff720f51f/users", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    users: [
      {
        email: "alex@example.com",
        phone: "+14155550123"
      }
    ]
  }),
});
const text = await res.text();
const data = text ? JSON.parse(text) : null;
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.delete(
    "https://api.pozy.ai/v1/ads/audiences/6cb6496d2ca0017ff720f51f/users",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "users": [
            {
                "email": "alex@example.com",
                "phone": "+14155550123",
            },
        ],
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `message`, string
- `numReceived`, integer
- `numInvalid`, integer
- `invalidEntrySamples`, map of string

```json
{
  "message": "Hello from Pozy",
  "numReceived": 1,
  "numInvalid": 1,
  "invalidEntrySamples": {
    "key": "string"
  }
}
```
