createOrganization()
Creates an Organization.
function createOrganization(params: CreateParams): Promise<Organization>- Name
createdBy?- Type
string- Description
The ID of the user creating the Organization. The user will become an admin for the Organization.
- Name
maxAllowedMemberships?- Type
number- Description
The maximum number of memberships allowed in the Organization.
0means unlimited.
- Name
name- Type
string- Description
The name of the Organization.
- Name
privateMetadata?- Type
- OrganizationPrivateMetadata
- Description
Metadata that can be read and set only from the Backend API.
- Name
publicMetadata?- Type
- OrganizationPublicMetadata
- Description
Metadata that can be read from the Frontend API and Backend API, but can be set only from the Backend API.
- Name
slug?- Type
string- Description
The slug of the Organization.
const name = 'test-org'
const createdBy = 'user_123'
const response = await clerkClient.organizations.createOrganization({ name, createdBy })Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint POST/organizations. See the BAPI reference for more information.
Feedback
Last updated on