Skip to content
Start here

Update WAF override

Deprecated
PUT/zones/{zone_id}/firewall/waf/overrides/{overrides_id}

This endpoint has been deprecated and returns 410 Gone. Please use the Rulesets API instead.

Previously updated an existing URI-based WAF override.

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)
Zone Settings Write
Path ParametersExpand Collapse
zone_id: string

Defines an identifier.

maxLength32
overrides_id: string

The unique identifier of the WAF override.

maxLength32
Body ParametersJSONExpand Collapse
id: string

Defines an identifier.

maxLength32
rewrite_action: RewriteAction { block, challenge, default, 2 more }

Specifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object.

block: optional "challenge" or "block" or "simulate" or 2 more

The WAF rule action to apply.

One of the following:
"challenge"
"block"
"simulate"
"disable"
"default"
challenge: optional "challenge" or "block" or "simulate" or 2 more

The WAF rule action to apply.

One of the following:
"challenge"
"block"
"simulate"
"disable"
"default"
default: optional "challenge" or "block" or "simulate" or 2 more

The WAF rule action to apply.

One of the following:
"challenge"
"block"
"simulate"
"disable"
"default"
disable: optional "challenge" or "block" or "simulate" or 2 more

The WAF rule action to apply.

One of the following:
"challenge"
"block"
"simulate"
"disable"
"default"
simulate: optional "challenge" or "block" or "simulate" or 2 more

The WAF rule action to apply.

One of the following:
"challenge"
"block"
"simulate"
"disable"
"default"
rules: WAFRule { , , , 2 more }

An object that allows you to override the action of specific WAF rules. Each key of this object must be the ID of a WAF rule, and each value must be a valid WAF action. Unless you are disabling a rule, ensure that you also enable the rule group that this WAF rule belongs to. When creating a new URI-based WAF override, you must provide a groups object or a rules object.

One of the following:
"challenge"
"block"
"simulate"
"disable"
"default"
urls: array of OverrideURL

The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.

Update WAF override

curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/firewall/waf/overrides/$OVERRIDES_ID \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    -d '{
          "id": "023e105f4ecef8ad9ca31a8372d0c353",
          "rewrite_action": {},
          "rules": {
            "100015": "disable"
          },
          "urls": [
            "shop.example.com/*"
          ]
        }'
Returns Examples