---
type: api
title: Delete a rule
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-delete-alerting-rule-id
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-delete-alerting-rule-id
products:
  - Kibana
---

# Delete a rule

- Server: `https://{kibana_url}`

## Paths

- `DELETE` `/api/alerting/rule/{id}`

#### Path parameters

- `id` (string) — required
  The identifier for the rule.

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Responses

#### `204`

Indicates a successful call.

#### `400`

Indicates an invalid schema or parameters.

#### `403`

Indicates that this call is forbidden.

#### `404`

Indicates a rule with the given ID does not exist.

## Code examples

#### Console

```console
DELETE kbn:/api/alerting/rule/ID
```

#### curl

```curl
curl -X DELETE "${KIBANA_URL}/api/alerting/rule/${ID}" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}"
```

