CDN

Create Edge Rule

post/cdn/zones/{zone_uuid}/rules

Create a new edge rule for a CDN zone (cache, redirects, headers).

Authorization

Authorization
Authorization*string

Bearer YOUR_API_TOKEN with an API token. The X-API-Key: YOUR_API_TOKEN header works too.

Path parameters

zone_uuid*string

Request body

Create a new CDN rule

application/jsonRequired
name*string
Range1 ≤ length ≤ 100
rule_type*CDNRuleType
Value in"ssl""cache""cache_bypass""firewall_ip""firewall_country""firewall_ua""rate_limit""js_challenge""redirect""header_request""header_response""limit_download_speed""limit_requests""limit_connections""limit_bandwidth"
priority?integer
Range1 ≤ value ≤ 10000Default100
match_conditions?record<string, any> | null

Match conditions (path, headers, etc.)

action_config*record<string, any>

Action configuration

enabled?boolean
Defaulttrue
expires_at?string | null
Formatdate-time

Responses

Successful Response

application/json

uuid*string
name*string
rule_type*CDNRuleType
Value in"ssl""cache""cache_bypass""firewall_ip""firewall_country""firewall_ua""rate_limit""js_challenge""redirect""header_request""header_response""limit_download_speed""limit_requests""limit_connections""limit_bandwidth"
detail*string