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.

Security

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

Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY

Parameters
account: {
Optional
id: string
Optional

An account ID

name: string
Optional

An account Name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
}
direction:
Optional

Direction to order zones.

"asc"
"desc"
match:
Optional

Whether to match all search requirements or at least one (any).

"any"
"all"
name: string
Optional

A domain name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
order:
Optional

Field to order zones by.

"name"
"status"
"account.id"
"account.name"
page: number
Optional

Page number of paginated results.

per_page: number
Optional

Number of zones per page.

status:
Optional

A zone status

"initializing"
"pending"
"active"
"moved"
Response fields
errors: Array<>
messages: Array<>
success: boolean

Whether the API call was successful

result: Array<>
Optional
result_info: { count, page, per_page, 1 more... }
Optional
Request example
200Example

Domain types

Type = "full" | "partial" | "secondary"
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... }
AlwaysOnline = { id, value, editable, 1 more... }
AlwaysUseHTTPS = { id }
AutomaticHTTPSRewrites = { id, value }
AutomaticPlatformOptimization = { cache_by_device_type, cf, enabled, 3 more... }
Brotli = { id, value, editable, 1 more... }
BrowserCacheTTL = { id, value }
BrowserCheck = { id, value }
CacheLevel = { id, value }
ChallengeTTL = { id, value, editable, 1 more... }
Ciphers = { id, value, editable, 1 more... }
DevelopmentMode = { id, value, editable, 2 more... }
EarlyHints = { id, value, editable, 1 more... }
EmailObfuscation = { id, value }
FontSettings = { id, editable, modified_on, 1 more... }
H2Prioritization = { id, value, editable, 1 more... }
HotlinkProtection = { id, value, editable, 1 more... }
HTTP2 = { id, value, editable, 1 more... }
HTTP3 = { id, value, editable, 1 more... }
ImageResizing = { id, value, editable, 1 more... }
IPGeolocation = { id, value }
IPV6 = { id, value, editable, 1 more... }
MinTLSVersion = { id, value, editable, 1 more... }
Mirage = { id, value }
NEL = { id, value, editable, 1 more... }
OpportunisticEncryption = { id, value }
OpportunisticOnion = { id, value, editable, 1 more... }
OrangeToOrange = { id, value, editable, 1 more... }
OriginErrorPagePassThru = { id, value }
OriginMaxHTTPVersion = "origin_max_http_version"
Polish = { id, value }
PrefetchPreload = { id, value, editable, 1 more... }
ProxyReadTimeout = { id, value, editable, 1 more... }
PseudoIPV4 = { id, value, editable, 1 more... }
ResponseBuffering = { id, value }
RocketLoader = { id, value }
SecurityHeaders = { id, value, editable, 1 more... }
SecurityLevel = { id, value }
ServerSideExcludes = { id, value, editable, 1 more... }
SortQueryStringForCache = { id, value }
SSL = { id, value }
SSLRecommender = { id, enabled }
TLS1_3 = { id, value, editable, 1 more... }
TLSClientAuth = { id, value, editable, 1 more... }
TrueClientIPHeader = { id, value }
WAF = { id, value }
WebP = { id, value, editable, 1 more... }
Websocket = { id, value, editable, 1 more... }
ZeroRTT = { id, value, editable, 1 more... }
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.

Update Zone Subscription -> Envelope<unknown>
put/zones/{identifier}/subscription

Updates zone subscriptions, either plan or add-ons.