Create a configuration rule
POST
/api/zones/{zoneId}/configuration-rules
Creates a configuration rule in the zone. The name must be unique within the zone and the condition set must not duplicate an existing rule. When order is omitted the rule is appended after the highest existing order; when an order is supplied, existing rules at or after that position are shifted down to make room. The number of rules per zone is capped. settingsOverrides may only enable a package-gated feature when the owning organization holds the required package.
Authorizations
ApiToken
Long-lived API token created via POST /api/api-tokens (returned once in plaintext).
Type
API Key (header: X-API-TOKEN)
or
JWT
JWT access token obtained via POST /api/auth/login. Send as: Authorization: Bearer
Type
HTTP (bearer)
Parameters
Path Parameters
zoneId*
Zone identifier
Type
Requiredstring
Request Body
JSON "name": "Cache API responses", "description": "Enable dynamic caching for requests under /api/.", "conditions": { "logic": "string", "conditions": [ { "field": "string", "operator": "string", "target": "X-Custom-Header", "value": "string" } ] }, "order": 0, "enabled": true, "stopOnMatch": false, "settingsOverrides": { "cachingDynamicEnabled": true, "cachingRespectCacheControl": true, "cachingDynamicCacheKey": { "uri": true, "varyByHostname": true, "varyByCookie": [ "string" ] }, "cachingStaticEnabled": true, "cachingStaticCacheKey": { "uri": true, "varyByHostname": true, "varyByQueryString": [ "string" ] }, "cachingDefaultTtl": 0, "cachingIgnoredUrlParams": [ "string" ], "cachingIgnoredCacheTags": [ "string" ], "cachingCustomCacheTagHeaders": [ { "header": "string", "delimiter": "string" } ], "headersRequestSet": [ { "name": "string", "value": "string" } ], "headersResponseSet": [ { "name": "string", "value": "string" } ], "debugHeadersEnabled": true, "processingSsi": true, "processingEsi": true, "customPagesMaintenanceActive": true, "securityEnabled": true, "enabled": true, "imageOptimizationEnabled": true, "imageOptimizationWebpEnabled": true, "imageOptimizationAvifEnabled": true, "imageOptimizationAvifQuality": 0, "imageOptimizationWebpQuality": 0, "imageOptimizationJpegQualityTarget": 0, "imageOptimizationJpegEnabled": true, "imageOptimizationJpegQualityMin": 0, "imageOptimizationJpegQualityMax": 0, "imageOptimizationPngEnabled": true, "imageOptimizationPngQualityMin": 0, "imageOptimizationPngQualityMax": 0, "minifyHtml": true, "basicAuth": { "enabled": true, "allowedUserIds": [ "string" ] }, "defaultBackend": { "type": "string", "id": "string" }, "backendPortOverride": 0 }
{
}
Responses
configuration-rule resource created
JSON "@context": "string", "@id": "string", "@type": "string", "id": "0197c4e3-6f2a-7b3c-9d1e-2f4a6b8c0d1e", "zone": "https://example.com/", "name": "Cache API responses", "description": "Enable dynamic caching for requests under /api/.", "conditions": { "logic": "string", "conditions": [ { "field": "string", "operator": "string", "target": "X-Custom-Header", "value": "string" } ] }, "order": 0, "enabled": true, "stopOnMatch": false, "createdAt": "2026-01-15T10:30:00+00:00", "updatedAt": "2026-01-15T10:30:00+00:00", "settingsOverrides": { "cachingDynamicEnabled": true, "cachingRespectCacheControl": true, "cachingDynamicCacheKey": { "uri": true, "varyByHostname": true, "varyByCookie": [ "string" ] }, "cachingStaticEnabled": true, "cachingStaticCacheKey": { "uri": true, "varyByHostname": true, "varyByQueryString": [ "string" ] }, "cachingDefaultTtl": 0, "cachingIgnoredUrlParams": [ "string" ], "cachingIgnoredCacheTags": [ "string" ], "cachingCustomCacheTagHeaders": [ { "header": "string", "delimiter": "string" } ], "headersRequestSet": [ { "name": "string", "value": "string" } ], "headersResponseSet": [ { "name": "string", "value": "string" } ], "debugHeadersEnabled": true, "processingSsi": true, "processingEsi": true, "customPagesMaintenanceActive": true, "securityEnabled": true, "enabled": true, "imageOptimizationEnabled": true, "imageOptimizationWebpEnabled": true, "imageOptimizationAvifEnabled": true, "imageOptimizationAvifQuality": 0, "imageOptimizationWebpQuality": 0, "imageOptimizationJpegQualityTarget": 0, "imageOptimizationJpegEnabled": true, "imageOptimizationJpegQualityMin": 0, "imageOptimizationJpegQualityMax": 0, "imageOptimizationPngEnabled": true, "imageOptimizationPngQualityMin": 0, "imageOptimizationPngQualityMax": 0, "minifyHtml": true, "basicAuth": { "enabled": true, "allowedUserIds": [ "string" ] }, "defaultBackend": { "type": "string", "id": "string" }, "backendPortOverride": 0 }
{
}
