## Delete a firewall rule `client.firewall.rules.delete(stringruleId, RuleDeleteParamsparams, RequestOptionsoptions?): FirewallRule` **delete** `/zones/{zone_id}/firewall/rules/{rule_id}` Deletes an existing firewall rule. ### Parameters - `ruleId: string` The unique identifier of the firewall rule. - `params: RuleDeleteParams` - `zone_id: string` Defines an identifier. ### Returns - `FirewallRule` - `id?: string` The unique identifier of the firewall rule. - `action?: Action` The action to apply to a matched request. The `log` action is only available on an Enterprise plan. - `"block"` - `"challenge"` - `"js_challenge"` - `"managed_challenge"` - `"allow"` - `"log"` - `"bypass"` - `description?: string` An informative summary of the firewall rule. - `filter?: FirewallFilter | DeletedFilter` - `FirewallFilter` - `id?: string` The unique identifier of the filter. - `description?: string` An informative summary of the filter. - `expression?: string` The filter expression. For more information, refer to [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). - `paused?: boolean` When true, indicates that the filter is currently paused. - `ref?: string` A short reference tag. Allows you to select related filters. - `DeletedFilter` - `id: string` The unique identifier of the filter. - `deleted: boolean` When true, indicates that the firewall rule was deleted. - `paused?: boolean` When true, indicates that the firewall rule is currently paused. - `priority?: number` The priority of the rule. Optional value used to define the processing order. A lower number indicates a higher priority. If not provided, rules with a defined priority will be processed before rules without a priority. - `products?: Array` - `"zoneLockdown"` - `"uaBlock"` - `"bic"` - `"hot"` - `"securityLevel"` - `"rateLimit"` - `"waf"` - `ref?: string` A short reference tag. Allows you to select related firewall rules. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const firewallRule = await client.firewall.rules.delete('372e67954025e0ba6aaa6d586b9e0b60', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(firewallRule.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": { "id": "372e67954025e0ba6aaa6d586b9e0b60", "action": "block", "description": "Blocks traffic identified during investigation for MIR-31", "filter": { "id": "372e67954025e0ba6aaa6d586b9e0b61", "description": "Restrict access from these browsers on this address range.", "expression": "(http.request.uri.path ~ \".*wp-login.php\" or http.request.uri.path ~ \".*xmlrpc.php\") and ip.addr ne 172.16.22.155", "paused": false, "ref": "FIL-100" }, "paused": false, "priority": 50, "products": [ "waf" ], "ref": "MIR-31" }, "success": true } ```