---
type: api
title: Delete a rule
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-delete-alerting-rule-id
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-delete-alerting-rule-id
products:
  - Kibana
---

# Delete a rule

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

## Paths

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

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#basicauth)

#### Path Parameters

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

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

## 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 /api/alerting/rule/{id}
```

#### curl

```curl
curl -X DELETE "https://{kibana_url}/api/alerting/rule/{id}" \
  -H "kbn-xsrf: true"
```

