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:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
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": [],
"messages": [],
"result": {
"cache_reserve": {
"editable": true,
"id": "cache_reserve",
"value": "off"
},
"regional_tiered_cache": {
"editable": true,
"id": "regional_tiered_cache",
"value": "off"
},
"smart_routing": {
"editable": true,
"id": "smart_routing",
"value": "off"
},
"smart_tiered_cache": {
"editable": true,
"id": "smart_tiered_cache",
"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": 1035,
"message": "Invalid value for smart_tiered_cache. Value must be 'on' or 'off'."
}
],
"messages": [],
"result": null,
"success": false
}Returns Examples
{
"errors": [],
"messages": [],
"result": {
"cache_reserve": {
"editable": true,
"id": "cache_reserve",
"value": "off"
},
"regional_tiered_cache": {
"editable": true,
"id": "regional_tiered_cache",
"value": "off"
},
"smart_routing": {
"editable": true,
"id": "smart_routing",
"value": "off"
},
"smart_tiered_cache": {
"editable": true,
"id": "smart_tiered_cache",
"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": 1035,
"message": "Invalid value for smart_tiered_cache. Value must be 'on' or 'off'."
}
],
"messages": [],
"result": null,
"success": false
}