Skip to Content
Clerk logo

Clerk Docs

Ctrl + K
Go to clerkstage.dev

Organization Domains

These are all methods on the Organization class that allow you to manage the domains of an organization.

getDomains()

Retrieves a list of domains for the currently active organization.

function getDomains(params?: GetDomainsParams): Promise<PaginatedResources<OrganizationDomain>>;

GetDomainsParams

NameTypeDescription
initialPage?numberA number that can be used to skip the first n-1 pages. For example, if initialPage is set to 10, it is will skip the first 9 pages and will fetch the 10th page.
pageSize?numberA number that indicates the maximum number of results that should be returned for a specific page.
enrollmentMode?'manual_invitation' | 'automatic_invitation' | 'automatic_suggestion'An enrollment mode will change how new users join an organization.

Returns

TypeDescription
Promise<PaginatedResponse<OrganizationDomain>>This method returns a Promise which resolves with a list of OrganizationDomain objects.

getDomain()

Retrieves a domain for an organization based on the given domain ID.

function getDomain(params: GetDomainParams): Promise<OrganizationDomain>;

GetDomainParams

NameTypeDescription
domainIdstringThe ID of the domain that will be fetched.

Returns

TypeDescription
Promise<OrganizationDomain>This method returns a Promise which resolves to the OrganizationDomain for the corresponding ID.

What did you think of this content?

Clerk © 2023