---
title: "Delete all banner targeting rules"
type: reference
method: DELETE
path: /rest-api/banner/{bannerId}/targetings.do
tag: "Targeting Rules"
---

# Delete all banner targeting rules

`DELETE https://YOUR-NETWORK-DOMAIN/rest-api/banner/{bannerId}/targetings.do`

Deletes every targeting rule of the banner, or only those matching the optional type and rule filters. Nothing is deleted unless the caller holds the targeting permission of every matching rule's type. Targeting stays enabled. The response carries the number of deleted rules. Requires UPDATE permission on the banner's campaign and MANAGE_DEMAND_TARGETING user permission.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `bannerId` | integer | yes | `7890` | Unique numeric ID of the banner |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `targetType` | string | no | `COUNTRY` | Optional targeting type filter — only rules of this type are deleted |
| `rule` | string | no | `EXCLUDE` | Optional rule filter — only INCLUDE or only EXCLUDE rules are deleted |

## Responses

- `200` — Success — the response carries the deleted count
- `400` — Unknown targeting type or rule
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Banner not found
- `500` — Internal server error

## Example request

```bash
curl --request DELETE \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/banner/7890/targetings.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'targetType=COUNTRY' \
  --data-urlencode 'rule=EXCLUDE'
```

Source: https://epom.com/ad-server/docs/api/targeting-rules/delete-banner-targetings