Skip to Content
ZITADEL Docs
APIsCore ResourcesV2Organization

Generate Organization Domain Validation

Generate a new file to be able to verify your domain with DNS or HTTP challenge.

Required permission:

  • org.write
POST
/v2/organizations/{organization_id}/domains/validation/generate

Path Parameters

organization_id*organization_id

OrganizationID is the unique identifier of the organization for which the domain validation is to be generated.

Request Body

application/json
  1. body
domain*domain

Domain is the full qualified domain name for which the validation is to be generated.

type?type

Type is the domain validation type to be generated. Depending on the type, you will have to add a DNS record or a file to your webserver. Make sure that the challenge is reachable via the chosen method. The validation has to be done within one hour, otherwise the token will expire and you will have to generate a new one. After you have added the record or the file, you can verify the domain via the VerifyOrganizationDomain endpoint. You can check the status of the domain via the ListOrganizationDomains endpoint. The domain will be marked as verified after a successful verification.

Value in"DOMAIN_VALIDATION_TYPE_UNSPECIFIED""DOMAIN_VALIDATION_TYPE_HTTP""DOMAIN_VALIDATION_TYPE_DNS"

Response Body

Success

application/json
  1. response
token?token

Token is a verification token that needs to be added to the DNS records or as a file to the webserver. Zitadel will check for this token to verify the domain.

url?url

URL is the location where the token needs to be placed for HTTP challenge.

Example Request
curl -X POST 'https://example.com/v2/organizations/string/domains/validation/generate' \  -H 'Content-Type: application/json' \  -d '{  "domain": "string"}'
Example Response200
{  "token": "string",  "url": "string"}

Was this page helpful?