ZITADEL Docs
APIsCore ResourcesV2Organization

GenerateOrganizationDomainValidation

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*string

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

Request Body

application/json

domain*string

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

type?string

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"
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://loading/v2/organizations/string/domains/validation/generate" \  -H "Content-Type: application/json" \  -d '{    "domain": "string"  }'
{
  "token": "string",
  "url": "string"
}
{
  "code": "not_found",
  "message": "string",
  "detail": {
    "type": "string",
    "value": "string",
    "debug": {}
  }
}

Was this page helpful?