This guide is for users who want to build a custom user interface using the Clerk API. To use a prebuilt UI, use the Account Portal pages or prebuilt components.
Organizations are a powerful feature in Clerk that allow you to group users together and manage their permissions. Organizations can be created and managed using the Clerk Dashboard, but you can also allow users within your application to create organizations.
This guide will demonstrate how to use the Clerk API to build a custom flow for creating organizations.
Next.js
JavaScript
The following example uses the useOrganizationList() hook to get the createOrganization() method. This method is used to create a new organization with the provided name.
This example is written for Next.js App Router but can be adapted for any React meta framework, such as Remix.
The following example uses the clerk.createOrganization() method to create a new organization with the provided name.
Use the tabs to view the code necessary for the index.html and main.js files.