Certificate Authorities
certificate_authorities
Certificate Authorities
Hostname Associations
certificate_authorities.hostname_associations
Methods
List Hostname Associations -> Envelope<{ hostnames }>
get/zones/{zone_id}/certificate_authorities/hostname_associations
List Hostname Associations
Security
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
SSL and Certificates Write SSL and Certificates Read
path Parameters
zone_id: string
(maxLength: 32)Identifier.
query Parameters
mtls_certificate_id: string
(maxLength: 36, minLength: 36)Optional
The UUID to match against for a certificate that was uploaded to the mTLS Certificate Management endpoint. If no mtls_certificate_id is given, the results will be the hostnames associated to your active Cloudflare Managed CA.
Response fields
errors: Array<{ code, message, documentation_url, 1 more... }>
messages: Array<{ code, message, documentation_url, 1 more... }>
success: true
Whether the API call was successful.
result: { hostnames }
Optional
Request example
curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/certificate_authorities/hostname_associations \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"200Example
{
"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": {
"hostnames": [
"api.example.com"
]
}
}Replace Hostname Associations -> Envelope<{ hostnames }>
put/zones/{zone_id}/certificate_authorities/hostname_associations
Replace Hostname Associations
Domain types
HostnameAssociation = string
TLSHostnameAssociation = { hostnames, mtls_certificate_id }