Use this endpoint to get a list of all domains for an instance. The response will contain the primary domain for the instance and any satellite domains. Each domain in the response contains information about the URLs where Clerk operates and the required CNAME targets.
A list of domains
{- "data": [
- {
- "object": "domain",
- "id": "string",
- "name": "string",
- "is_satellite": true,
- "frontend_api_url": "string",
- "accounts_portal_url": "string",
- "proxy_url": "string",
- "development_origin": "string",
- "cname_targets": [
- {
- "host": "string",
- "value": "string",
- "required": true
}
]
}
], - "total_count": 0
}
Add a new domain for your instance.
Useful in the case of multi-domain instances, allows adding satellite domains to an instance.
The new domain must have a name
. The domain name can contain the port for development instances, like localhost:3000
.
At the moment, instances can have only one primary domain, so the is_satellite
parameter must be set to true
.
If you're planning to configure the new satellite domain to run behind a proxy, pass the proxy_url
parameter accordingly.
A domain
Request was not successful
Request was not successful
Invalid request parameters
{- "name": "string",
- "is_satellite": true,
- "proxy_url": "string"
}
{- "object": "domain",
- "id": "string",
- "name": "string",
- "is_satellite": true,
- "frontend_api_url": "string",
- "accounts_portal_url": "string",
- "proxy_url": "string",
- "development_origin": "string",
- "cname_targets": [
- {
- "host": "string",
- "value": "string",
- "required": true
}
]
}
Deletes a satellite domain for the instance. It is currently not possible to delete the instance's primary domain.
Deleted Object
Request was not successful
Resource not found
{- "object": "string",
- "id": "string",
- "slug": "string",
- "deleted": true
}
The proxy_url
can be updated only for production instances.
Update one of the instance's domains. Both primary and satellite domains can be updated.
If you choose to use Clerk via proxy, use this endpoint to specify the proxy_url
.
Whenever you decide you'd rather switch to DNS setup for Clerk, simply set proxy_url
to null
for the domain. When you update a production instance's primary domain name,
you have to make sure that you've completed all the necessary setup steps for DNS and
emails to work. Expect downtime otherwise. Updating a primary domain's name will also
update the instance's home origin, affecting the default application paths.
A domain
Request was not successful
Resource not found
Invalid request parameters
{- "name": "string",
- "proxy_url": "string",
- "is_secondary": true
}
{- "object": "domain",
- "id": "string",
- "name": "string",
- "is_satellite": true,
- "frontend_api_url": "string",
- "accounts_portal_url": "string",
- "proxy_url": "string",
- "development_origin": "string",
- "cname_targets": [
- {
- "host": "string",
- "value": "string",
- "required": true
}
]
}