> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch delete rules

> Deletes multiple rules by ID. Returns count of successfully deleted rules. Batch delete rules. **Required scope:** write

Deletes multiple rules by ID. Returns count of successfully deleted rules.
Batch delete rules.

**Required scope:** `write`

### Request body

`BatchDeleteRulesRequest`

**ids** `string[]` *required*

Rule IDs to delete

### Response

`BatchDeleteResponse`

**deleted** `integer` *required*

**not\_found** `integer` *required*

### Status codes

| Code | Meaning |
| - | - |
| `200` | Batch deletion completed |
| `401` | Unauthorized — missing or invalid credentials |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

```bash cURL theme={null}
curl --request POST \
  --url 'https://api.nsr.stateset.com/api/v1/rules/batch-delete' \
  --header "X-API-Key: $STATESET_NSR_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "ids": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ]
}'
```

```json 200 theme={null}
{
  "deleted": 1,
  "not_found": 1
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.