---
title: Delete a muting rule
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/newrelic/alerts/newrelic-alerts-delete-muting-rule
---

The action identifier is `newrelic.alerts.deleteMutingRule`.

Deletes an existing muting rule.

## Inputs

The following table describes all available input fields for this action.

| Input         | Type   | Description                                                     | Example                                                                                      |
| ------------- | ------ | --------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| **accountId** | Int    | **Required.** The New Relic account that owns the muting rule.  | `123456`                                                                                     |
| **id**        | String | **Required.** The ID of the muting rule to delete.              | `"7654321"`                                                                                  |
| **selectors** | List   | **Optional.** JQ selectors to extract values from the response. | ```yaml selectors:   - name: deletedId     expression: ".data.alertsMutingRuleDelete.id" ``` |

## Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                             |
| ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **success**      | Boolean | `true` when the step executed without error.                                                                                                            |
| **errorMessage** | String  | Error message on failure. `null` on success.                                                                                                            |
| **data**         | Map     | NerdGraph response containing the deleted muting rule's ID. ```json {   "data": {     "alertsMutingRuleDelete": {       "id": "7654321"     }   } } ``` |

## Example

The following example deletes a muting rule that is no longer needed.

| Workflow example                                                                                                                                                                                                                                                                                                |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: delete_muting_rule description: Delete a muting rule steps:   - name: deleteMutingRule     type: action     action: newrelic.alerts.deleteMutingRule     version: 1     inputs:       accountId: ${{ .workflowInputs.accountId }}       id: ${{ .workflowInputs.mutingRuleId }}     next: end ``` |
