Organization methods
These methods on the Clerk
class allow you to create and read information about Organizations.
The following examples assume:
- you have followed the quickstart in order to add Clerk to your JavaScript application
- you have enabled the Organizations feature in your Clerk Dashboard
getOrganization()
Retrieves information for a specific organization.
- Name
organizationId
- Type
string
- Description
The ID of the organization to be found.
getOrganization
example
The following example demonstrates how to retrieve information about the currently active organization.
createOrganization()
Creates an organization programatically.
- Name
name
- Type
string
- Description
The name of the organization to be created.
- Name
slug?
- Type
string
- Description
The optional slug of the organization to be created.
Get a list of all organizations your current user is a part of in the form of an array of OrganizationMembership
s.
Returns
Type | Description |
---|---|
Promise<OrganizationMembership[]> | This method returns a Promise which resolves to the list of OrganizationMembership s for the current user. |
Feedback
Last updated on