Skip to content

Update the cluster's mTLS domain

PUT
/clusters/{cluster_id}/mtls
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

cluster_id
required
string format: uuid
API-Version
required
string
Allowed values: 2026-06-01.beta
Media typeapplication/json

Selects the domain a cluster serves mTLS on.

object
mtls_host
required

A verified custom domain of the cluster, or an empty string to use the default domain. The value is trimmed and lowercased.

string

Example generated

{
  "mtls_host": "example"
}

The request has succeeded.

Media typeapplication/json

A cluster’s mTLS domain choice and the hostnames the cluster reports for it.

object
mtls_host
required

The stored choice: a verified custom domain of the cluster, or an empty string for the default domain.

string
host
required

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.

string
host_valid
required

false when the cluster rejected mtls_host and uses the default domain meanwhile.

boolean
realms
required

Each realm with its mTLS hostnames, sorted by realm name.

Array<object>

One realm’s mTLS hostnames.

object
name
required

Realm name.

string
hostnames
required

Hostnames the realm answers on for mTLS, as reported by the cluster.

Array<string>
custom_domain_record

The wildcard record to add when host is a custom domain.

object
name
required

Record name.

string
type
required

Record type, such as CNAME.

string
value
required

Record value.

string

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.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

The server cannot find the requested resource.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Client error

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri
errors
required
Array<object>
>= 1 items
object
field
required
string
detail
required
string
code
string
value

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

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}
Retry-After
integer
RateLimit-Limit
integer
RateLimit-Remaining
integer
RateLimit-Reset
integer
X-RateLimit-Limit-Second
integer
X-RateLimit-Remaining-Second
integer
X-RateLimit-Limit-Minute
integer
X-RateLimit-Remaining-Minute
integer
X-RateLimit-Limit-Hour
integer
X-RateLimit-Remaining-Hour
integer
X-RateLimit-Limit-Day
integer
X-RateLimit-Remaining-Day
integer

Server error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Server error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}