Skip to main content

Adds a new domain to the instance. Useful in the case of multi-domain instances, allows adding satellite domains to an instance.

Returns the created Domain object.

function add(params: AddDomainParams): Promise<Domain>
  • Name
    is_satellite
    Type
    boolean
    Description

    Whether the new domain is a satellite domain. Only true is accepted at the moment.

  • Name
    name
    Type
    string
    Description

    The new domain name. For development instances, can contain the port, e.g. myhostname:3000. For production instances, must be a valid FQDN, e.g. mysite.com. Cannot contain protocol scheme.

  • Name
    proxy_url?
    Type
    string | null
    Description

    The proxy URL for the domain. Applicable only to production instances.

Note

Using clerkClient varies based on the SDK you're using. Refer to the overview for usage details, including guidance on how to access the userId and other properties.

const response = await clerkClient.domains.add({
  is_satellite: true,
  name: 'example.com',
})

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint POST/domains. See the BAPI reference for more information.

Feedback

What did you think of this content?

Last updated on