- Apex domains (example.com)
- WWW subdomains (www.example.com)
- Custom subdomains (shop.example.com, blog.example.com, etc.)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
org_id | string | Yes | Clerk organization slug (e.g., company-name-123456) |
Example Request
Example Response (WWW Subdomain - Deployed)
Example Response (Custom Subdomain - shop.example.com)
Example Response (Apex Domain - Ready for Part 2)
Example Response (No Proxy)
Response Fields
| Field | Type | Description |
|---|---|---|
has_proxy | boolean | Whether a proxy has been set up |
proxy_status | string | Current status in the flow (see below) |
cloudfront_domain | string | CloudFront distribution domain |
distribution_id | string | AWS CloudFront distribution ID |
certificate_arn | string | AWS ACM certificate ARN (set after Part 1 completes) |
origin_cname | string | Original origin (CNAME or A record IP) |
original_www_cname | string | Original CNAME before proxy (for subdomain disconnect) |
custom_domain | string | Customerβs domain (e.g., www.example.com, shop.example.com, example.com) |
domain_type | string | "subdomain" or "apex" |
naked_domain | string | Naked domain (e.g., example.com) |
subdomain_label | string | DNS record host: "www", "shop", "@" for apex |
original_apex_a_records | string[] | Original A records for apex (for apex disconnect) |
apex_gateway_ips | string[] | Gateway IPs for apex domains (used in Part 2 A records) |
Proxy Status Flow
| Status | Description | UI State |
|---|---|---|
PENDING_VALIDATION | CloudFront created, ready for Part 1 | Show βStart SSL Validationβ button |
SSL_VALIDATED | SSL attached to CloudFront, ready for Part 2 | Show βConnect Domainβ button |
DEPLOYED | Part 2 done, domain connected | Show success state |
Two-Part Flow (Works for All Domain Types)
Part 1: Domain Verification (no downtime)- Frontend calls
/start-certificateto get TXT record - User adds TXT record via Entri
- Frontend calls
/complete-certificateto validate and issue cert - Letβs Encrypt certificate is attached to CloudFront
- Status becomes
SSL_VALIDATED
- Subdomains (www, shop, blog): User adds
CNAME subdomain_label β cloudfront_domainvia Entri - Apex domains: User adds
A @ β apex_gateway_ipsvia Entri (2 A records)
Domain Type Handling
| Domain Type | Example | Part 2 Record | subdomain_label |
|---|---|---|---|
| Apex | example.com | A @ β Gateway IPs | @ |
| WWW | www.example.com | CNAME www β CloudFront | www |
| Shop | shop.example.com | CNAME shop β CloudFront | shop |
| Blog | blog.example.com | CNAME blog β CloudFront | blog |
| Multi-level | api.v2.example.com | CNAME api.v2 β CloudFront | api.v2 |