/v1/apps/{app_id}/custom-domains/{domain_id}AuthGet a custom domain and the last check of its records.
Reads stored state only; `POST …/check` runs a new DNS check.
Path parameters
app_id*stringId of the app.
domain_id*string · uuidId of the domain.
Response · 200
id*string · uuidUnique identifier of the custom domain.
Example: "1d2c3b4a-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
app_id*string · uuidThe Auth app the custom domain belongs to.
Example: "0b6f3c7e-6a43-4c55-9d4b-2a9a7f5b1c11"
hostname*string · hostnameThe custom auth hostname, e.g. `auth.acme.com`.
Example: "auth.acme.com"
status*object`pending`: waiting for both records. `active`: both records are published; the host serves this app's sign-in routes. `failing`: was active, and a later check no longer finds the records. Checked every 5 minutes while pending (for 7 days) and hourly after that; `POST …/check` checks now.
Example: "pending"
serving*booleanTrue when the host serves this app right now: the domain is `active` and custom domains are switched on for the workspace.
Example: false
edge_target*string · hostnameWhere the CNAME must point.
Example: "edge.auth.productcraft.co"
dns_zone*string · hostnameThe DNS zone holding the host, when it could be found.
Example: "acme.com"
dns_provider*objectWho hosts the zone, from its nameservers.
apply_providers*arrayProviders `POST …/apply` can set the records up with for this zone. Empty when the zone is at a provider we cannot write to: publish the records by hand or download them with `…/export`.
Example: ["cloudflare"]
records*arrayThe two records to publish, routing first.
callback_urls*objectOnce active: the OAuth redirect URLs on this host. A sign-in started on the custom host returns to it, so add these to each provider's app next to the existing ones. Null while not active.
verified_at*string · date-timeWhen the domain last became active.
failing_since*string · date-timeWhen the domain started failing its checks (ISO 8601), or `null` while healthy.
last_checked_at*string · date-timeWhen the DNS records were last checked (ISO 8601), or `null`.
created_at*string · date-timeWhen the custom domain was created (ISO 8601).
Example
Request
GET https://api.auth.productcraft.co/v1/apps/{app_id}/custom-domains/{domain_id}
Authorization: Bearer YOUR_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const customDomain = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").customDomains.retrieve("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");auth.admin.app(…).customDomains.retrieve(domainId, options?): Auth.CustomDomain
Response
{
"id": "1d2c3b4a-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"app_id": "0b6f3c7e-6a43-4c55-9d4b-2a9a7f5b1c11",
"hostname": "auth.acme.com",
"status": "pending",
"serving": false,
"edge_target": "edge.auth.productcraft.co",
"dns_zone": "acme.com",
"dns_provider": {},
"apply_providers": [
"cloudflare"
],
"records": [
{
"purpose": "routing",
"type": "CNAME",
"host": "auth.acme.com",
"name": "auth",
"value": "edge.auth.productcraft.co",
"ttl": 3600,
"state": "verified",
"observed": [
"edge.auth.productcraft.co"
],
"conflicts": [
{
"code": "cname_foreign",
"severity": "blocking",
"message": "auth.acme.com already points at acme.netlify.app. Change that CNAME to edge.auth.productcraft.co, or use another name.",
"suggested_value": "edge.auth.productcraft.co"
}
],
"last_checked_at": "2026-01-01T00:00:00.000Z",
"verified_at": "2026-01-01T00:00:00.000Z"
}
],
"callback_urls": {},
"verified_at": "2026-01-01T00:00:00.000Z",
"failing_since": "2026-01-01T00:00:00.000Z",
"last_checked_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z"
}