Create domain

POST /api/domains

Create a new domain with the given data. The maximum domain number is 1, once created, can not be modified, you'll have to delete and recreate one.

application/json

Body Required

  • domain string Required

    The domain name, e.g. example.com.

    Minimum length is 1, maximum length is 256.

Responses

  • 201 application/json

    The domain was created successfully.

    Hide response attributes Show response attributes object
    • id string Required

      Minimum length is 1, maximum length is 21.

    • domain string Required

      Minimum length is 1, maximum length is 256.

    • status string Required

      Values are PendingVerification, PendingSsl, Active, or Error.

    • errorMessage string | null Required

      Maximum length is 1024.

    • dnsRecords array[object] Required
      Hide dnsRecords attributes Show dnsRecords attributes object
  • Bad Request

  • Unauthorized

  • Forbidden

  • Validation error. Please check the request body.

POST /api/domains
curl \
 -X POST https://[tenant_id].logto.app/api/domains \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"domain":"string"}'
Request examples
{
  "domain": "string"
}
Response examples (201)
{
  "id": "string",
  "domain": "string",
  "status": "PendingVerification",
  "errorMessage": "string",
  "dnsRecords": [
    {
      "name": "string",
      "type": "string",
      "value": "string"
    }
  ]
}