CubePathDOCS
CDN

Update CDN Zone

patch/cdn/zones/{zone_uuid}

Update a CDN zone.

SSL options:

  • ssl_type='automatic' (default): Automatically provisions Let's Encrypt certificate
  • ssl_type='custom' + certificate_uuid: Uses an uploaded certificate

A new custom domain starts unverified: the certificate is only issued once it points a CNAME at the zone's domain or publishes the TXT record shown by the zone detail.

Autorización

Authorization
Authorization*string

Bearer YOUR_API_TOKEN con un token de API. También vale la cabecera X-API-Key: YOUR_API_TOKEN.

Parámetros de ruta

zone_uuid*string

Cuerpo de la petición

Update a CDN zone

application/jsonObligatorio
name?string | null

Zone name: lowercase letters, numbers and hyphens, starting and ending with a letter or a number

Rango1 ≤ length ≤ 63
custom_domain?string | null
Rango1 ≤ length ≤ 253
ssl_type?string | null

SSL type: automatic (Let's Encrypt) or custom

Rangopattern ^(automatic|custom)$
certificate_uuid?string | null

UUID of custom certificate

Rango36 ≤ length ≤ 36
token_auth_enabled?boolean | null

Enable signed URL validation. Activating without a previously-set secret auto-generates one; the secret is returned in the response only on first generation. Use POST /cdn/zones/{uuid}/token-auth/rotate-secret to rotate.

token_auth_ip_binding?boolean | null

Bind signed URLs to the client IP. Tightens security against URL sharing but breaks for clients behind CGNAT or with rotating IPs.

cors_enabled?boolean | null

Enable CORS (Cross-Origin Resource Sharing) headers for this zone. Required when your content is fetched from JavaScript on another domain (HLS players, fetch APIs, etc.).

cache_tag_header?string | null

Name of the response header of your origin whose values are the cache tags of the object (space or comma separated), so you can purge by tag. Letters, digits, - and _ (1 to 64). null or an empty string turns tags off. Objects already cached keep the tags they were stored with (none before this was set): purge everything once after turning it on or renaming it.

Rangolength ≤ 64
compression_enabled?boolean | null

Compress text responses at the edge with Brotli, Zstandard or gzip, whichever the visitor accepts (off by default). Does not change what is cached. null leaves it as it is.

cors_allow_origins?string | null

Origins allowed to fetch this zone's content. Use "*" to allow any origin, or a comma-separated list of exact origins (scheme + host + optional port). Ignored when cors_enabled is false.

Rangolength ≤ 4096
managed_waf?ManagedWAFUpdate | null

Managed WAF settings. Only the keys you send change; null leaves everything as it is. In log mode it only detects; in block mode it refuses what scores at or over the threshold.

Propiedades (5)
mode?string | null

off (default), log (detects and logs, nothing is blocked) or block (answers 403 to the requests whose score reaches threshold). block is refused (422) until it is enabled on every edge node.

Valores"off""log""block"
threshold?integer | null

Score from which block mode refuses a request, 1 to 100 (default 5). Used only in block mode.

Rango1 ≤ value ≤ 100
level?integer | null

Sensitivity, 1 (default) or 2. 2 flags more requests.

Rango1 ≤ value ≤ 2
exclude_rule_ids?array<integer> | null

Rule ids the zone does not want evaluated. The list is replaced as a whole when given.

Rangoitems ≤ 256
exclude_categories?array<string> | null

Rule categories the zone does not want evaluated. The list is replaced as a whole when given.

Rangoitems ≤ 64
challenge?CDNChallengeUpdate | null

Challenge of the under attack mode: ttl_minutes (10 to 1440) and difficulty (12 to 20). Only the keys you send change; a key set to null goes back to the platform default; null for the whole object changes nothing. The settings are kept between attacks.

Propiedades (2)
ttl_minutes?integer | null

How long a visitor that solved the challenge is not asked again, 10 to 1440 minutes (default 30). Lowering it makes visitors who already had a pass solve the challenge again.

Rango10 ≤ value ≤ 1440
difficulty?integer | null

How much work the visitor's browser does to pass, 12 to 20 (default 16, or 18 at level 3). Each step doubles the work, so an old phone takes longer to get in. Raising it makes visitors who already had a pass solve the challenge again.

Rango12 ≤ value ≤ 20
https?ZoneHttpsUpdate | null

HTTPS settings: always_use_https, min_tls_version (1.2 or 1.3) and hsts {enabled, max_age, include_subdomains, preload}. Only the keys you send change; null leaves everything as it is. Turning off always_use_https, using TLS 1.3 or turning HSTS on is refused until the platform enables it.

Propiedades (3)
always_use_https?boolean | null

Redirect HTTP requests to HTTPS (on by default). Turn it off only if visitors must be able to use plain HTTP.

min_tls_version?string | null

Oldest TLS version the zone accepts, 1.2 (default) or 1.3. With 1.3, old browsers and apps can no longer connect to the zone.

Valores"1.2""1.3"
hsts?ZoneHstsUpdate | null

HSTS settings. null leaves them as they are.

Propiedades (4)
enabled?boolean | null

Send Strict-Transport-Security. Turning it off after it was on makes the zone send max-age=0 so that browsers forget the policy. null leaves it as it is.

max_age?integer | null

Seconds a browser remembers to use HTTPS only, 300 to 63072000 (2 years). Default 15552000 (6 months).

Rango300 ≤ value ≤ 63072000
include_subdomains?boolean | null

Also applies to every subdomain of the host.

preload?boolean | null

Marks the host as eligible for browser preload lists. Needs include_subdomains and a max_age of at least 31536000. Browsers that preload a host cannot be taken back to HTTP quickly.

websockets_enabled?boolean | null

Let WebSocket connections (and other Connection: Upgrade tunnels) reach your origin through the CDN (on by default). Tunnels are not cached; firewall, rate limit, WAF and under attack rules apply when the connection opens, and the frames are not inspected. Outgoing traffic is billed like the rest of the CDN. A tunnel closes after 1 hour without data and when an edge node restarts, so the client must reconnect. null leaves it as it is.

image_transform_enabled?boolean | null

Resize and convert images at the edge with URLs like /cdn-cgi/image/<options>/<path> (off by default, beta, no charge). Turning it on or off empties the zone's cache once on each edge node. null leaves it as it is.

Respuestas

Successful Response

application/json

detail*string
token_auth_secret?string | null