Find your connection for a domain
Returns the caller's connection for a domain, for an app that stored the domain but not the connection id (for example to open the removal flow). A connect-scoped widget token must be minted for that domain, and finds a connection that names an end user only when minted with the same end_user_ref; an app-scoped token finds any domain of its application, and an API key any domain of its tenant.
Request
- Base URL: https://api.customdomain.ai/v1
- URL: https://api.customdomain.ai/v1/connections:lookup
- Auth: one of:
- HTTP bearer
- HTTP bearer
Query parameters
Response
The connection
subdomain label; empty means the apex
detected / applied DNS provider
How a connection reaches live.
true when the connection opted into managed mode: the control plane holds a durable, encrypted async grant and can re-apply (POST /v1/connections/{id}:reapply) or revert (DELETE /v1/connections/{id}) the template server-side without re-consent. Omitted (treated as false) for the default use-once connection.
true when the connection belongs to a test mode application. Its DNS is simulated, nothing real is read, written or served, and it counts for nothing (no free domain, quota, billing or metering). Copied from the application at create and never changed. Omitted (treated as false) on a real connection.
When the propagation poller last examined this connection. Omitted until the first check.
Serve an apex↔www redirect. Echoed from create.
Replace an existing SPF record instead of merging into it, where the provider supports it. Echoed from create.
Stored and echoed from create; not acted on yet.
Whether the Let's Encrypt CAA records are part of the desired record set. Echoed from create.
Whether the domain is enrolled in drift monitoring. Echoed from create, where it defaults to true when omitted, and honoured: the drift watch is registered when the connection goes live only if this is true. Connections created before the flag was honoured read true (they were monitored unconditionally, and were backfilled), so this is false only where a caller explicitly opted out.
The multi-domain session this connection was created in. Omitted for a standalone connect.
The integrator's own identifier for the end user who connected this domain. Omitted for a console/direct connect.
When a human (or the create-path resume, or real edge traffic) last asked for this connection to be re-verified. The retry clock is max(created_at, retried_at): a revived connection gets a fresh window from here, not from its original creation. Absent when it was never retried.
Present as integrator when the connection's desired record set was supplied through PUT /v1/connections/{id}/records rather than authored by us. Omitted for the usual server-synthesized or Domain Connect template-materialized set. Such a connection cannot use the Domain Connect rail, which applies our published templates at the provider.
Where the connection was created, recorded once at create and never changed. widget: an end user's connect-scoped widget token (the embedded widget in your product). console: the CustomDomain™ console. api: an API key, or an app-scoped token, from your server. agent: a delegated agent access token. mcp: the MCP server. Empty for connections created before this was recorded. A trusted server-side caller may name its surface with the X-CustomDomain-Client request header (console or mcp); the header is a label only and grants nothing.
The edge also issues/secures the registrable apex alongside this subdomain connection. Omitted (treated as false) when unset.
URL the edge 301s this host to (Power redirect target). Omitted when the connection is not a redirect.
URL paths the edge may static-serve at the root (Power root-path access). Omitted when none are configured.
The last failure reason recorded for this connection, from whichever path failed, not only the background poller. It is persisted by: the propagation poller / :recheck verification (e.g. propagation_timeout, setup_incomplete, pending_expired, domain_already_connected); the foreground apply on POST /connections/{id}/apply (e.g. dns_write_failed, ProviderAuthenticationError, spf_merge_failed, apex_not_supported, forwarding_not_supported); the OAuth callback (which also records forwarding_not_supported); and the Domain Connect async callback (both e.g. provider_unavailable, ProviderAuthenticationError, apply_failed, internal_error, or the provider's own error parameter). Rejected request validation (400) is deliberately NOT recorded here: a malformed request is not a connection failure. Omitted when healthy or never failed; cleared when the connection next verifies.
Human-readable detail for error_code. Populated on the same paths and cleared alongside it. Omitted when there is none.
The rail that last wrote this connection's records. Omitted when no rail wrote them (a manual setup, or a connection from before this was recorded). It decides what removing the domain can do with the records (GET /connections/{id}/removal).
The connected provider account whose credential wrote this connection's records and, when the account's access is continuous, keeps them (repairs and removal). Omitted when none.
Set while the domain is being removed: the records are being taken out and the connection is deleted when that finishes. The domain no longer serves from this moment. Omitted otherwise.
The end user's email address, when one was given and the feature is on. Present only on the response of the call that created the connection with it, and on GET /connections/{id} with an API key. Never in a list, a webhook, or any read by a widget token.
Present (true) on a create response only when the widget should offer the end user an optional email field: the feature is on, the caller is a widget token, the domain is not a test domain and the connection has no address yet. The widget then calls PUT /connections/{id}/end-user-email. Omitted otherwise.
Example response
{
"records": [
{
"type": "CNAME"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.