DELETE examples

Delete multiple rules

DELETE /firewall/rules

Request

curl -X DELETE \
     -H "X-Auth-Email: [email protected]" \
     -H "X-Auth-Key: REDACTED" \
     "https://api.cloudflare.com/client/v4/zones/d56084adb405e0b7e32c52321bf07be6/firewall/rules?id=cbf4b7a5a2a24e59a03044d6d44ceb09"

Important note: DELETE does not delete any filter related to the firewall rule. To delete the filter, it’s necessary to call the /filters API.

Response

{
  "result": [],
  "success": true,
  "errors": null,
  "messages": null
}

Delete a single rule

DELETE /firewall/rules/{id}

Request

curl -X DELETE \
     -H "X-Auth-Email: [email protected]" \
     -H "X-Auth-Key: REDACTED" \
     "https://api.cloudflare.com/client/v4/zones/d56084adb405e0b7e32c52321bf07be6/firewall/rules/cbf4b7a5a2a24e59a03044d6d44ceb09"

Response

{
  "result": null,
  "success": true,
  "errors": null,
  "messages": null
}