Skip to content
Start here

Delete a firewall rule

client.firewall.rules.delete(stringruleID, RuleDeleteParams { zone_id } params, RequestOptionsoptions?): FirewallRule { id, action, description, 5 more }
DELETE/zones/{zone_id}/firewall/rules/{rule_id}

Deletes an existing firewall rule.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Firewall Services Write
ParametersExpand Collapse
ruleID: string

The unique identifier of the firewall rule.

maxLength32
params: RuleDeleteParams { zone_id }
zone_id: string

Defines an identifier.

maxLength32
ReturnsExpand Collapse
FirewallRule { id, action, description, 5 more }
id?: string

The unique identifier of the firewall rule.

maxLength32
action?: Action

The action to apply to a matched request. The log action is only available on an Enterprise plan.

One of the following:
"block"
"challenge"
"js_challenge"