---
title: "Remove all rule matches"
type: reference
method: POST
path: /rest-api/rule/{ruleId}/matches/remove.do
tag: "Targeting Rules"
---

# Remove all rule matches

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

Removes all rule match entries from the specified rule, effectively clearing its matching criteria while keeping the rule definition itself intact. This is a partial update operation useful for rebuilding a rule's matches from scratch. The rule is identified by its numeric ID in the URL path. Returns a JSON object with 'success: true' on completion. Requires authentication and UPDATE 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 whose matches should all be removed |

## Responses

- `200` — All rule matches removed successfully
- `400` — Bad request — invalid or missing parameters
- `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/matches/remove.do' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

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