ZITADEL Docs
APIsCore ResourcesV2Instance

AddTrustedDomain

Add Trusted Domain

Adds a Trusted Domain to the instance. By default the instance will be determined by the context of the request, e.g. the host header. You can optionally pass an InstanceID to list the domains of a specific instance. This requires additional permissions.

It must be a valid domain name. Once the domain is added, it can be used in API responses like OIDC discovery, email templates, and more. This can be used in cases where the API is accessed through a different domain than the Custom Domain, e.g. proxy setups and custom login UIs. Unlike Custom Domains, Trusted Domains are not used to route requests to this instance and therefore do not need to be uniquely assigned to an instance.

Required permissions:

  • iam.write
  • system.instance.write (if InstanceID is set)
POST
/zitadel.instance.v2.InstanceService/AddTrustedDomain

Header Parameters

Connect-Protocol-Version*number

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

instanceId?string

InstanceID is the unique ID of the instance to which the Trusted Domain will be added. If not set, the instance in the current context (e.g. identified by the host header) will be used. If an ID is set, the caller must have additional permissions.

trustedDomain*string

Trusted Domain to be added to the instance. Must be a valid domain name. Once the domain is added, it can be used in API responses like OIDC discovery, email templates, and more. This can be used in cases where the API is accessed through a different domain than the Custom Domain, e.g. proxy setups and custom login UIs. Unlike Custom Domains, Trusted Domains are not used to route requests to this instance and therefore do not need to be uniquely assigned to an instance.

[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://loading/zitadel.instance.v2.InstanceService/AddTrustedDomain" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{    "trustedDomain": "string"  }'
{
  "creationDate": "1s"
}
{
  "code": "not_found",
  "message": "string",
  "detail": {
    "type": "string",
    "value": "string",
    "debug": {}
  }
}

Was this page helpful?