Search + K

Command Palette

Search for a command to run...

Sign In

Edit multiple zone settings

Deprecated
PATCH /zones/{zone_id}/settings
Copy endpoint
https://api.cloudflare.com/client/v4

Edit settings for a zone.

Parameters

path Path Parameters

Name Type
zone_id required
type ZonesIdentifier = string

Request Body

application/json required
type ZonesMultipleSettings = (type Zones0rtt = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "0rtt";value?: Zones0rttValue

Value of the 0-RTT setting.

type Zones0rttValue = "on" | "off"
; }
| type ZonesAdvancedDdos = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "advanced_ddos";value?: ZonesAdvancedDdosValue

Value of the zone setting. Notes: Defaults to on for Business+ plans

type ZonesAdvancedDdosValue = "on" | "off"
; }
| type ZonesCacheRulesAegis = never | type ZonesAlwaysOnline = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "always_online";value?: ZonesAlwaysOnlineValue

Value of the zone setting.

type ZonesAlwaysOnlineValue = "on" | "off"
; }
| type ZonesSchemasAlwaysUseHttps = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "always_use_https";value?: ZonesAlwaysUseHttpsValue

Value of the zone setting.

type ZonesAlwaysUseHttpsValue = "on" | "off"
; }
| type ZonesSchemasAutomaticHttpsRewrites = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "automatic_https_rewrites";value?: ZonesAutomaticHttpsRewritesValue

Value of the zone setting. Notes: Default value depends on the zone's plan level.

type ZonesAutomaticHttpsRewritesValue = "on" | "off"
; }
| type ZonesBrotli = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "brotli";value?: ZonesBrotliValue

Value of the zone setting.

type ZonesBrotliValue = "off" | "on"
; }
| type ZonesSchemasBrowserCacheTtl = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "browser_cache_ttl";value?: ZonesBrowserCacheTtlValue

Value of the zone setting in seconds. Minimum values by plan:

  • Free: 1 second
  • Pro: 1 second
  • Business: 1 second
  • Enterprise: 1 second Setting a TTL of 0 is equivalent to selecting Respect Existing Headers and is allowed for all plans.
type ZonesBrowserCacheTtlValue = number
; }
| type ZonesSchemasBrowserCheck = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "browser_check";value?: ZonesBrowserCheckValue

Value of the zone setting.

type ZonesBrowserCheckValue = "on" | "off"
; }
| type ZonesSchemasCacheLevel = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "cache_level";value?: ZonesCacheLevelValue

Value of the zone setting.

type ZonesCacheLevelValue = "aggressive" | "basic" | "simplified"
; }
| type ZonesChallengeTtl = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "challenge_ttl";value?: ZonesChallengeTtlValue

Value of the zone setting.

type ZonesChallengeTtlValue = 300 | 900 | 1800 | 2700 | 3600 | 7200 | 10800 | 14400 | 28800 | 57600 | 86400 | 604800 | 2592000 | 31536000
; }
| type ZonesChinaNetworkEnabled = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "china_network_enabled";value?: ZonesChinaNetworkEnabledValue

Value of the zone setting.

type ZonesChinaNetworkEnabledValue = "on" | "off"
; }
| type ZonesCiphers = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "ciphers";value?: ZonesCiphersValue

Value of the zone setting.

type ZonesCiphersValue = string[]
; }
| type ZonesCnameFlattening = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "cname_flattening";value?: ZonesCnameFlatteningValue

Value of the cname flattening setting.

type ZonesCnameFlatteningValue = "flatten_at_root" | "flatten_all"
; }
| type ZonesDevelopmentMode = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "development_mode";time_remaining?: number;value?: ZonesDevelopmentModeValue

Value of the zone setting.

type ZonesDevelopmentModeValue = "on" | "off"
; }
| type ZonesEarlyHints = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "early_hints";value?: ZonesEarlyHintsValue

Value of the zone setting.

type ZonesEarlyHintsValue = "on" | "off"
; }
| type ZonesSchemasEdgeCacheTtl = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "edge_cache_ttl";value?: ZonesEdgeCacheTtlValue

Value of the zone setting. Notes: The minimum TTL available depends on the plan level of the zone. (Enterprise = 30, Business = 1800, Pro = 3600, Free = 7200)

type ZonesEdgeCacheTtlValue = 30 | 60 | 300 | 1200 | 1800 | 3600 | 7200 | 10800 | 14400 | 18000 | 28800 | 43200 | 57600 | 72000 | 86400 | 172800 | 259200 | 345600 | 432000 | 518400 | 604800
; }
| type ZonesSchemasEmailObfuscation = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "email_obfuscation";value?: ZonesEmailObfuscationValue

Value of the zone setting.

type ZonesEmailObfuscationValue = "on" | "off"
; }
| type ZonesH2Prioritization = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "h2_prioritization";value?: ZonesH2PrioritizationValue

Value of the zone setting.

type ZonesH2PrioritizationValue = "on" | "off" | "custom"
; }
| type ZonesHotlinkProtection = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "hotlink_protection";value?: ZonesHotlinkProtectionValue

Value of the zone setting.

type ZonesHotlinkProtectionValue = "on" | "off"
; }
| type ZonesHttp2 = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "http2";value?: ZonesHttp2Value

Value of the HTTP2 setting.

type ZonesHttp2Value = "on" | "off"
; }
| type ZonesHttp3 = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "http3";value?: ZonesHttp3Value

Value of the HTTP3 setting.

type ZonesHttp3Value = "on" | "off"
; }
| type ZonesSchemasIpGeolocation = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "ip_geolocation";value?: ZonesIpGeolocationValue

Value of the zone setting.

type ZonesIpGeolocationValue = "on" | "off"
; }
| type ZonesIpv6 = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "ipv6";value?: ZonesIpv6Value

Value of the zone setting.

type ZonesIpv6Value = "off" | "on"
; }
| type ZonesMaxUpload = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "max_upload";value?: ZonesMaxUploadValue

Value of the zone setting. Notes: The size depends on the plan level of the zone. (Enterprise = 500, Business = 200, Pro = 100, Free = 100)

type ZonesMaxUploadValue = 100 | 125 | 150 | 175 | 200 | 225 | 250 | 275 | 300 | 325 | 350 | 375 | 400 | 425 | 450 | 475 | 500 | 1000
; }
| type ZonesMinTlsVersion = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "min_tls_version";value?: ZonesMinTlsVersionValue

Value of the zone setting.

type ZonesMinTlsVersionValue = "1.0" | "1.1" | "1.2" | "1.3"
; }
| type ZonesSchemasMirage = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "mirage";value?: ZonesMirageValue

Value of the zone setting.

type ZonesMirageValue = "on" | "off"
; }
| type ZonesNel = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "nel";value?: ZonesNelValue

Value of the zone setting.

interface ZonesNelValue {
enabled?: boolean;
}
; }
| type ZonesSchemasOpportunisticEncryption = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "opportunistic_encryption";value?: ZonesOpportunisticEncryptionValue

Value of the zone setting. Notes: Default value depends on the zone's plan level.

type ZonesOpportunisticEncryptionValue = "on" | "off"
; }
| type ZonesOpportunisticOnion = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "opportunistic_onion";value?: ZonesOpportunisticOnionValue

Value of the zone setting. Notes: Default value depends on the zone's plan level.

type ZonesOpportunisticOnionValue = "on" | "off"
; }
| type ZonesOrangeToOrange = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "orange_to_orange";value?: ZonesOrangeToOrangeValue

Value of the zone setting.

type ZonesOrangeToOrangeValue = "on" | "off"
; }
| type ZonesSchemasOriginErrorPagePassThru = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "origin_error_page_pass_thru";value?: ZonesOriginErrorPagePassThruValue

Value of the zone setting.

type ZonesOriginErrorPagePassThruValue = "on" | "off"
; }
| type ZonesCacheRulesOriginH2MaxStreams = never | type ZonesCacheRulesOriginMaxHttpVersion = never | type ZonesSchemasPolish = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "polish";value?: ZonesPolishValue

Value of the zone setting.

type ZonesPolishValue = "off" | "lossless" | "lossy"
; }
| type ZonesPrefetchPreload = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "prefetch_preload";value?: ZonesPrefetchPreloadValue

Value of the zone setting.

type ZonesPrefetchPreloadValue = "on" | "off"
; }
| type ZonesPrivacyPass = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "privacy_pass";value?: ZonesPrivacyPassValue

Value of the Privacy Pass v1 (deprecated) zone setting

type ZonesPrivacyPassValue = "on" | "off"
; }
| type ZonesProxyReadTimeout = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "proxy_read_timeout";value?: ZonesProxyReadTimeoutValue

Value of the zone setting. Notes: Value must be between 1 and 6000

type ZonesProxyReadTimeoutValue = number
; }
| type ZonesPseudoIpv4 = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "pseudo_ipv4";value?: ZonesPseudoIpv4Value

Value of the Pseudo IPv4 setting.

type ZonesPseudoIpv4Value = "off" | "add_header" | "overwrite_header"
; }
| type ZonesReplaceInsecureJs = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "replace_insecure_js";value?: ZonesReplaceInsecureJsValue

Value of the zone setting.

type ZonesReplaceInsecureJsValue = "on" | "off"
; }
| type ZonesSchemasResponseBuffering = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "response_buffering";value?: ZonesResponseBufferingValue

Value of the zone setting.

type ZonesResponseBufferingValue = "on" | "off"
; }
| type ZonesSchemasRocketLoader = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "rocket_loader";value?: ZonesRocketLoaderValue

Value of the zone setting.

type ZonesRocketLoaderValue = "on" | "off"
; }
| type ZonesSchemasAutomaticPlatformOptimization = interface ZonesSchemasBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "automatic_platform_optimization";value?: ZonesAutomaticPlatformOptimization
interface ZonesAutomaticPlatformOptimization {
cache_by_device_type: boolean;
cf: boolean;
enabled: boolean;
hostnames: string[];
wordpress: boolean;
wp_plugin: boolean;
}
; }
| type ZonesSecurityHeader = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "security_header";value?: ZonesSecurityHeaderValue
interface ZonesSecurityHeaderValue {
strict_transport_security?: {
enabled?: boolean;
include_subdomains?: boolean;
max_age?: number;
nosniff?: boolean;
preload?: boolean;
}
;
}
; }
| type ZonesSchemasSecurityLevel = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "security_level";value?: ZonesSecurityLevelValue

Value of the zone setting.

type ZonesSecurityLevelValue = "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"
; }
| type ZonesServerSideExclude = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "server_side_exclude";value?: ZonesServerSideExcludeValue

Value of the zone setting.

type ZonesServerSideExcludeValue = "on" | "off"
; }
| type ZonesSha1Support = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "sha1_support";value?: ZonesSha1SupportValue

Value of the zone setting.

type ZonesSha1SupportValue = "off" | "on"
; }
| type ZonesSchemasSortQueryStringForCache = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "sort_query_string_for_cache";value?: ZonesSortQueryStringForCacheValue

Value of the zone setting.

type ZonesSortQueryStringForCacheValue = "on" | "off"
; }
| type ZonesSchemasSsl = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "ssl";value?: ZonesSslValue

Value of the zone setting. Notes: Depends on the zone's plan level

type ZonesSslValue = "off" | "flexible" | "full" | "strict"
; }
| interface ZonesSslRecommender {
enabled?: ZonesSslRecommenderEnabled

ssl-recommender enrollment setting.

type ZonesSslRecommenderEnabled = boolean
;
id?: "ssl_recommender";
}
| type ZonesTls12Only = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "tls_1_2_only";value?: ZonesTls12OnlyValue

Value of the zone setting.

type ZonesTls12OnlyValue = "off" | "on"
; }
| type ZonesTls13 = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "tls_1_3";value?: ZonesTls13Value

Value of the zone setting. Notes: Default value depends on the zone's plan level.

type ZonesTls13Value = "on" | "off" | "zrt"
; }
| type ZonesTlsClientAuth = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "tls_client_auth";value?: ZonesTlsClientAuthValue

value of the zone setting.

type ZonesTlsClientAuthValue = "on" | "off"
; }
| type ZonesSchemasTrueClientIpHeader = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "true_client_ip_header";value?: ZonesTrueClientIpHeaderValue

Value of the zone setting.

type ZonesTrueClientIpHeaderValue = "on" | "off"
; }
| type ZonesSchemasWaf = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "waf";value?: ZonesWafValue

Value of the zone setting.

type ZonesWafValue = "on" | "off"
; }
| type ZonesWebp = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "webp";value?: ZonesWebpValue

Value of the zone setting.

type ZonesWebpValue = "off" | "on"
; }
| type ZonesWebsockets = interface ZonesBase {
editable?: true | false;
id: string;
modified_on?: string | null;
value: unknown;
}
& { id?: "websockets";value?: ZonesWebsocketsValue

Value of the zone setting.

type ZonesWebsocketsValue = "off" | "on"
; }
)[]

Responses

200 application/json

Edit zone settings info response

type ZonesZoneSettingsResponseCollection = interface ZonesSettingsApiComponentsSchemasApiResponseCommon {
errors: ZonesMessages
type ZonesMessages = { code: number;message: string; }[]
;
messages: ZonesMessages
type ZonesMessages = { code: number;message: string; }[]
;
success: boolean;
}
& { result?: (Zones0rtt

0-RTT session resumption enabled for this zone.

type Zones0rtt = ZonesBase & { id?: "0rtt";value?: Zones0rttValue; }
| ZonesAdvancedDdos

Advanced protection from Distributed Denial of Service (DDoS) attacks on your website. This is an uneditable value that is 'on' in the case of Business and Enterprise zones.

type ZonesAdvancedDdos = ZonesBase & { id?: "advanced_ddos";value?: ZonesAdvancedDdosValue; }
| ZonesCacheRulesAegis

Aegis provides dedicated egress IPs (from Cloudflare to your origin) for your layer 7 WAF and CDN services. The egress IPs are reserved exclusively for your account so that you can increase your origin security by only allowing traffic from a small list of IP addresses.

type ZonesCacheRulesAegis = never
| ZonesAlwaysOnline

When enabled, Cloudflare serves limited copies of web pages available from the Internet Archive's Wayback Machine if your server is offline. Refer to Always Online for more information.

type ZonesAlwaysOnline = ZonesBase & { id?: "always_online";value?: ZonesAlwaysOnlineValue; }
| ZonesSchemasAlwaysUseHttps

Reply to all requests for URLs that use "http" with a 301 redirect to the equivalent "https" URL. If you only want to redirect for a subset of requests, consider creating an "Always use HTTPS" page rule.

type ZonesSchemasAlwaysUseHttps = ZonesBase & { id?: "always_use_https";value?: ZonesAlwaysUseHttpsValue; }
| ZonesSchemasAutomaticHttpsRewrites

Enable the Automatic HTTPS Rewrites feature for this zone.

type ZonesSchemasAutomaticHttpsRewrites = ZonesBase & { id?: "automatic_https_rewrites";value?: ZonesAutomaticHttpsRewritesValue; }
| ZonesBrotli

When the client requesting an asset supports the Brotli compression algorithm, Cloudflare will serve a Brotli compressed version of the asset.

type ZonesBrotli = ZonesBase & { id?: "brotli";value?: ZonesBrotliValue; }
| ZonesSchemasBrowserCacheTtl

Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources will remain on your visitors' computers. Cloudflare will honor any larger times specified by your server. (https://support.cloudflare.com/hc/en-us/articles/200168276).

type ZonesSchemasBrowserCacheTtl = ZonesBase & { id?: "browser_cache_ttl";value?: ZonesBrowserCacheTtlValue; }
| ZonesSchemasBrowserCheck

Browser Integrity Check is similar to Bad Behavior and looks for common HTTP headers abused most commonly by spammers and denies access to your page. It will also challenge visitors that do not have a user agent or a non standard user agent (also commonly used by abuse bots, crawlers or visitors). (https://support.cloudflare.com/hc/en-us/articles/200170086).

type ZonesSchemasBrowserCheck = ZonesBase & { id?: "browser_check";value?: ZonesBrowserCheckValue; }
| ZonesSchemasCacheLevel

Cache Level functions based off the setting level. The basic setting will cache most static resources (i.e., css, images, and JavaScript). The simplified setting will ignore the query string when delivering a cached resource. The aggressive setting will cache all static resources, including ones with a query string. (https://support.cloudflare.com/hc/en-us/articles/200168256).

type ZonesSchemasCacheLevel = ZonesBase & { id?: "cache_level";value?: ZonesCacheLevelValue; }
| ZonesChallengeTtl

Specify how long a visitor is allowed access to your site after successfully completing a challenge (such as a CAPTCHA). After the TTL has expired the visitor will have to complete a new challenge. We recommend a 15 - 45 minute setting and will attempt to honor any setting above 45 minutes. (https://support.cloudflare.com/hc/en-us/articles/200170136).

type ZonesChallengeTtl = ZonesBase & { id?: "challenge_ttl";value?: ZonesChallengeTtlValue; }
| ZonesCiphers

An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.

type ZonesCiphers = ZonesBase & { id?: "ciphers";value?: ZonesCiphersValue; }
| ZonesCnameFlattening

Whether or not cname flattening is on.

type ZonesCnameFlattening = ZonesBase & { id?: "cname_flattening";value?: ZonesCnameFlatteningValue; }
| ZonesDevelopmentMode

Development Mode temporarily allows you to enter development mode for your websites if you need to make changes to your site. This will bypass Cloudflare's accelerated cache and slow down your site, but is useful if you are making changes to cacheable content (like images, css, or JavaScript) and would like to see those changes right away. Once entered, development mode will last for 3 hours and then automatically toggle off.

type ZonesDevelopmentMode = ZonesBase & { id?: "development_mode";time_remaining?: number;value?: ZonesDevelopmentModeValue; }
| ZonesEarlyHints

When enabled, Cloudflare will attempt to speed up overall page loads by serving 103 responses with Link headers from the final response. Refer to Early Hints for more information.

type ZonesEarlyHints = ZonesBase & { id?: "early_hints";value?: ZonesEarlyHintsValue; }
| ZonesSchemasEdgeCacheTtl

Time (in seconds) that a resource will be ensured to remain on Cloudflare's cache servers.

type ZonesSchemasEdgeCacheTtl = ZonesBase & { id?: "edge_cache_ttl";value?: ZonesEdgeCacheTtlValue; }
| ZonesSchemasEmailObfuscation

Encrypt email adresses on your web page from bots, while keeping them visible to humans. (https://support.cloudflare.com/hc/en-us/articles/200170016).

type ZonesSchemasEmailObfuscation = ZonesBase & { id?: "email_obfuscation";value?: ZonesEmailObfuscationValue; }
| ZonesH2Prioritization

HTTP/2 Edge Prioritization optimises the delivery of resources served through HTTP/2 to improve page load performance. It also supports fine control of content delivery when used in conjunction with Workers.

type ZonesH2Prioritization = ZonesBase & { id?: "h2_prioritization";value?: ZonesH2PrioritizationValue; }
| ZonesHotlinkProtection

When enabled, the Hotlink Protection option ensures that other sites cannot suck up your bandwidth by building pages that use images hosted on your site. Anytime a request for an image on your site hits Cloudflare, we check to ensure that it's not another site requesting them. People will still be able to download and view images from your page, but other sites won't be able to steal them for use on their own pages. (https://support.cloudflare.com/hc/en-us/articles/200170026).

type ZonesHotlinkProtection = ZonesBase & { id?: "hotlink_protection";value?: ZonesHotlinkProtectionValue; }
| ZonesHttp2

HTTP2 enabled for this zone.

type ZonesHttp2 = ZonesBase & { id?: "http2";value?: ZonesHttp2Value; }
| ZonesHttp3

HTTP3 enabled for this zone.

type ZonesHttp3 = ZonesBase & { id?: "http3";value?: ZonesHttp3Value; }
| ZonesImageResizing

Image Transformations provides on-demand resizing, conversion and optimization for images served through Cloudflare's network. Refer to the Image Transformations documentation for more information.

type ZonesImageResizing = ZonesBase & { id?: "image_resizing";value?: ZonesImageResizingValue; }
| ZonesSchemasIpGeolocation

Enable IP Geolocation to have Cloudflare geolocate visitors to your website and pass the country code to you. (https://support.cloudflare.com/hc/en-us/articles/200168236).

type ZonesSchemasIpGeolocation = ZonesBase & { id?: "ip_geolocation";value?: ZonesIpGeolocationValue; }
| ZonesIpv6

Enable IPv6 on all subdomains that are Cloudflare enabled. (https://support.cloudflare.com/hc/en-us/articles/200168586).

type ZonesIpv6 = ZonesBase & { id?: "ipv6";value?: ZonesIpv6Value; }
| ZonesMaxUpload

Maximum size of an allowable upload.

type ZonesMaxUpload = ZonesBase & { id?: "max_upload";value?: ZonesMaxUploadValue; }
| ZonesMinTlsVersion

Only accepts HTTPS requests that use at least the TLS protocol version specified. For example, if TLS 1.1 is selected, TLS 1.0 connections will be rejected, while 1.1, 1.2, and 1.3 (if enabled) will be permitted.

type ZonesMinTlsVersion = ZonesBase & { id?: "min_tls_version";value?: ZonesMinTlsVersionValue; }
| ZonesSchemasMirage

Automatically optimize image loading for website visitors on mobile devices. Refer to our blog post for more information.

type ZonesSchemasMirage = ZonesBase & { id?: "mirage";value?: ZonesMirageValue; }
| ZonesNel

Enable Network Error Logging reporting on your zone. (Beta)

type ZonesNel = ZonesBase & { id?: "nel";value?: ZonesNelValue; }
| ZonesSchemasOpportunisticEncryption

Enables the Opportunistic Encryption feature for a zone.

type ZonesSchemasOpportunisticEncryption = ZonesBase & { id?: "opportunistic_encryption";value?: ZonesOpportunisticEncryptionValue; }
| ZonesOpportunisticOnion

Add an Alt-Svc header to all legitimate requests from Tor, allowing the connection to use our onion services instead of exit nodes.

type ZonesOpportunisticOnion = ZonesBase & { id?: "opportunistic_onion";value?: ZonesOpportunisticOnionValue; }
| ZonesOrangeToOrange

Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also on Cloudflare.

type ZonesOrangeToOrange = ZonesBase & { id?: "orange_to_orange";value?: ZonesOrangeToOrangeValue; }
| ZonesSchemasOriginErrorPagePassThru

Cloudflare will proxy customer error pages on any 502,504 errors on origin server instead of showing a default Cloudflare error page. This does not apply to 522 errors and is limited to Enterprise Zones.

type ZonesSchemasOriginErrorPagePassThru = ZonesBase & { id?: "origin_error_page_pass_thru";value?: ZonesOriginErrorPagePassThruValue; }
| ZonesCacheRulesOriginH2MaxStreams

Origin H2 Max Streams configures the max number of concurrent requests that Cloudflare will send within the same connection when communicating with the origin server, if the origin supports it. Note that if your origin does not support H2 multiplexing, 5xx errors may be observed, particularly 520s. Also note that the default value is 100 for all plan types except Enterprise where it is 1. 1 means that H2 multiplexing is disabled.

type ZonesCacheRulesOriginH2MaxStreams = never
| ZonesCacheRulesOriginMaxHttpVersion

Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will attempt to use with your origin. This setting allows Cloudflare to make HTTP/2 requests to your origin. (Refer to Enable HTTP/2 to Origin, for more information.). The default value is "2" for all plan types except Enterprise where it is "1".

type ZonesCacheRulesOriginMaxHttpVersion = never
| ZonesSchemasPolish

Removes metadata and compresses your images for faster page load times. Basic (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster image loading. Larger JPEGs are converted to progressive images, loading a lower-resolution image first and ending in a higher-resolution version. Not recommended for hi-res photography sites.

type ZonesSchemasPolish = ZonesBase & { id?: "polish";value?: ZonesPolishValue; }
| ZonesPrefetchPreload

Cloudflare will prefetch any URLs that are included in the response headers. This is limited to Enterprise Zones.

type ZonesPrefetchPreload = ZonesBase & { id?: "prefetch_preload";value?: ZonesPrefetchPreloadValue; }
| ZonesPrivacyPass

Privacy Pass v1 was a browser extension developed by the Privacy Pass Team to improve the browsing experience for your visitors by allowing users to reduce the number of CAPTCHAs shown. (https://support.cloudflare.com/hc/en-us/articles/115001992652-Privacy-Pass).

type ZonesPrivacyPass = ZonesBase & { id?: "privacy_pass";value?: ZonesPrivacyPassValue; }
| ZonesProxyReadTimeout

Maximum time between two read operations from origin.

type ZonesProxyReadTimeout = ZonesBase & { id?: "proxy_read_timeout";value?: ZonesProxyReadTimeoutValue; }
| ZonesPseudoIpv4

The value set for the Pseudo IPv4 setting.

type ZonesPseudoIpv4 = ZonesBase & { id?: "pseudo_ipv4";value?: ZonesPseudoIpv4Value; }
| ZonesReplaceInsecureJs

Automatically replace insecure JavaScript libraries with safer and faster alternatives provided under cdnjs and powered by Cloudflare. Currently supports the following libraries: Polyfill under polyfill.io.

type ZonesReplaceInsecureJs = ZonesBase & { id?: "replace_insecure_js";value?: ZonesReplaceInsecureJsValue; }
| ZonesSchemasResponseBuffering

Enables or disables buffering of responses from the proxied server. Cloudflare may buffer the whole payload to deliver it at once to the client versus allowing it to be delivered in chunks. By default, the proxied server streams directly and is not buffered by Cloudflare. This is limited to Enterprise Zones.

type ZonesSchemasResponseBuffering = ZonesBase & { id?: "response_buffering";value?: ZonesResponseBufferingValue; }
| ZonesSchemasRocketLoader

Rocket Loader is a general-purpose asynchronous JavaScript optimisation that prioritises rendering your content while loading your site's Javascript asynchronously. Turning on Rocket Loader will immediately improve a web page's rendering time sometimes measured as Time to First Paint (TTFP), and also the window.onload time (assuming there is JavaScript on the page). This can have a positive impact on your Google search ranking. When turned on, Rocket Loader will automatically defer the loading of all Javascript referenced in your HTML, with no configuration required. Refer to Understanding Rocket Loader for more information.

type ZonesSchemasRocketLoader = ZonesBase & { id?: "rocket_loader";value?: ZonesRocketLoaderValue; }
| ZonesSchemasAutomaticPlatformOptimization

Automatic Platform Optimization for WordPress serves your WordPress site from Cloudflare's edge network and caches third-party fonts.

type ZonesSchemasAutomaticPlatformOptimization = ZonesSchemasBase & { id?: "automatic_platform_optimization";value?: ZonesAutomaticPlatformOptimization; }
| ZonesSecurityHeader

Cloudflare security header for a zone.

type ZonesSecurityHeader = ZonesBase & { id?: "security_header";value?: ZonesSecurityHeaderValue; }
| ZonesSchemasSecurityLevel

Choose the appropriate security profile for your website, which will automatically adjust each of the security settings. If you choose to customize an individual security setting, the profile will become Custom. (https://support.cloudflare.com/hc/en-us/articles/200170056).

type ZonesSchemasSecurityLevel = ZonesBase & { id?: "security_level";value?: ZonesSecurityLevelValue; }
| ZonesServerSideExclude

If there is sensitive content on your website that you want visible to real visitors, but that you want to hide from suspicious visitors, all you have to do is wrap the content with Cloudflare SSE tags. Wrap any content that you want to be excluded from suspicious visitors in the following SSE tags: . For example: Bad visitors won't see my phone number, 555-555-5555 . Note: SSE only will work with HTML. If you have HTML minification enabled, you won't see the SSE tags in your HTML source when it's served through Cloudflare. SSE will still function in this case, as Cloudflare's HTML minification and SSE functionality occur on-the-fly as the resource moves through our network to the visitor's computer. (https://support.cloudflare.com/hc/en-us/articles/200170036).

type ZonesServerSideExclude = ZonesBase & { id?: "server_side_exclude";value?: ZonesServerSideExcludeValue; }
| ZonesSha1Support

Allow SHA1 support.

type ZonesSha1Support = ZonesBase & { id?: "sha1_support";value?: ZonesSha1SupportValue; }
| ZonesSchemasSortQueryStringForCache

Cloudflare will treat files with the same query strings as the same file in cache, regardless of the order of the query strings. This is limited to Enterprise Zones.

type ZonesSchemasSortQueryStringForCache = ZonesBase & { id?: "sort_query_string_for_cache";value?: ZonesSortQueryStringForCacheValue; }
| ZonesSchemasSsl

SSL encrypts your visitor's connection and safeguards credit card numbers and other personal data to and from your website. SSL can take up to 5 minutes to fully activate. Requires Cloudflare active on your root domain or www domain. Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare and your web server (all HTTP traffic). Flexible: SSL between the visitor and Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and your web server. You don't need to have an SSL cert on your web server, but your vistors will still see the site as being HTTPS enabled. Full: SSL between the visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and your web server. You'll need to have your own SSL cert or self-signed cert at the very least. Full (Strict): SSL between the visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and your web server. You'll need to have a valid SSL certificate installed on your web server. This certificate must be signed by a certificate authority, have an expiration date in the future, and respond for the request domain name (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416).

type ZonesSchemasSsl = ZonesBase & { id?: "ssl";value?: ZonesSslValue; }
| ZonesSslRecommender

Enrollment in the SSL/TLS Recommender service which tries to detect and recommend (by sending periodic emails) the most secure SSL/TLS setting your origin servers support.

interface ZonesSslRecommender {
enabled?: ZonesSslRecommenderEnabled;
id?: "ssl_recommender";
}
| ZonesTls12Only

Only allows TLS1.2.

type ZonesTls12Only = ZonesBase & { id?: "tls_1_2_only";value?: ZonesTls12OnlyValue; }
| ZonesTls13

Enables Crypto TLS 1.3 feature for a zone.

type ZonesTls13 = ZonesBase & { id?: "tls_1_3";value?: ZonesTls13Value; }
| ZonesTlsClientAuth

TLS Client Auth requires Cloudflare to connect to your origin server using a client certificate (Enterprise Only).

type ZonesTlsClientAuth = ZonesBase & { id?: "tls_client_auth";value?: ZonesTlsClientAuthValue; }
| ZonesTransformations

Media Transformations provides on-demand resizing, conversion and optimization for images and video served through Cloudflare's network. Refer to the Image Transformations and Video Transformations documentation for more information.

type ZonesTransformations = ZonesBase & { id?: "transformations";value?: ZonesImageResizingValue; }
| ZonesTransformationsAllowedOrigins

Media Transformations Allowed Origins restricts transformations for images and video served through Cloudflare's network. Refer to the Image Transformations and Video Transformations documentation for more information.

type ZonesTransformationsAllowedOrigins = ZonesBase & { id?: "transformations_allowed_origins";value?: ZonesTransformationsAllowedOriginsValue; }
| ZonesSchemasTrueClientIpHeader

Allows customer to continue to use True Client IP (Akamai feature) in the headers we send to the origin. This is limited to Enterprise Zones.

type ZonesSchemasTrueClientIpHeader = ZonesBase & { id?: "true_client_ip_header";value?: ZonesTrueClientIpHeaderValue; }
| ZonesSchemasWaf

The WAF examines HTTP requests to your website. It inspects both GET and POST requests and applies rules to help filter out illegitimate traffic from legitimate website visitors. The Cloudflare WAF inspects website addresses or URLs to detect anything out of the ordinary. If the Cloudflare WAF determines suspicious user behavior, then the WAF will 'challenge' the web visitor with a page that asks them to submit a CAPTCHA successfully to continue their action. If the challenge is failed, the action will be stopped. What this means is that Cloudflare's WAF will block any traffic identified as illegitimate before it reaches your origin web server. (https://support.cloudflare.com/hc/en-us/articles/200172016).

type ZonesSchemasWaf = ZonesBase & { id?: "waf";value?: ZonesWafValue; }
| ZonesWebp

When the client requesting the image supports the WebP image codec, and WebP offers a performance advantage over the original image format, Cloudflare will serve a WebP version of the original image.

type ZonesWebp = ZonesBase & { id?: "webp";value?: ZonesWebpValue; }
| ZonesWebsockets

WebSockets are open connections sustained between the client and the origin server. Inside a WebSockets connection, the client and the origin can pass data back and forth without having to reestablish sessions. This makes exchanging data within a WebSockets connection fast. WebSockets are often used for real-time applications such as live chat and gaming. For more information refer to Can I use Cloudflare with Websockets.

type ZonesWebsockets = ZonesBase & { id?: "websockets";value?: ZonesWebsocketsValue; }
)[]
; }

Client Errors

4XX application/json

Edit zone settings info response failure

interface ZonesComponentsSchemasApiResponseCommonFailure {
errors: ZonesMessages
type ZonesMessages = { code: number;message: string; }[]
;
messages: ZonesMessages
type ZonesMessages = { code: number;message: string; }[]
;
result: {} | null;
success: boolean;
}