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

# Delete a rule

> Deletes the rule along with its results and alerts. A rule that has written a correction cannot be deleted at all: reverting a correction appends an entry rather than removing it, so the count never falls to zero. Set an effective_to date to stop the rule instead.



## OpenAPI

````yaml DELETE /projects/{project_id}/rules/{rule_id}
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /projects/{project_id}/rules/{rule_id}:
    delete:
      summary: Delete a rule
      description: >-
        Deletes the rule along with its results and alerts. A rule that has
        written a correction cannot be deleted at all: reverting a correction
        appends an entry rather than removing it, so the count never falls to
        zero. Set an effective_to date to stop the rule instead.
      operationId: delete-project-rule
      parameters:
        - name: project_id
          in: path
          schema:
            type: string
          required: true
        - name: rule_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '204':
          description: '204'
        '422':
          description: '422'
          content:
            application/json:
              examples:
                Result:
                  value:
                    errors:
                      - message: >-
                          has written 42 corrections that must be reversed
                          before it can be deleted
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````