Update the cluster's mTLS domain
const url = 'http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/mtls';
const options = {
method: 'PUT',
headers: {
'API-Version': '2026-06-01.beta',
'API-Key': '<API-Key>',
'Content-Type': 'application/json'
},
body: '{"mtls_host":"example"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}curl --request PUT \
--url http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/mtls \
--header 'API-Key: <API-Key>' \
--header 'API-Version: 2026-06-01.beta' \
--header 'Content-Type: application/json' \
--data '{ "mtls_host": "example" }'Selects the domain the cluster serves mTLS on: a verified custom domain of the cluster, or the default domain when
mtls_host is empty. Returns the updated settings. If the cluster’s status cannot be read right after the change,
the change is still saved and the response carries the saved choice with no hostnames.
Returns 422 when mtls_host is not a verified custom domain of the cluster, and 404 when the cluster does not
exist or is not a TideCloak cluster on version 0.14.46 or later.
Required scope: clusters:write
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Selects the domain a cluster serves mTLS on.
object
A verified custom domain of the cluster, or an empty string to use the default domain. The value is trimmed and lowercased.
Example generated
{
"mtls_host": "example"
}Responses
Section titled “Responses”The request has succeeded.
A cluster’s mTLS domain choice and the hostnames the cluster reports for it.
object
The stored choice: a verified custom domain of the cluster, or an empty string for the default domain.
The domain the cluster is using for mTLS. It differs from mtls_host while the cluster falls back to the default domain, and is empty until the cluster has reported.
false when the cluster rejected mtls_host and uses the default domain meanwhile.
Each realm with its mTLS hostnames, sorted by realm name.
One realm’s mTLS hostnames.
object
Realm name.
Hostnames the realm answers on for mTLS, as reported by the cluster.
The wildcard record to add when host is a custom domain.
object
Record name.
Record type, such as CNAME.
Record value.
Example generated
{
"mtls_host": "example",
"host": "example",
"host_valid": true,
"realms": [
{
"name": "example",
"hostnames": [
"example"
]
}
],
"custom_domain_record": {
"name": "example",
"type": "example",
"value": "example"
}
}Access is unauthorized.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}The server cannot find the requested resource.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Client error
object
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com",
"errors": [
{
"field": "example",
"detail": "example",
"code": "example",
"value": "example"
}
]
}Client error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Headers
Section titled “Headers”Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}