Custom Hostnames

Success Codes

EndpointMethodCode
/v4/zones/:zone_id/custom_hostnamesPOST201 Created
/v4/zones/:zone_id/custom_hostnames/:custom_hostname_idGET200 OK
/v4/zones/:zone_id/custom_hostnamesGET200 OK
/v4/zones/:zone_id/custom_hostnames/:custom_hostname_idDELETE200 OK
/v4/zones/:zone_id/custom_hostnames/:custom_hostname_idPATCH202 Accepted

Error Codes

HTTP Status CodeAPI Error CodeError Message
4001400Unable to decode the JSON request body. Please check your input and try again.
4001401Unable to encode the Custom Metadata as JSON. Please check your input and try again.
4001402Zone ID is required. Please check your input and try again.
4001403The request has no Authorization header. Please check your input and try again.
4001407Invalid custom hostname. Custom hostnames have to be smaller than 256 characters in length, cannot be IP addresses, cannot contain any special characters such as `~!@#$%^&*()=+{}[]\
4001408Custom hostnames with non-ASCII characters are not supported. Please check your input and try again.
4001409Reserved top domain custom hostnames, such as 'test', 'example', 'invalid' or 'localhost', is not supported. Please check your input and try again.
4001410Unable to parse custom hostname - :reason. Please check your input and try again.
Reasons:
publicsuffix: cannot derive eTLD+1 for domain :domain
publicsuffix: invalid public suffix :suffix for domain :domain
4001411Custom hostnames ending in example.com, example.net, or example.org are prohibited. Please check your input and try again.
4001412Custom metadata for wildcard custom hostnames is not supported. Please check your input and try again.
4001415Invalid custom origin hostname. Custom origin hostnames have to be smaller than 256 characters in length, cannot be IP addresses, cannot contain any special characters such as ~`~!@#$%^&*()=+{}[]\
4001416Custom origin hostnames with non-ASCII characters are not supported. Please check your input and try again.
4001417Reserved top domain custom origin hostnames, such as 'test', 'example', 'invalid' or 'localhost', is not supported. Please check your input and try again.
4001418Unable to parse custom origin hostname - :reason. Please check your input and try again.
Reasons:
publicsuffix: cannot derive eTLD+1 for domain :domain
publicsuffix: invalid public suffix :suffix for domain :domain
4001419Custom origin hostnames ending in example.com, example.net, or example.org are prohibited. Please check your input and try again.
4001420Wildcard custom origin hostnames are not supported. Please check your input and try again.
4001421The custom origin hostname you specified does not exist on Cloudflare as a DNS record (A, AAAA or CNAME) in your zone: :zone_tag. Please check your input and try again.
4001422Invalid 'http2' setting. Only 'on' or 'off' is accepted. Please check your input and try again.
4001423Invalid 'tls_1_2_only' setting. Only 'on' or 'off' is accepted. Please check your input and try again.
4001424Invalid 'tls_1_3' setting. Only 'on' or 'off' is accepted. Please check your input and try again.
4001425Invalid 'min_tls_version' setting. Only '1.0','1.1','1.2' or '1.3' is accepted. Please check your input and try again.
4001426The certificate that you uploaded cannot be parsed. Please check your input and try again.
4001427The certificate that you uploaded is empty. Please check your input and try again.
4001428The private key you uploaded cannot be parsed. Please check your input and try again.
4001429The private key you uploaded does not match the certificate. Please check your input and try again.
4001430The custom CSR ID is invalid. Please check your input and try again.
4041431The custom CSR was not found.
4001432The validation method is not supported. Only 'http', 'email' or 'cname' is accepted. Please check your input and try again.
4001433The validation type is not supported. Only 'dv' is accepted. Please check your input and try again.
4001434The SSL attribute is invalid. Please refer to the API documentation, check your input and try again.
4001435The custom hostname ID is invalid. Please check your input and try again.
4041436The custom hostname was not found.
4001437Invalid hostname.contain query parameter. The hostname.contain query parameter has to be smaller than 256 characters in length, cannot be IP addresses, cannot contain any special characters such as `~!@#$%^&*()=+{}[]\
4001438Cannot specify other filter parameters in addition to 'id'. Only one must be specified. Please check your input and try again.
4091439Modifying the custom hostname is not supported. Please check your input and try again.
4001440Both validation type and validation method are required. Please check your input and try again.
4001441The certificate that you uploaded is having trouble bundling against the public trust store. Please check your input and try again.
4001442Invalid 'ciphers' setting. Please refer to the documentation for the list of accepted cipher suites. Please check your input and try again.
4001443Cipher suite selection is not supported for a minimum TLS version of 1.3. Please check your input and try again.
4001444The certificate chain that you uploaded has multiple leaf certificates. Please check your input and try again.
4001445The certificate chain that you uploaded has no leaf certificates. Please check your input and try again.
4001446The certificate that you uploaded does not include the custom hostname - :custom_hostname. Please check your input and try again.
4001447The certificate that you uploaded does not use a supported signature algorithm. Only SHA-256/ECDSA, SHA-256/RSA, and SHA-1/RSA signature algorithms are supported. Please check your input and try again.
4001448Custom hostnames with wildcards are not supported for certificates managed by Cloudflare. Please check your input and try again.
4001449The request input 'bundle_method' must be one of: ubiquitous, optimal, force.
4011000Unable to extract bearer token
4011001Unable to parse JWT token
4011002Bad JWT header
4011003Failed to verify JWT token
4011004Failed to get claims from JWT token
4011005JWT token does not have required claims
4031404No quota has been allocated for this zone. If you're already a paid SSL for SaaS customer, please contact your Customer Success Manager for additional provisioning. If you're not yet enrolled, please fill out this form and someone from our sales team will contact you: https://www.cloudflare.com/plans/enterprise/contact/.
4031405Quota exceeded. If you're already a paid SSL for SaaS customer, please contact your Customer Success Manager for additional provisioning. If you're not yet enrolled, please fill out this form and someone from our sales team will contact you: https://www.cloudflare.com/plans/enterprise/contact/.
4031413No custom metadata access has been allocated for this zone. If you're already a paid SSL for SaaS customer, please contact your Customer Success Manager for additional provisioning. If you're not yet enrolled, please fill out this form and someone from our sales team will contact you: https://www.cloudflare.com/plans/enterprise/contact/.
4031414Access to setting a custom origin server has not been granted for this zone. If you're already a paid SSL for SaaS customer, please contact your Customer Success Manager for additional provisioning. If you're not yet enrolled, please fill out this form and someone from our sales team will contact you: https://www.cloudflare.com/plans/enterprise/contact/"
4091406Duplicate custom hostname found.
5001500Internal Server Error