List domains
List the custom domains attached to an environment and their verification status.
Results are paginated and sorted by their id. When hasMore is true, send the
returned cursor to get the next page. An environment with no domains returns an
empty array, not a 404.
status: verified means the domain is verified. Unkey has configured routing and requested a
certificate. Each domain includes its full dnsRecords. Each record has a verified flag.
The flag shows which records Unkey has read back, so you can see which records are still
missing without a second call. 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.
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)
Authorization
Body
application/jsonIdentifies a resource by either its unique ID or its slug.
Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.
Length: 3–255Pattern: ^[a-zA-Z0-9_-]+$
Identifies a resource by either its unique ID or its slug.
Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.
Length: 3–255Pattern: ^[a-zA-Z0-9_-]+$
Identifies a resource by either its unique ID or its slug.
Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.
Length: 3–255Pattern: ^[a-zA-Z0-9_-]+$
The maximum number of domains one response contains.
A small limit makes the response smaller, but makes more requests necessary.
Default: 100
Range: 1–100
The pagination cursor from the response that came before.
Send it to get the next page when that response has hasMore: true.
Length: max 256
Responses
requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
The domains attached to the environment, sorted by their id.
The array is empty when the environment has no domains. This is not an error.
Items: max 100
Show child attributesHide child attributes
Identifies a resource by either its unique ID or its slug.
Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.
Length: 3–255Pattern: ^[a-zA-Z0-9_-]+$
Length: 8–255Pattern: ^[a-zA-Z0-9_]+$
Length: 8–255Pattern: ^[a-zA-Z0-9_]+$
The environment this domain serves. Traffic to the domain reaches whatever is currently
deployed to this environment.
Length: 8–255Pattern: ^[a-zA-Z0-9_]+$
The verification status of the domain.
pending: the domain is created. No DNS check has completed yet.verifying: Unkey checks the DNS records approximately each minute.verified: the domain is verified. Unkey has configured routing and requested a certificate.failed: the required DNS records did not appear within 24 hours. Fix the records, then retry verification.
pendingverifyingverifiedfailedWhy the most recent verification attempt did not succeed, in plain language.
Omitted while verification is progressing normally.
Length: max 512
The DNS records this domain needs. Create each record at your DNS provider.
Each record has a verified flag. The flag shows whether Unkey has read that record back,
so it tells you which records are still missing.
Items: min 1
Show child attributesHide child attributes
Record type to create. ALIAS is not a real DNS record type: it means an apex-compatible
alias, which providers expose as ALIAS, ANAME, or a flattened CNAME. Apex domains cannot
hold a plain CNAME, so they receive ALIAS where a subdomain receives CNAME.
CNAMEALIASTXTFully qualified name of the record, ready to use as-is.
Some providers want a name relative to the zone instead. Drop the zone and its trailing dot:
in zone acme.com, api.acme.com becomes api and _unkey.api.acme.com becomes
_unkey.api. A name equal to the zone itself is usually entered as @.
Length: 1–253
The value to set on the record, exactly as given, including any prefix.
Do not trim or reformat it: verification compares the published record against this string.
Use the lowest TTL your provider allows until the domain is verified. Verification polls DNS,
so a long TTL keeps a stale value cached and can burn the verification window on a value you
have already corrected. Raise it afterwards if you want.
Length: 1–512
Seconds a resolver may cache this record. Set it in your provider alongside the record's
name and value.
Range: >= 1
Whether Unkey has read this record back with the expected value. Use it to see which
records are still outstanding.
False does not always mean the record is missing. A provider that does not expose the
published value to a DNS lookup, such as a proxied or flattened routing record, leaves
this false for as long as it serves traffic; such a domain verifies through its TXT
record instead. Always false on a domain no check has run against yet.
What this record is for and any provider-specific caveat that applies to it.
Worth surfacing to whoever edits the DNS zone. Treat it as optional: it carries
no data the record itself needs, so a future record type may omit it.
Length: max 512
Show child attributesHide child attributes
Opaque pagination token for retrieving the next page of results.
Include this exact value in the cursor field of subsequent requests.
Cursors are temporary and may expire after extended periods.
Length: 1–1024
Indicates whether additional results exist beyond this page.
When true, use the cursor to fetch the next page.
When false, you have reached the end of the result set.
requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).Show child attributesHide child attributes
JSON path indicating exactly where in the request the error occurred. This helps pinpoint the problematic field or parameter. Examples include:
- 'body.name' (field in request body)
- 'body.items[3].tags' (nested array element)
- 'path.apiId' (path parameter)
- 'query.limit' (query parameter)
Use this location to identify exactly which part of your request needs correction.
requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).