---
title: "Delete a rule"
type: reference
method: POST
path: /rest-api/rule/{ruleId}/delete.do
tag: "Targeting Rules"
---

# Delete a rule

`POST https://YOUR-NETWORK-DOMAIN/rest-api/rule/{ruleId}/delete.do`

Permanently deletes a targeting rule identified by its numeric ID, including all its rule match entries. Before deletion, the system checks whether the rule is currently used by any rule groups (on advertisers, campaigns, banners, sites, zones, or placements). Requires authentication and DELETE permission on the RULES static ACL identity.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `ruleId` | integer | yes | `200` | The unique numeric identifier of the rule to delete |

## Responses

- `200` — Rule deleted successfully
- `400` — Bad request - rule has existing usages
- `401` — Unauthorized - authentication error
- `403` — Forbidden - insufficient permissions
- `404` — Rule not found
- `500` — Internal server error

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/rule/200/delete.do' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/targeting-rules/post-rule-delete