Custom Domain docs

Reference

Enums, environment variables, error codes, and other lookup tables.

Enums

ConnectionStatuspending, propagating, live, failed.

SetupTypeautomatic, manual, async, mcp.

Roleowner, admin, member, viewer.

PlanIdfree, startup, growth, premium, enterprise.

Environmentproduction, staging, development.

DNS record typesA, AAAA, CNAME, CAA, MX, NS, TXT, plus the meta-types SPFM (SPF-merge) and REDIR301.

One-click setup template shapes (the provider-hosted one-click protocol; customdomain.ai catalog shipped in prod) — web: apex-a, apex-aaaa, apex-cname, apex-www, subdomain, www, wildcard; ownership: verify, connect-verified (apex A + ownership TXT applied together); caa; email: email-spf, email-dkim, email-dmarc, email-mx, email-full; and redirect (301 forward).

Webhook events (the complete set — see webhooks) — connection.created, connection.applied, connection.live, connection.failed, connection.records.updated, connection.reapply.failed, connection.records_outdated, connection.disconnected, domain.record_missing, domain.record_restored, domain.purchased, purchase.error, purchase.confirmation.expired, secure_status, power_status.

Error envelope & codes

Every error is { "code", "title", "details"? }. code is a stable machine string. This table and the "Error envelope" section on the API reference index page are maintained separately; keep both in sync when a code changes.

codeHTTPMeaning
invalid_request400Malformed or missing input.
unauthorized401Missing/invalid credential.
not_found404Object doesn't exist or isn't in your tenant.
quota_exceeded402The plan's monthly quota is used up. Only free is hard-capped, and only where BILLING_ENFORCE_QUOTA is on (the hosted service currently runs meter-only, so nothing is refused today) — no paid tier is ever refused. See Plans & quotas.
InvalidNameservers422The domain has no usable nameserver delegation.
ProviderAuthenticationError422The end-user's DNS provider rejected the authorization/credential.
apex_not_supported422The provider has no ALIAS/ANAME/flattened-CNAME apex capability — see Apex domains.
service_unavailable503An optional engine (Sell, templates, billing, webhooks, Power, Secure) isn't configured.
internal_error500Server error (generic title + a logged request id).

Environment variables

Control-plane variables read CUSTOMDOMAIN_* first and fall back to the legacy JUSTEASY_* prefix. Variables that matter for API consumers are called out on the page that uses them.

Webhook signature

  • Headers: X-JE-Timestamp: <unix seconds> and X-JE-Signature: sha256=<hex>.
  • Algorithm: HMAC-SHA256 over ${timestamp}.${rawBody} (the timestamp, a dot, then the exact request body), keyed by the endpoint's signing secret (whsec_…). Reject deliveries whose timestamp is outside a ~5-minute window. See Verifying signatures.

Default edge record

A connection with no applied records yet points at the edge with a synthesized CNAME <host> → edge.customdomain.ai (TTL 3600), overridable with CUSTOMDOMAIN_EDGE_CNAME_TARGET (the legacy JUSTEASY_EDGE_CNAME_TARGET still works).

Resources

  • Architecture — the two-plane design, data model, and request flows.
  • openapi-v1.yaml — the OpenAPI document the API reference is generated from; also served live at GET /v1/openapi.json.

On this page