Custom Hostnames

custom_hostnames

Methods

Create Custom Hostname -> Envelope<{ id, hostname, ssl, 8 more... }>
post/zones/{zone_id}/custom_hostnames

Add a new custom hostname and request that an SSL certificate be issued for it. One of three validation methods—http, txt, email—should be used, with 'http' recommended if the CNAME is already in place (or will be soon). Specifying 'email' will send an email to the WHOIS contacts on file for the base domain plus hostmaster, postmaster, webmaster, admin, administrator. If http is used and the domain is not already pointing to the Managed CNAME host, the PATCH method must be used once it is (to complete validation).

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

SSL and Certificates Write

Parameters
zone_id: string

Identifier

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

Whether the API call was successful

result: { id, hostname, ssl, 8 more... }
Optional
Request example
200Example
Delete Custom Hostname And Any Issued SSL Certificates -> { id }
delete/zones/{zone_id}/custom_hostnames/{custom_hostname_id}

Delete Custom Hostname (and any issued SSL certificates)

Edit Custom Hostname -> Envelope<{ id, hostname, ssl, 8 more... }>
patch/zones/{zone_id}/custom_hostnames/{custom_hostname_id}

Modify SSL configuration for a custom hostname. When sent with SSL config that matches existing config, used to indicate that hostname should pass domain control validation (DCV). Can also be used to change validation type, e.g., from 'http' to 'email'.

Custom Hostname Details -> Envelope<{ id, hostname, ssl, 8 more... }>
get/zones/{zone_id}/custom_hostnames/{custom_hostname_id}

Custom Hostname Details

List Custom Hostnames -> V4PagePaginationArray<{ id, hostname, ssl, 8 more... }>
get/zones/{zone_id}/custom_hostnames

List, search, sort, and filter all of your custom hostnames.

Domain types

BundleMethod = "ubiquitous" | "optimal" | "force"
CustomHostname = { id, hostname, ssl, 8 more... }
DCVMethod = "http" | "txt" | "email"
DomainValidationType = "dv"
Custom Hostnames

Fallback Origin

custom_hostnames.fallback_origin

Methods

Delete Fallback Origin For Custom Hostnames -> Envelope<{ created_at, errors, origin, 2 more... }>
delete/zones/{zone_id}/custom_hostnames/fallback_origin

Delete Fallback Origin for Custom Hostnames

Get Fallback Origin For Custom Hostnames -> Envelope<{ created_at, errors, origin, 2 more... }>
get/zones/{zone_id}/custom_hostnames/fallback_origin

Get Fallback Origin for Custom Hostnames

Update Fallback Origin For Custom Hostnames -> Envelope<{ created_at, errors, origin, 2 more... }>
put/zones/{zone_id}/custom_hostnames/fallback_origin

Update Fallback Origin for Custom Hostnames