Docs

You are viewing an archived version of the docs.Go to latest version

createOrganization()

Creates an organization.

const name = 'my-organization-name';

const createdBy = 'my-user-id';

const organization = await clerkClient.organizations.createOrganization({name, createdBy});
  • Name
    name
    Type
    string
    Description

    Name of the organization.

  • Name
    slug?
    Type
    string
    Description

    Slug of the organization.

  • Name
    createdBy
    Type
    string
    Description

    The user ID for the user creating the organization. The user will become an administrator for the organization.

  • Name
    publicMetadata?
    Type
    Record<string, unknown>
    Description

    Metadata saved on the organization, that is visible to both your Frontend and Backend APIs.

  • Name
    privateMetadata?
    Type
    Record<string, unknown>
    Description

    Metadata saved on the organization that is only visible to your Backend API.

Feedback

What did you think of this content?

Last updated on