Cloudflare Docs
Firewall Rules
Visit Firewall Rules on GitHub
Set theme to dark (⇧+D)

DELETE examples

​​ Delete multiple rules

This example deletes firewall rules with IDs <RULE_ID_1> and <RULE_ID_2>.

Request
curl -X DELETE \
"https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/firewall/rules?id=<RULE_ID_1>&id=<RULE_ID_2>" \
-H "X-Auth-Email: <EMAIL>" \
-H "X-Auth-Key: <API_KEY>"
Response
{
"result": [
{
"id": "<RULE_ID_1>"
},
{
"id": "<RULE_ID_2>"
}
],
"success": true,
"errors": [],
"messages": []
}

​​ Delete a single rule

This example deletes the rule with ID <RULE_ID>.

Request
curl -X DELETE \
"https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/firewall/rules/<RULE_ID>" \
-H "X-Auth-Email: <EMAIL>" \
-H "X-Auth-Key: <API_KEY>"
Response
{
"result": [
{
"id": "<RULE_ID>"
}
],
"success": true,
"errors": [],
"messages": []
}