Skip to content
Start here

Edit zone setting

client.Zones.Settings.Edit(ctx, settingID, params) (*SettingEditResponse, error)
PATCH/zones/{zone_id}/settings/{setting_id}

Updates a single zone setting by the identifier

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Zone Settings Write
ParametersExpand Collapse
settingID string

Setting name

params SettingEditParams
ZoneID param.Field[string]

Path param: Identifier

maxLength32
Enabled param.Field[bool]Optional

Body param: ssl-recommender enrollment setting.

ReturnsExpand Collapse
type SettingEditResponse interface{…}

0-RTT session resumption enabled for this zone.

One of the following:
type ZeroRTT struct{…}

0-RTT session resumption enabled for this zone.

ID ZeroRTTID

ID of the zone setting.

Value ZeroRTTValue

Current value of the zone setting.

One of the following:
const ZeroRTTValueOn ZeroRTTValue = "on"
const ZeroRTTValueOff ZeroRTTValue = "off"
Editable ZeroRTTEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const ZeroRTTEditableTrue ZeroRTTEditable = true
const ZeroRTTEditableFalse ZeroRTTEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type AdvancedDDoS struct{…}

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.

ID AdvancedDDoSID

ID of the zone setting.

Value AdvancedDDoSValue

Current value of the zone setting.

One of the following:
const AdvancedDDoSValueOn AdvancedDDoSValue = "on"
const AdvancedDDoSValueOff AdvancedDDoSValue = "off"
Editable AdvancedDDoSEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const AdvancedDDoSEditableTrue AdvancedDDoSEditable = true
const AdvancedDDoSEditableFalse AdvancedDDoSEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesCacheRulesAegis struct{…}

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.

ID SettingEditResponseZonesCacheRulesAegisID

ID of the zone setting.

ModifiedOn TimeOptional

Last time this setting was modified.

formatdate-time
Value SettingEditResponseZonesCacheRulesAegisValueOptional

Value of the zone setting.

Enabled boolOptional

Whether the feature is enabled or not.

PoolID stringOptional

Egress pool id which refers to a grouping of dedicated egress IPs through which Cloudflare will connect to origin.

type AlwaysOnline struct{…}

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.

ID AlwaysOnlineID

ID of the zone setting.

Value AlwaysOnlineValue

Current value of the zone setting.

One of the following:
const AlwaysOnlineValueOn AlwaysOnlineValue = "on"
const AlwaysOnlineValueOff AlwaysOnlineValue = "off"
Editable AlwaysOnlineEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const AlwaysOnlineEditableTrue AlwaysOnlineEditable = true
const AlwaysOnlineEditableFalse AlwaysOnlineEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesAlwaysUseHTTPS2 struct{…}

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.

ID SettingEditResponseZonesAlwaysUseHTTPS2ID

ID of the zone setting.

Value SettingEditResponseZonesAlwaysUseHTTPS2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesAlwaysUseHTTPS2ValueOn SettingEditResponseZonesAlwaysUseHTTPS2Value = "on"
const SettingEditResponseZonesAlwaysUseHTTPS2ValueOff SettingEditResponseZonesAlwaysUseHTTPS2Value = "off"
Editable SettingEditResponseZonesAlwaysUseHTTPS2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesAlwaysUseHTTPS2EditableTrue SettingEditResponseZonesAlwaysUseHTTPS2Editable = true
const SettingEditResponseZonesAlwaysUseHTTPS2EditableFalse SettingEditResponseZonesAlwaysUseHTTPS2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesAutomaticHTTPSRewrites2 struct{…}

Enable the Automatic HTTPS Rewrites feature for this zone.

ID SettingEditResponseZonesAutomaticHTTPSRewrites2ID

ID of the zone setting.

Value SettingEditResponseZonesAutomaticHTTPSRewrites2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesAutomaticHTTPSRewrites2ValueOn SettingEditResponseZonesAutomaticHTTPSRewrites2Value = "on"
const SettingEditResponseZonesAutomaticHTTPSRewrites2ValueOff SettingEditResponseZonesAutomaticHTTPSRewrites2Value = "off"
Editable SettingEditResponseZonesAutomaticHTTPSRewrites2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesAutomaticHTTPSRewrites2EditableTrue SettingEditResponseZonesAutomaticHTTPSRewrites2Editable = true
const SettingEditResponseZonesAutomaticHTTPSRewrites2EditableFalse SettingEditResponseZonesAutomaticHTTPSRewrites2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type Brotli struct{…}

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

ID BrotliID

ID of the zone setting.

Value BrotliValue

Current value of the zone setting.

One of the following:
const BrotliValueOff BrotliValue = "off"
const BrotliValueOn BrotliValue = "on"
Editable BrotliEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const BrotliEditableTrue BrotliEditable = true
const BrotliEditableFalse BrotliEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesBrowserCacheTTL2 struct{…}

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).

ID SettingEditResponseZonesBrowserCacheTTL2ID

ID of the zone setting.

Value int64

Current value of the zone setting.

maximum31536000
minimum0
Editable SettingEditResponseZonesBrowserCacheTTL2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesBrowserCacheTTL2EditableTrue SettingEditResponseZonesBrowserCacheTTL2Editable = true
const SettingEditResponseZonesBrowserCacheTTL2EditableFalse SettingEditResponseZonesBrowserCacheTTL2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesBrowserCheck2 struct{…}

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).

ID SettingEditResponseZonesBrowserCheck2ID

ID of the zone setting.

Value SettingEditResponseZonesBrowserCheck2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesBrowserCheck2ValueOn SettingEditResponseZonesBrowserCheck2Value = "on"
const SettingEditResponseZonesBrowserCheck2ValueOff SettingEditResponseZonesBrowserCheck2Value = "off"
Editable SettingEditResponseZonesBrowserCheck2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesBrowserCheck2EditableTrue SettingEditResponseZonesBrowserCheck2Editable = true
const SettingEditResponseZonesBrowserCheck2EditableFalse SettingEditResponseZonesBrowserCheck2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesCacheLevel2 struct{…}

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).

ID SettingEditResponseZonesCacheLevel2ID

ID of the zone setting.

Value SettingEditResponseZonesCacheLevel2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesCacheLevel2ValueAggressive SettingEditResponseZonesCacheLevel2Value = "aggressive"
const SettingEditResponseZonesCacheLevel2ValueBasic SettingEditResponseZonesCacheLevel2Value = "basic"
const SettingEditResponseZonesCacheLevel2ValueSimplified SettingEditResponseZonesCacheLevel2Value = "simplified"
Editable SettingEditResponseZonesCacheLevel2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesCacheLevel2EditableTrue SettingEditResponseZonesCacheLevel2Editable = true
const SettingEditResponseZonesCacheLevel2EditableFalse SettingEditResponseZonesCacheLevel2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type ChallengeTTL struct{…}

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).

ID ChallengeTTLID

ID of the zone setting.

Value ChallengeTTLValue

Current value of the zone setting.

One of the following:
const ChallengeTTLValue300 ChallengeTTLValue = 300
const ChallengeTTLValue900 ChallengeTTLValue = 900
const ChallengeTTLValue1800 ChallengeTTLValue = 1800
const ChallengeTTLValue2700 ChallengeTTLValue = 2700
const ChallengeTTLValue3600 ChallengeTTLValue = 3600
const ChallengeTTLValue7200 ChallengeTTLValue = 7200
const ChallengeTTLValue10800 ChallengeTTLValue = 10800
const ChallengeTTLValue14400 ChallengeTTLValue = 14400
const ChallengeTTLValue28800 ChallengeTTLValue = 28800
const ChallengeTTLValue57600 ChallengeTTLValue = 57600
const ChallengeTTLValue86400 ChallengeTTLValue = 86400
const ChallengeTTLValue604800 ChallengeTTLValue = 604800
const ChallengeTTLValue2592000 ChallengeTTLValue = 2592000
const ChallengeTTLValue31536000 ChallengeTTLValue = 31536000
Editable ChallengeTTLEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const ChallengeTTLEditableTrue ChallengeTTLEditable = true
const ChallengeTTLEditableFalse ChallengeTTLEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesChinaNetworkEnabled struct{…}

Determines whether or not the china network is enabled.

ID SettingEditResponseZonesChinaNetworkEnabledID

ID of the zone setting.

Value SettingEditResponseZonesChinaNetworkEnabledValue

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesChinaNetworkEnabledValueOn SettingEditResponseZonesChinaNetworkEnabledValue = "on"
const SettingEditResponseZonesChinaNetworkEnabledValueOff SettingEditResponseZonesChinaNetworkEnabledValue = "off"
Editable SettingEditResponseZonesChinaNetworkEnabledEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesChinaNetworkEnabledEditableTrue SettingEditResponseZonesChinaNetworkEnabledEditable = true
const SettingEditResponseZonesChinaNetworkEnabledEditableFalse SettingEditResponseZonesChinaNetworkEnabledEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesContentConverter struct{…}

When enabled and the client sends an Accept header requesting text/markdown, Cloudflare will convert HTML responses to Markdown format using the toMarkdown() service. Refer to the developer documentation for more information.

ID SettingEditResponseZonesContentConverterID

ID of the zone setting.

Value SettingEditResponseZonesContentConverterValue

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesContentConverterValueOff SettingEditResponseZonesContentConverterValue = "off"
const SettingEditResponseZonesContentConverterValueOn SettingEditResponseZonesContentConverterValue = "on"
Editable SettingEditResponseZonesContentConverterEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesContentConverterEditableTrue SettingEditResponseZonesContentConverterEditable = true
const SettingEditResponseZonesContentConverterEditableFalse SettingEditResponseZonesContentConverterEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type Ciphers struct{…}

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

ID CiphersID

ID of the zone setting.

Value []string

Current value of the zone setting.

Editable CiphersEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const CiphersEditableTrue CiphersEditable = true
const CiphersEditableFalse CiphersEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesCNAMEFlattening struct{…}

Whether or not cname flattening is on.

ID SettingEditResponseZonesCNAMEFlatteningID

How to flatten the cname destination.

DeprecatedValue SettingEditResponseZonesCNAMEFlatteningValue

This zone setting is deprecated; please use the DNS Settings route instead. More information at https://edgetunnel-b2h.pages.dev/fundamentals/api/reference/deprecations/#2025-03-21

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesCNAMEFlatteningValueFlattenAtRoot SettingEditResponseZonesCNAMEFlatteningValue = "flatten_at_root"
const SettingEditResponseZonesCNAMEFlatteningValueFlattenAll SettingEditResponseZonesCNAMEFlatteningValue = "flatten_all"
Editable SettingEditResponseZonesCNAMEFlatteningEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesCNAMEFlatteningEditableTrue SettingEditResponseZonesCNAMEFlatteningEditable = true
const SettingEditResponseZonesCNAMEFlatteningEditableFalse SettingEditResponseZonesCNAMEFlatteningEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type DevelopmentMode struct{…}

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.

ID DevelopmentModeID

ID of the zone setting.

Value DevelopmentModeValue

Current value of the zone setting.

One of the following:
const DevelopmentModeValueOn DevelopmentModeValue = "on"
const DevelopmentModeValueOff DevelopmentModeValue = "off"
Editable DevelopmentModeEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const DevelopmentModeEditableTrue DevelopmentModeEditable = true
const DevelopmentModeEditableFalse DevelopmentModeEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
TimeRemaining float64Optional

Value of the zone setting. Notes: The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is false.

type EarlyHints struct{…}

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.

ID EarlyHintsID

ID of the zone setting.

Value EarlyHintsValue

Current value of the zone setting.

One of the following:
const EarlyHintsValueOn EarlyHintsValue = "on"
const EarlyHintsValueOff EarlyHintsValue = "off"
Editable EarlyHintsEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const EarlyHintsEditableTrue EarlyHintsEditable = true
const EarlyHintsEditableFalse EarlyHintsEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesEdgeCacheTTL2 struct{…}

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

ID SettingEditResponseZonesEdgeCacheTTL2ID

ID of the zone setting.

Value SettingEditResponseZonesEdgeCacheTTL2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesEdgeCacheTTL2Value30 SettingEditResponseZonesEdgeCacheTTL2Value = 30
const SettingEditResponseZonesEdgeCacheTTL2Value60 SettingEditResponseZonesEdgeCacheTTL2Value = 60
const SettingEditResponseZonesEdgeCacheTTL2Value300 SettingEditResponseZonesEdgeCacheTTL2Value = 300
const SettingEditResponseZonesEdgeCacheTTL2Value1200 SettingEditResponseZonesEdgeCacheTTL2Value = 1200
const SettingEditResponseZonesEdgeCacheTTL2Value1800 SettingEditResponseZonesEdgeCacheTTL2Value = 1800
const SettingEditResponseZonesEdgeCacheTTL2Value3600 SettingEditResponseZonesEdgeCacheTTL2Value = 3600
const SettingEditResponseZonesEdgeCacheTTL2Value7200 SettingEditResponseZonesEdgeCacheTTL2Value = 7200
const SettingEditResponseZonesEdgeCacheTTL2Value10800 SettingEditResponseZonesEdgeCacheTTL2Value = 10800
const SettingEditResponseZonesEdgeCacheTTL2Value14400 SettingEditResponseZonesEdgeCacheTTL2Value = 14400
const SettingEditResponseZonesEdgeCacheTTL2Value18000 SettingEditResponseZonesEdgeCacheTTL2Value = 18000
const SettingEditResponseZonesEdgeCacheTTL2Value28800 SettingEditResponseZonesEdgeCacheTTL2Value = 28800
const SettingEditResponseZonesEdgeCacheTTL2Value43200 SettingEditResponseZonesEdgeCacheTTL2Value = 43200
const SettingEditResponseZonesEdgeCacheTTL2Value57600 SettingEditResponseZonesEdgeCacheTTL2Value = 57600
const SettingEditResponseZonesEdgeCacheTTL2Value72000 SettingEditResponseZonesEdgeCacheTTL2Value = 72000
const SettingEditResponseZonesEdgeCacheTTL2Value86400 SettingEditResponseZonesEdgeCacheTTL2Value = 86400
const SettingEditResponseZonesEdgeCacheTTL2Value172800 SettingEditResponseZonesEdgeCacheTTL2Value = 172800
const SettingEditResponseZonesEdgeCacheTTL2Value259200 SettingEditResponseZonesEdgeCacheTTL2Value = 259200
const SettingEditResponseZonesEdgeCacheTTL2Value345600 SettingEditResponseZonesEdgeCacheTTL2Value = 345600
const SettingEditResponseZonesEdgeCacheTTL2Value432000 SettingEditResponseZonesEdgeCacheTTL2Value = 432000
const SettingEditResponseZonesEdgeCacheTTL2Value518400 SettingEditResponseZonesEdgeCacheTTL2Value = 518400
const SettingEditResponseZonesEdgeCacheTTL2Value604800 SettingEditResponseZonesEdgeCacheTTL2Value = 604800
Editable SettingEditResponseZonesEdgeCacheTTL2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesEdgeCacheTTL2EditableTrue SettingEditResponseZonesEdgeCacheTTL2Editable = true
const SettingEditResponseZonesEdgeCacheTTL2EditableFalse SettingEditResponseZonesEdgeCacheTTL2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesEmailObfuscation2 struct{…}

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

ID SettingEditResponseZonesEmailObfuscation2ID

ID of the zone setting.

Value SettingEditResponseZonesEmailObfuscation2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesEmailObfuscation2ValueOn SettingEditResponseZonesEmailObfuscation2Value = "on"
const SettingEditResponseZonesEmailObfuscation2ValueOff SettingEditResponseZonesEmailObfuscation2Value = "off"
Editable SettingEditResponseZonesEmailObfuscation2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesEmailObfuscation2EditableTrue SettingEditResponseZonesEmailObfuscation2Editable = true
const SettingEditResponseZonesEmailObfuscation2EditableFalse SettingEditResponseZonesEmailObfuscation2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type H2Prioritization struct{…}

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.

ID H2PrioritizationID

ID of the zone setting.

Value H2PrioritizationValue

Current value of the zone setting.

One of the following:
const H2PrioritizationValueOn H2PrioritizationValue = "on"
const H2PrioritizationValueOff H2PrioritizationValue = "off"
const H2PrioritizationValueCustom H2PrioritizationValue = "custom"
Editable H2PrioritizationEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const H2PrioritizationEditableTrue H2PrioritizationEditable = true
const H2PrioritizationEditableFalse H2PrioritizationEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
One of the following:
One of the following:
type HTTP2 struct{…}

HTTP2 enabled for this zone.

ID HTTP2ID

ID of the zone setting.

Value HTTP2Value

Current value of the zone setting.

One of the following:
const HTTP2ValueOn HTTP2Value = "on"
const HTTP2ValueOff HTTP2Value = "off"
Editable HTTP2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const HTTP2EditableTrue HTTP2Editable = true
const HTTP2EditableFalse HTTP2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type HTTP3 struct{…}

HTTP3 enabled for this zone.

ID HTTP3ID

ID of the zone setting.

Value HTTP3Value

Current value of the zone setting.

One of the following:
const HTTP3ValueOn HTTP3Value = "on"
const HTTP3ValueOff HTTP3Value = "off"
Editable HTTP3EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const HTTP3EditableTrue HTTP3Editable = true
const HTTP3EditableFalse HTTP3Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type ImageResizing struct{…}

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.

ID ImageResizingID

ID of the zone setting.

Value ImageResizingValue

Current value of the zone setting.

One of the following:
const ImageResizingValueOn ImageResizingValue = "on"
const ImageResizingValueOff ImageResizingValue = "off"
const ImageResizingValueOpen ImageResizingValue = "open"
Editable ImageResizingEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const ImageResizingEditableTrue ImageResizingEditable = true
const ImageResizingEditableFalse ImageResizingEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesIPGeolocation2 struct{…}

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).

ID SettingEditResponseZonesIPGeolocation2ID

ID of the zone setting.

Value SettingEditResponseZonesIPGeolocation2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesIPGeolocation2ValueOn SettingEditResponseZonesIPGeolocation2Value = "on"
const SettingEditResponseZonesIPGeolocation2ValueOff SettingEditResponseZonesIPGeolocation2Value = "off"
Editable SettingEditResponseZonesIPGeolocation2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesIPGeolocation2EditableTrue SettingEditResponseZonesIPGeolocation2Editable = true
const SettingEditResponseZonesIPGeolocation2EditableFalse SettingEditResponseZonesIPGeolocation2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type IPV6 struct{…}

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

ID IPV6ID

ID of the zone setting.

Value IPV6Value

Current value of the zone setting.

One of the following:
const IPV6ValueOff IPV6Value = "off"
const IPV6ValueOn IPV6Value = "on"
Editable IPV6EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const IPV6EditableTrue IPV6Editable = true
const IPV6EditableFalse IPV6Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesMaxUpload struct{…}

Maximum size of an allowable upload.

ID SettingEditResponseZonesMaxUploadID

identifier of the zone setting.

Value SettingEditResponseZonesMaxUploadValue

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesMaxUploadValue100 SettingEditResponseZonesMaxUploadValue = 100
const SettingEditResponseZonesMaxUploadValue125 SettingEditResponseZonesMaxUploadValue = 125
const SettingEditResponseZonesMaxUploadValue150 SettingEditResponseZonesMaxUploadValue = 150
const SettingEditResponseZonesMaxUploadValue175 SettingEditResponseZonesMaxUploadValue = 175
const SettingEditResponseZonesMaxUploadValue200 SettingEditResponseZonesMaxUploadValue = 200
const SettingEditResponseZonesMaxUploadValue225 SettingEditResponseZonesMaxUploadValue = 225
const SettingEditResponseZonesMaxUploadValue250 SettingEditResponseZonesMaxUploadValue = 250
const SettingEditResponseZonesMaxUploadValue275 SettingEditResponseZonesMaxUploadValue = 275
const SettingEditResponseZonesMaxUploadValue300 SettingEditResponseZonesMaxUploadValue = 300
const SettingEditResponseZonesMaxUploadValue325 SettingEditResponseZonesMaxUploadValue = 325
const SettingEditResponseZonesMaxUploadValue350 SettingEditResponseZonesMaxUploadValue = 350
const SettingEditResponseZonesMaxUploadValue375 SettingEditResponseZonesMaxUploadValue = 375
const SettingEditResponseZonesMaxUploadValue400 SettingEditResponseZonesMaxUploadValue = 400
const SettingEditResponseZonesMaxUploadValue425 SettingEditResponseZonesMaxUploadValue = 425
const SettingEditResponseZonesMaxUploadValue450 SettingEditResponseZonesMaxUploadValue = 450
const SettingEditResponseZonesMaxUploadValue475 SettingEditResponseZonesMaxUploadValue = 475
const SettingEditResponseZonesMaxUploadValue500 SettingEditResponseZonesMaxUploadValue = 500
const SettingEditResponseZonesMaxUploadValue1000 SettingEditResponseZonesMaxUploadValue = 1000
Editable SettingEditResponseZonesMaxUploadEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesMaxUploadEditableTrue SettingEditResponseZonesMaxUploadEditable = true
const SettingEditResponseZonesMaxUploadEditableFalse SettingEditResponseZonesMaxUploadEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type MinTLSVersion struct{…}

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.

ID MinTLSVersionID

ID of the zone setting.

Value MinTLSVersionValue

Current value of the zone setting.

One of the following:
const MinTLSVersionValue1_0 MinTLSVersionValue = "1.0"
const MinTLSVersionValue1_1 MinTLSVersionValue = "1.1"
const MinTLSVersionValue1_2 MinTLSVersionValue = "1.2"
const MinTLSVersionValue1_3 MinTLSVersionValue = "1.3"
Editable MinTLSVersionEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const MinTLSVersionEditableTrue MinTLSVersionEditable = true
const MinTLSVersionEditableFalse MinTLSVersionEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesMirage2 struct{…}

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

ID SettingEditResponseZonesMirage2ID

ID of the zone setting.

DeprecatedValue SettingEditResponseZonesMirage2Value

Mirage is being deprecated. More information at https://edgetunnel-b2h.pages.dev/speed/optimization/images/mirage/

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesMirage2ValueOn SettingEditResponseZonesMirage2Value = "on"
const SettingEditResponseZonesMirage2ValueOff SettingEditResponseZonesMirage2Value = "off"
Editable SettingEditResponseZonesMirage2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesMirage2EditableTrue SettingEditResponseZonesMirage2Editable = true
const SettingEditResponseZonesMirage2EditableFalse SettingEditResponseZonesMirage2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type NEL struct{…}

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

ID NELID

Zone setting identifier.

Value NELValue

Current value of the zone setting.

Enabled boolOptional
Editable NELEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const NELEditableTrue NELEditable = true
const NELEditableFalse NELEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesOpportunisticEncryption2 struct{…}

Enables the Opportunistic Encryption feature for a zone.

ID SettingEditResponseZonesOpportunisticEncryption2ID

ID of the zone setting.

Value SettingEditResponseZonesOpportunisticEncryption2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesOpportunisticEncryption2ValueOn SettingEditResponseZonesOpportunisticEncryption2Value = "on"
const SettingEditResponseZonesOpportunisticEncryption2ValueOff SettingEditResponseZonesOpportunisticEncryption2Value = "off"
Editable SettingEditResponseZonesOpportunisticEncryption2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesOpportunisticEncryption2EditableTrue SettingEditResponseZonesOpportunisticEncryption2Editable = true
const SettingEditResponseZonesOpportunisticEncryption2EditableFalse SettingEditResponseZonesOpportunisticEncryption2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type OpportunisticOnion struct{…}

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

ID OpportunisticOnionID

ID of the zone setting.

Value OpportunisticOnionValue

Current value of the zone setting.

One of the following:
const OpportunisticOnionValueOn OpportunisticOnionValue = "on"
const OpportunisticOnionValueOff OpportunisticOnionValue = "off"
Editable OpportunisticOnionEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const OpportunisticOnionEditableTrue OpportunisticOnionEditable = true
const OpportunisticOnionEditableFalse OpportunisticOnionEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type OrangeToOrange struct{…}

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

ID OrangeToOrangeID

ID of the zone setting.

Value OrangeToOrangeValue

Current value of the zone setting.

One of the following:
const OrangeToOrangeValueOn OrangeToOrangeValue = "on"
const OrangeToOrangeValueOff OrangeToOrangeValue = "off"
Editable OrangeToOrangeEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const OrangeToOrangeEditableTrue OrangeToOrangeEditable = true
const OrangeToOrangeEditableFalse OrangeToOrangeEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesOriginErrorPagePassThru2 struct{…}

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.

ID SettingEditResponseZonesOriginErrorPagePassThru2ID

ID of the zone setting.

Value SettingEditResponseZonesOriginErrorPagePassThru2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesOriginErrorPagePassThru2ValueOn SettingEditResponseZonesOriginErrorPagePassThru2Value = "on"
const SettingEditResponseZonesOriginErrorPagePassThru2ValueOff SettingEditResponseZonesOriginErrorPagePassThru2Value = "off"
Editable SettingEditResponseZonesOriginErrorPagePassThru2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesOriginErrorPagePassThru2EditableTrue SettingEditResponseZonesOriginErrorPagePassThru2Editable = true
const SettingEditResponseZonesOriginErrorPagePassThru2EditableFalse SettingEditResponseZonesOriginErrorPagePassThru2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesCacheRulesOriginH2MaxStreams struct{…}

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.

ID SettingEditResponseZonesCacheRulesOriginH2MaxStreamsID

Value of the zone setting.

ModifiedOn TimeOptional

Last time this setting was modified.

formatdate-time
Value int64Optional

Value of the Origin H2 Max Streams Setting.

maximum1000
minimum1
type SettingEditResponseZonesCacheRulesOriginMaxHTTPVersion struct{…}

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”.

ID SettingEditResponseZonesCacheRulesOriginMaxHTTPVersionID

Value of the zone setting.

ModifiedOn TimeOptional

Last time this setting was modified.

formatdate-time
Value SettingEditResponseZonesCacheRulesOriginMaxHTTPVersionValueOptional

Value of the Origin Max HTTP Version Setting.

One of the following:
const SettingEditResponseZonesCacheRulesOriginMaxHTTPVersionValue2 SettingEditResponseZonesCacheRulesOriginMaxHTTPVersionValue = "2"
const SettingEditResponseZonesCacheRulesOriginMaxHTTPVersionValue1 SettingEditResponseZonesCacheRulesOriginMaxHTTPVersionValue = "1"
type SettingEditResponseZonesPolish2 struct{…}

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.

ID SettingEditResponseZonesPolish2ID

ID of the zone setting.

Value SettingEditResponseZonesPolish2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesPolish2ValueOff SettingEditResponseZonesPolish2Value = "off"
const SettingEditResponseZonesPolish2ValueLossless SettingEditResponseZonesPolish2Value = "lossless"
const SettingEditResponseZonesPolish2ValueLossy SettingEditResponseZonesPolish2Value = "lossy"
Editable SettingEditResponseZonesPolish2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesPolish2EditableTrue SettingEditResponseZonesPolish2Editable = true
const SettingEditResponseZonesPolish2EditableFalse SettingEditResponseZonesPolish2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type PrefetchPreload struct{…}

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

ID PrefetchPreloadID

ID of the zone setting.

Value PrefetchPreloadValue

Current value of the zone setting.

One of the following:
const PrefetchPreloadValueOn PrefetchPreloadValue = "on"
const PrefetchPreloadValueOff PrefetchPreloadValue = "off"
Editable PrefetchPreloadEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const PrefetchPreloadEditableTrue PrefetchPreloadEditable = true
const PrefetchPreloadEditableFalse PrefetchPreloadEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesPrivacyPass struct{…}

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).

ID SettingEditResponseZonesPrivacyPassID

ID of the zone setting.

DeprecatedValue SettingEditResponseZonesPrivacyPassValue

Privacy Pass v1 was deprecated in 2023. (Announcement - https://blog.cloudflare.com/privacy-pass-standard/) and (API deprecation details - https://edgetunnel-b2h.pages.dev/fundamentals/api/reference/deprecations/#2024-03-31)

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesPrivacyPassValueOn SettingEditResponseZonesPrivacyPassValue = "on"
const SettingEditResponseZonesPrivacyPassValueOff SettingEditResponseZonesPrivacyPassValue = "off"
Editable SettingEditResponseZonesPrivacyPassEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesPrivacyPassEditableTrue SettingEditResponseZonesPrivacyPassEditable = true
const SettingEditResponseZonesPrivacyPassEditableFalse SettingEditResponseZonesPrivacyPassEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type ProxyReadTimeout struct{…}

Maximum time between two read operations from origin.

ID ProxyReadTimeoutID

ID of the zone setting.

Value float64

Current value of the zone setting.

Editable ProxyReadTimeoutEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const ProxyReadTimeoutEditableTrue ProxyReadTimeoutEditable = true
const ProxyReadTimeoutEditableFalse ProxyReadTimeoutEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type PseudoIPV4 struct{…}

The value set for the Pseudo IPv4 setting.

ID PseudoIPV4ID

Value of the Pseudo IPv4 setting.

Value PseudoIPV4Value

Current value of the zone setting.

One of the following:
const PseudoIPV4ValueOff PseudoIPV4Value = "off"
const PseudoIPV4ValueAddHeader PseudoIPV4Value = "add_header"
const PseudoIPV4ValueOverwriteHeader PseudoIPV4Value = "overwrite_header"
Editable PseudoIPV4EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const PseudoIPV4EditableTrue PseudoIPV4Editable = true
const PseudoIPV4EditableFalse PseudoIPV4Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesRedirectsForAITraining struct{…}

When enabled, Cloudflare will redirect verified AI training crawlers to canonical URLs found in the HTML response, ensuring AI models train on authoritative content.

ID SettingEditResponseZonesRedirectsForAITrainingID

ID of the zone setting.

Value SettingEditResponseZonesRedirectsForAITrainingValue

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesRedirectsForAITrainingValueOff SettingEditResponseZonesRedirectsForAITrainingValue = "off"
const SettingEditResponseZonesRedirectsForAITrainingValueOn SettingEditResponseZonesRedirectsForAITrainingValue = "on"
Editable SettingEditResponseZonesRedirectsForAITrainingEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesRedirectsForAITrainingEditableTrue SettingEditResponseZonesRedirectsForAITrainingEditable = true
const SettingEditResponseZonesRedirectsForAITrainingEditableFalse SettingEditResponseZonesRedirectsForAITrainingEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesReplaceInsecureJS struct{…}

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.

ID SettingEditResponseZonesReplaceInsecureJSID

ID of the zone setting.

Value SettingEditResponseZonesReplaceInsecureJSValue

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesReplaceInsecureJSValueOn SettingEditResponseZonesReplaceInsecureJSValue = "on"
const SettingEditResponseZonesReplaceInsecureJSValueOff SettingEditResponseZonesReplaceInsecureJSValue = "off"
Editable SettingEditResponseZonesReplaceInsecureJSEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesReplaceInsecureJSEditableTrue SettingEditResponseZonesReplaceInsecureJSEditable = true
const SettingEditResponseZonesReplaceInsecureJSEditableFalse SettingEditResponseZonesReplaceInsecureJSEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesResponseBuffering2 struct{…}

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.

ID SettingEditResponseZonesResponseBuffering2ID

ID of the zone setting.

Value SettingEditResponseZonesResponseBuffering2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesResponseBuffering2ValueOn SettingEditResponseZonesResponseBuffering2Value = "on"
const SettingEditResponseZonesResponseBuffering2ValueOff SettingEditResponseZonesResponseBuffering2Value = "off"
Editable SettingEditResponseZonesResponseBuffering2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesResponseBuffering2EditableTrue SettingEditResponseZonesResponseBuffering2Editable = true
const SettingEditResponseZonesResponseBuffering2EditableFalse SettingEditResponseZonesResponseBuffering2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesRocketLoader2 struct{…}

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.

ID SettingEditResponseZonesRocketLoader2ID

ID of the zone setting.

Value SettingEditResponseZonesRocketLoader2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesRocketLoader2ValueOn SettingEditResponseZonesRocketLoader2Value = "on"
const SettingEditResponseZonesRocketLoader2ValueOff SettingEditResponseZonesRocketLoader2Value = "off"
Editable SettingEditResponseZonesRocketLoader2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesRocketLoader2EditableTrue SettingEditResponseZonesRocketLoader2Editable = true
const SettingEditResponseZonesRocketLoader2EditableFalse SettingEditResponseZonesRocketLoader2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesSchemasAutomaticPlatformOptimization struct{…}

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

ID SettingEditResponseZonesSchemasAutomaticPlatformOptimizationID

ID of the zone setting.

Current value of the zone setting.

CacheByDeviceType bool

Indicates whether or not cache by device type is enabled.

Cf bool

Indicates whether or not Cloudflare proxy is enabled.

Enabled bool

Indicates whether or not Automatic Platform Optimization is enabled.

Hostnames []string

An array of hostnames where Automatic Platform Optimization for WordPress is activated.

Wordpress bool

Indicates whether or not site is powered by WordPress.

WpPlugin bool

Indicates whether or not Cloudflare for WordPress plugin is installed.

Editable SettingEditResponseZonesSchemasAutomaticPlatformOptimizationEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesSchemasAutomaticPlatformOptimizationEditableTrue SettingEditResponseZonesSchemasAutomaticPlatformOptimizationEditable = true
const SettingEditResponseZonesSchemasAutomaticPlatformOptimizationEditableFalse SettingEditResponseZonesSchemasAutomaticPlatformOptimizationEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesSearchForAgents struct{…}

When enabled, Cloudflare provisions an AI Search instance for the zone and exposes a /.well-known/ai-search endpoint that AI agents can query. Markdown responses also receive an agent: YAML capability block advertising the search endpoint.

ID SettingEditResponseZonesSearchForAgentsID

ID of the zone setting.

Value SettingEditResponseZonesSearchForAgentsValue

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesSearchForAgentsValueOff SettingEditResponseZonesSearchForAgentsValue = "off"
const SettingEditResponseZonesSearchForAgentsValueOn SettingEditResponseZonesSearchForAgentsValue = "on"
Editable SettingEditResponseZonesSearchForAgentsEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesSearchForAgentsEditableTrue SettingEditResponseZonesSearchForAgentsEditable = true
const SettingEditResponseZonesSearchForAgentsEditableFalse SettingEditResponseZonesSearchForAgentsEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SecurityHeaders struct{…}

Cloudflare security header for a zone.

ID SecurityHeadersID

ID of the zone’s security header.

Value SecurityHeadersValue

Current value of the zone setting.

StrictTransportSecurity SecurityHeadersValueStrictTransportSecurityOptional

Strict Transport Security.

Enabled boolOptional

Whether or not strict transport security is enabled.

IncludeSubdomains boolOptional

Include all subdomains for strict transport security.

MaxAge float64Optional

Max age in seconds of the strict transport security.

Nosniff boolOptional

Whether or not to include ‘X-Content-Type-Options: nosniff’ header.

Preload boolOptional

Enable automatic preload of the HSTS configuration.

Editable SecurityHeadersEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SecurityHeadersEditableTrue SecurityHeadersEditable = true
const SecurityHeadersEditableFalse SecurityHeadersEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesSecurityLevel2 struct{…}

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).

ID SettingEditResponseZonesSecurityLevel2ID

ID of the zone setting.

Value SettingEditResponseZonesSecurityLevel2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesSecurityLevel2ValueOff SettingEditResponseZonesSecurityLevel2Value = "off"
const SettingEditResponseZonesSecurityLevel2ValueEssentiallyOff SettingEditResponseZonesSecurityLevel2Value = "essentially_off"
const SettingEditResponseZonesSecurityLevel2ValueLow SettingEditResponseZonesSecurityLevel2Value = "low"
const SettingEditResponseZonesSecurityLevel2ValueMedium SettingEditResponseZonesSecurityLevel2Value = "medium"
const SettingEditResponseZonesSecurityLevel2ValueHigh SettingEditResponseZonesSecurityLevel2Value = "high"
const SettingEditResponseZonesSecurityLevel2ValueUnderAttack SettingEditResponseZonesSecurityLevel2Value = "under_attack"
Editable SettingEditResponseZonesSecurityLevel2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesSecurityLevel2EditableTrue SettingEditResponseZonesSecurityLevel2Editable = true
const SettingEditResponseZonesSecurityLevel2EditableFalse SettingEditResponseZonesSecurityLevel2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type ServerSideExcludes struct{…}

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).

ID ServerSideExcludesID

ID of the zone setting.

Value ServerSideExcludesValue

Current value of the zone setting.

One of the following:
const ServerSideExcludesValueOn ServerSideExcludesValue = "on"
const ServerSideExcludesValueOff ServerSideExcludesValue = "off"
Editable ServerSideExcludesEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const ServerSideExcludesEditableTrue ServerSideExcludesEditable = true
const ServerSideExcludesEditableFalse ServerSideExcludesEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesSha1Support struct{…}

Allow SHA1 support.

ID SettingEditResponseZonesSha1SupportID

Zone setting identifier.

Value SettingEditResponseZonesSha1SupportValue

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesSha1SupportValueOff SettingEditResponseZonesSha1SupportValue = "off"
const SettingEditResponseZonesSha1SupportValueOn SettingEditResponseZonesSha1SupportValue = "on"
Editable SettingEditResponseZonesSha1SupportEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesSha1SupportEditableTrue SettingEditResponseZonesSha1SupportEditable = true
const SettingEditResponseZonesSha1SupportEditableFalse SettingEditResponseZonesSha1SupportEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesSortQueryStringForCache2 struct{…}

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.

ID SettingEditResponseZonesSortQueryStringForCache2ID

ID of the zone setting.

Value SettingEditResponseZonesSortQueryStringForCache2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesSortQueryStringForCache2ValueOn SettingEditResponseZonesSortQueryStringForCache2Value = "on"
const SettingEditResponseZonesSortQueryStringForCache2ValueOff SettingEditResponseZonesSortQueryStringForCache2Value = "off"
Editable SettingEditResponseZonesSortQueryStringForCache2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesSortQueryStringForCache2EditableTrue SettingEditResponseZonesSortQueryStringForCache2Editable = true
const SettingEditResponseZonesSortQueryStringForCache2EditableFalse SettingEditResponseZonesSortQueryStringForCache2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesSSL2 struct{…}

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).

ID SettingEditResponseZonesSSL2ID

ID of the zone setting.

Value SettingEditResponseZonesSSL2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesSSL2ValueOff SettingEditResponseZonesSSL2Value = "off"
const SettingEditResponseZonesSSL2ValueFlexible SettingEditResponseZonesSSL2Value = "flexible"
const SettingEditResponseZonesSSL2ValueFull SettingEditResponseZonesSSL2Value = "full"
const SettingEditResponseZonesSSL2ValueStrict SettingEditResponseZonesSSL2Value = "strict"
Editable SettingEditResponseZonesSSL2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesSSL2EditableTrue SettingEditResponseZonesSSL2Editable = true
const SettingEditResponseZonesSSL2EditableFalse SettingEditResponseZonesSSL2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SSLRecommender struct{…}

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.

ID SSLRecommenderIDOptional

Enrollment value for SSL/TLS Recommender.

Enabled boolOptional

ssl-recommender enrollment setting.

type SettingEditResponseZonesTLS1_2Only struct{…}

Only allows TLS1.2.

ID SettingEditResponseZonesTLS1_2OnlyID

Zone setting identifier.

Value SettingEditResponseZonesTLS1_2OnlyValue

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesTLS1_2OnlyValueOff SettingEditResponseZonesTLS1_2OnlyValue = "off"
const SettingEditResponseZonesTLS1_2OnlyValueOn SettingEditResponseZonesTLS1_2OnlyValue = "on"
Editable SettingEditResponseZonesTLS1_2OnlyEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesTLS1_2OnlyEditableTrue SettingEditResponseZonesTLS1_2OnlyEditable = true
const SettingEditResponseZonesTLS1_2OnlyEditableFalse SettingEditResponseZonesTLS1_2OnlyEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type TLS1_3 struct{…}

Enables Crypto TLS 1.3 feature for a zone.

ID TLS1_3ID

ID of the zone setting.

Value TLS1_3Value

Current value of the zone setting.

One of the following:
const TLS1_3ValueOn TLS1_3Value = "on"
const TLS1_3ValueOff TLS1_3Value = "off"
const TLS1_3ValueZrt TLS1_3Value = "zrt"
Editable TLS1_3EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const TLS1_3EditableTrue TLS1_3Editable = true
const TLS1_3EditableFalse TLS1_3Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type TLSClientAuth struct{…}

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

ID TLSClientAuthID

ID of the zone setting.

Value TLSClientAuthValue

Current value of the zone setting.

One of the following:
const TLSClientAuthValueOn TLSClientAuthValue = "on"
const TLSClientAuthValueOff TLSClientAuthValue = "off"
Editable TLSClientAuthEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const TLSClientAuthEditableTrue TLSClientAuthEditable = true
const TLSClientAuthEditableFalse TLSClientAuthEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesTransformations struct{…}

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.

ID SettingEditResponseZonesTransformationsID

ID of the zone setting. Shared between Image Transformations and Video Transformations.

Value SettingEditResponseZonesTransformationsValue

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesTransformationsValueOn SettingEditResponseZonesTransformationsValue = "on"
const SettingEditResponseZonesTransformationsValueOff SettingEditResponseZonesTransformationsValue = "off"
const SettingEditResponseZonesTransformationsValueOpen SettingEditResponseZonesTransformationsValue = "open"
Editable SettingEditResponseZonesTransformationsEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesTransformationsEditableTrue SettingEditResponseZonesTransformationsEditable = true
const SettingEditResponseZonesTransformationsEditableFalse SettingEditResponseZonesTransformationsEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesTransformationsAllowedOrigins struct{…}

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.

ID SettingEditResponseZonesTransformationsAllowedOriginsID

ID of the zone setting. Shared between Image Transformations and Video Transformations.

Value string

Current value of the zone setting.

Editable SettingEditResponseZonesTransformationsAllowedOriginsEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesTransformationsAllowedOriginsEditableTrue SettingEditResponseZonesTransformationsAllowedOriginsEditable = true
const SettingEditResponseZonesTransformationsAllowedOriginsEditableFalse SettingEditResponseZonesTransformationsAllowedOriginsEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesTrueClientIPHeader2 struct{…}

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.

ID SettingEditResponseZonesTrueClientIPHeader2ID

ID of the zone setting.

Value SettingEditResponseZonesTrueClientIPHeader2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesTrueClientIPHeader2ValueOn SettingEditResponseZonesTrueClientIPHeader2Value = "on"
const SettingEditResponseZonesTrueClientIPHeader2ValueOff SettingEditResponseZonesTrueClientIPHeader2Value = "off"
Editable SettingEditResponseZonesTrueClientIPHeader2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesTrueClientIPHeader2EditableTrue SettingEditResponseZonesTrueClientIPHeader2Editable = true
const SettingEditResponseZonesTrueClientIPHeader2EditableFalse SettingEditResponseZonesTrueClientIPHeader2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type SettingEditResponseZonesWAF2 struct{…}

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).

ID SettingEditResponseZonesWAF2ID

ID of the zone setting.

Value SettingEditResponseZonesWAF2Value

Current value of the zone setting.

One of the following:
const SettingEditResponseZonesWAF2ValueOn SettingEditResponseZonesWAF2Value = "on"
const SettingEditResponseZonesWAF2ValueOff SettingEditResponseZonesWAF2Value = "off"
Editable SettingEditResponseZonesWAF2EditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const SettingEditResponseZonesWAF2EditableTrue SettingEditResponseZonesWAF2Editable = true
const SettingEditResponseZonesWAF2EditableFalse SettingEditResponseZonesWAF2Editable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type WebP struct{…}

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.

ID WebPID

ID of the zone setting.

Value WebPValue

Current value of the zone setting.

One of the following:
const WebPValueOff WebPValue = "off"
const WebPValueOn WebPValue = "on"
Editable WebPEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const WebPEditableTrue WebPEditable = true
const WebPEditableFalse WebPEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time
type Websocket struct{…}

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.

ID WebsocketID

ID of the zone setting.

Value WebsocketValue

Current value of the zone setting.

One of the following:
const WebsocketValueOff WebsocketValue = "off"
const WebsocketValueOn WebsocketValue = "on"
Editable WebsocketEditableOptional

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

One of the following:
const WebsocketEditableTrue WebsocketEditable = true
const WebsocketEditableFalse WebsocketEditable = false
ModifiedOn TimeOptional

last time this setting was modified.

formatdate-time

Edit zone setting

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/zones"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.Zones.Settings.Edit(
    context.TODO(),
    "always_online",
    zones.SettingEditParams{
      ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
      Body: zones.SettingEditParamsBodyEnabled{

      },
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "0rtt",
    "value": "on",
    "editable": true,
    "modified_on": "2014-01-01T05:20:00.12345Z"
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "0rtt",
    "value": "on",
    "editable": true,
    "modified_on": "2014-01-01T05:20:00.12345Z"
  }
}