Skip to content
Start here

Patch Smart Shield Settings

PATCH/zones/{zone_id}/smart_shield

Set Smart Shield Settings.

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 WriteZone Write
Path ParametersExpand Collapse
zone_id: string

Identifier.

maxLength32
Body ParametersJSONExpand Collapse
cache_reserve: optional object { value }
value: optional "on" or "off"

Specifies the enablement value of Cache Reserve.

One of the following:
"on"
"off"
regional_tiered_cache: optional object { value }
value: optional "on" or "off"

Specifies the enablement value of Regional Tiered Cache.

One of the following:
"on"
"off"
smart_routing: optional object { value }
value: optional "on" or "off"

Specifies the enablement value of Smart Routing.

One of the following:
"on"
"off"
smart_tiered_cache: optional object { value }
value: optional "on" or "off"

Specifies the enablement value of Smart Tiered Cache.

One of the following:
"on"
"off"
ReturnsExpand Collapse
errors: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
result: object { smart_tiered_cache }

A consolidated object containing settings from multiple APIs for partial updates.

smart_tiered_cache: object { id, editable, modified_on, value }
id: optional string

The id of the Smart Tiered Cache setting.

editable: optional boolean

Whether the setting is editable.

modified_on: optional string

The last time the setting was modified.

value: optional "on" or "off"

Specifies the enablement value of Tiered Cache.

One of the following:
"on"
"off"
success: true

Whether the API call was successful.

Patch Smart Shield Settings

curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/smart_shield \
    -X PATCH \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    -d '{}'
{
  "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": {
    "smart_tiered_cache": {
      "id": "smart_tiered_cache",
      "editable": true,
      "modified_on": "2025-09-10T22:53:22.946098Z",
      "value": "on"
    }
  },
  "success": true
}
{
  "errors": [
    {
      "code": 1137,
      "message": "Unable to process request. Internal error."
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
{
  "errors": [
    {
      "code": 1016,
      "message": "Unable to update smart_tiered_cache."
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
{
  "errors": [
    {
      "code": 1034,
      "message": "Upgrade Smart Shield to unlock smart_tiered_cache."
    },
    {
      "code": 1034,
      "message": "Upgrade Smart Shield to unlock argo_smart_routing."
    },
    {
      "code": 1034,
      "message": "Upgrade Smart Shield to unlock regional_tiered_cache."
    },
    {
      "code": 1034,
      "message": "Upgrade Smart Shield to unlock cache_reserve."
    },
    {
      "code": 1034,
      "message": "Upgrade Smart Shield to unlock healthchecks_count."
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
Returns Examples
{
  "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": {
    "smart_tiered_cache": {
      "id": "smart_tiered_cache",
      "editable": true,
      "modified_on": "2025-09-10T22:53:22.946098Z",
      "value": "on"
    }
  },
  "success": true
}
{
  "errors": [
    {
      "code": 1137,
      "message": "Unable to process request. Internal error."
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
{
  "errors": [
    {
      "code": 1016,
      "message": "Unable to update smart_tiered_cache."
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
{
  "errors": [
    {
      "code": 1034,
      "message": "Upgrade Smart Shield to unlock smart_tiered_cache."
    },
    {
      "code": 1034,
      "message": "Upgrade Smart Shield to unlock argo_smart_routing."
    },
    {
      "code": 1034,
      "message": "Upgrade Smart Shield to unlock regional_tiered_cache."
    },
    {
      "code": 1034,
      "message": "Upgrade Smart Shield to unlock cache_reserve."
    },
    {
      "code": 1034,
      "message": "Upgrade Smart Shield to unlock healthchecks_count."
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}