Zones

zones

Methods

Create Zone -> Envelope<>
post/zones

Create Zone

Delete Zone -> Envelope<{ id }>
delete/zones/{zone_id}

Deletes an existing zone.

Edit Zone -> Envelope<>
patch/zones/{zone_id}

Edits a zone. Only one zone property can be changed at a time.

Zone Details -> Envelope<>
get/zones/{zone_id}

Zone Details

List Zones -> V4PagePaginationArray<>
get/zones

Lists, searches, sorts, and filters your zones. Listing zones across more than 500 accounts is currently not allowed.

Domain types

Type = "full" | "partial" | "secondary"

A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup.

Zone = { id, account, activated_on, 14 more... }
Zones

Activation Check

zones.activation_check

Methods

Rerun The Activation Check -> Envelope<{ id }>
put/zones/{zone_id}/activation_check

Triggeres a new activation check for a PENDING Zone. This can be triggered every 5 min for paygo/ent customers, every hour for FREE Zones.

Zones

Custom Nameservers

zones.custom_nameservers

Methods

Get Account Custom Nameserver Related Zone Metadata -> { errors, messages, success, 3 more... }
get/zones/{zone_id}/custom_ns

Get metadata for account-level custom nameservers on a zone.

Deprecated in favor of Show DNS Settings.

Set Account Custom Nameserver Related Zone Metadata -> Envelope<Array<string>>
put/zones/{zone_id}/custom_ns

Set metadata for account-level custom nameservers on a zone.

If you would like new zones in the account to use account custom nameservers by default, use PUT /accounts/:identifier to set the account setting use_account_custom_ns_by_default to true.

Deprecated in favor of Update DNS Settings.

Zones

Holds

zones.holds

Methods

Create Zone Hold -> Envelope<>
post/zones/{zone_id}/hold

Enforce a zone hold on the zone, blocking the creation and activation of zones with this zone's hostname.

Remove Zone Hold -> Envelope<>
delete/zones/{zone_id}/hold

Stop enforcement of a zone hold on the zone, permanently or temporarily, allowing the creation and activation of zones with this zone's hostname.

Update Zone Hold -> Envelope<>
patch/zones/{zone_id}/hold

Update the hold_after and/or include_subdomains values on an existing zone hold. The hold is enabled if the hold_after date-time value is in the past.

Get Zone Hold -> Envelope<>
get/zones/{zone_id}/hold

Retrieve whether the zone is subject to a zone hold, and metadata about the hold.

Domain types

ZoneHold = { hold, hold_after, include_subdomains }
Zones

Plans

zones.plans

Methods

Available Plan Details -> Envelope<>
get/zones/{zone_id}/available_plans/{plan_identifier}

Details of the available plan that the zone can subscribe to.

List Available Plans -> SinglePage<>
get/zones/{zone_id}/available_plans

Lists available plans the zone can subscribe to.

Domain types

AvailableRatePlan = { id, can_subscribe, currency, 7 more... }
Zones

Rate Plans

zones.rate_plans

Methods

List Available Rate Plans -> Envelope<Array<{ id, components, currency, 3 more... }>>
get/zones/{zone_id}/available_rate_plans

Lists all rate plans the zone can subscribe to.

Zones

Settings

zones.settings

Methods

Edit Zone Setting -> Envelope< | | | 50 more...>
patch/zones/{zone_id}/settings/{setting_id}

Updates a single zone setting by the identifier

Get Zone Setting -> Envelope< | | | 50 more...>
get/zones/{zone_id}/settings/{setting_id}

Fetch a single zone setting by name

Domain types

AdvancedDDoS = { id, value, editable, 1 more... }

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.

Aegis = { id, modified_on, value }

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.

AlwaysOnline = { id, value, editable, 1 more... }

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.

AlwaysUseHTTPS = { id }
AutomaticHTTPSRewrites = { id, value }
AutomaticPlatformOptimization = { cache_by_device_type, cf, enabled, 3 more... }
Brotli = { id, value, editable, 1 more... }

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

BrowserCacheTTL = { id, value }
BrowserCheck = { id, value }
CacheLevel = { id, value }
ChallengeTTL = { id, value, editable, 1 more... }

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

Ciphers = { id, value, editable, 1 more... }

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

DevelopmentMode = { id, value, editable, 2 more... }

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.

EarlyHints = { id, value, editable, 1 more... }

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.

EmailObfuscation = { id, value }
FontSettings = { id, editable, modified_on, 1 more... }

Enhance your website's font delivery with Cloudflare Fonts. Deliver Google Hosted fonts from your own domain, boost performance, and enhance user privacy. Refer to the Cloudflare Fonts documentation for more information.

H2Prioritization = { id, value, editable, 1 more... }

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.

HotlinkProtection = { id, value, editable, 1 more... }

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

HTTP2 = { id, value, editable, 1 more... }

HTTP2 enabled for this zone.

HTTP3 = { id, value, editable, 1 more... }

HTTP3 enabled for this zone.

ImageResizing = { id, value, editable, 1 more... }

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

IPGeolocation = { id, value }
IPV6 = { id, value, editable, 1 more... }

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

MinTLSVersion = { id, value, editable, 1 more... }

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.

Mirage = { id, value }
NEL = { id, value, editable, 1 more... }

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

OpportunisticEncryption = { id, value }
OpportunisticOnion = { id, value, editable, 1 more... }

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

OrangeToOrange = { id, value, editable, 1 more... }

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

OriginErrorPagePassThru = { id, value }
OriginMaxHTTPVersion = { id, editable, value, 1 more... }
Polish = { id, value }
PrefetchPreload = { id, value, editable, 1 more... }

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

ProxyReadTimeout = { id, value, editable, 1 more... }

Maximum time between two read operations from origin.

PseudoIPV4 = { id, value, editable, 1 more... }

The value set for the Pseudo IPv4 setting.

ResponseBuffering = { id, value }
RocketLoader = { id, value }
SecurityHeaders = { id, value, editable, 1 more... }

Cloudflare security header for a zone.

SecurityLevel = { id, value }
ServerSideExcludes = { id, value, editable, 1 more... }

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

SortQueryStringForCache = { id, value }
SSL = { id, value }
SSLRecommender = { id, enabled }

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.

TLS1_3 = { id, value, editable, 1 more... }

Enables Crypto TLS 1.3 feature for a zone.

TLSClientAuth = { id, value, editable, 1 more... }

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

TrueClientIPHeader = { id, value }
WAF = { id, value }
WebP = { id, value, editable, 1 more... }

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.

Websocket = { id, value, editable, 1 more... }

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.

ZeroRTT = { id, value, editable, 1 more... }

0-RTT session resumption enabled for this zone.

Zones

Subscriptions

zones.subscriptions

Methods

Create Zone Subscription -> Envelope<unknown>
post/zones/{identifier}/subscription

Create a zone subscription, either plan or add-ons.

Zone Subscription Details -> Envelope<unknown>
get/zones/{identifier}/subscription

Lists zone subscription details.

Security

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

Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY

Accepted Permissions (at least one required)

Billing Write Billing Read

Parameters
identifier: string
(maxLength: 32)

Subscription identifier tag.

Response fields
errors: Array<>
messages: Array<>
result: unknown
success: true

Whether the API call was successful

Request example
200Example
Update Zone Subscription -> Envelope<unknown>
put/zones/{identifier}/subscription

Updates zone subscriptions, either plan or add-ons.