Get domain
Retrieve a custom domain and its verification status.
Address the domain by its id or by its name. Names are unique per workspace, so
api.acme.com is sufficient. You do not need to supply a project, app, or environment.
Use this endpoint to poll after domains.createDomain. Verification runs in the background
and checks DNS approximately each minute.
status: verified means the domain is verified. Unkey has configured routing and requested a
certificate. Each entry in dnsRecords has a verified flag. The flag shows which records
Unkey has read back, so you can see which records are still missing. Some providers hide a
record from DNS lookups, for example a proxied or flattened routing record. Such a record stays
false while it serves traffic. verificationError gives the reason for the last failed
attempt.
dnsRecords contains the same values that domains.createDomain returned. Use it to recover
the values without creating the domain again.
Important: verification stops 24 hours after the domain was created, and the status becomes
failed. The window starts at createdAt, not at the last attempt.
Required Permissions
Your root key must have one of the following permissions:
environment.*.read_domain(to read domains in any environment)environment.<environment_id>.read_domain(to read domains in a specific environment)
Authorizations
Unkey uses bearer tokens for authentication. Public integrations use root keys, while the dashboard proxy uses short-lived JWTs. To authenticate, include the token in the Authorization header of each request:
Root keys have specific permissions attached to them, controlling what operations they can perform. Legacy permissions use tuple strings like api.*.create_key; resource permissions use Unkey Resource Names plus actions, like unkey:v1:ws_123:keyspaces/*#create_key.
Security best practices:
- Keep root keys secure and never expose them in client-side code
- Use different root keys for different environments
- Rotate keys periodically, especially after team member departures
- Create keys with minimal necessary permissions following least privilege principle
- Monitor key usage with audit logs.
Body
Identifies a domain by its Unkey ID or by its name. Pass a 'dom_'-prefixed ID, or a fully qualified domain name such as 'api.acme.com' without a scheme, port, or path. You can give an internationalized name in Unicode or Punycode form. Both forms address the same domain.
Domain names are unique per workspace, so the name alone addresses the domain. You do not need to supply a project, app, or environment.
4 - 253"api.acme.com"
Response
Successfully retrieved the domain.