Organization members
@@ -216,9 +196,7 @@ You can implement this pattern to any Clerk function that returns a [`ClerkPagin
let currentPage = 1
async function fetchMemberships() {
- if (!$organization) {
- return
- }
+ if (!$organization) return
const { data } = await $organization.getMemberships({
initialPage: currentPage,
@@ -234,9 +212,9 @@ You can implement this pattern to any Clerk function that returns a [`ClerkPagin
{#if organization === undefined}
-
+
{:else if organization === null}
-
+
{:else}
Organization members
diff --git a/docs/reference/astro/overview.mdx b/docs/reference/astro/overview.mdx
index 07507d4b43..f9d64aa077 100644
--- a/docs/reference/astro/overview.mdx
+++ b/docs/reference/astro/overview.mdx
@@ -44,9 +44,9 @@ The `clerkMiddleware()` helper integrates Clerk authentication and authorization
### `clerkClient()`
-[Clerk's JS Backend SDK](/docs/js-backend/getting-started/quickstart) provides access to Backend API resources and low-level authentication utilities for JavaScript environments. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JS Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint.
+[Clerk's JS Backend SDK](/docs/js-backend/getting-started/quickstart) is a wrapper around the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} that makes it easier to interact with the API. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JS Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint.
-All resource operations are mounted as sub-APIs on the `clerkClient` object. See the [reference documentation](/docs/js-backend/getting-started/quickstart#usage){{ target: '_blank' }} for more information.
+To access a resource, you must first instantiate a `clerkClient` instance. See the [reference documentation](/docs/js-backend/getting-started/quickstart) for more information.
### Example: Use `clerkClient` to get a user's information
diff --git a/docs/reference/backend/organization/create-organization-invitation-bulk.mdx b/docs/reference/backend/organization/create-organization-invitation-bulk.mdx
index 53910a1082..200b5bdb2b 100644
--- a/docs/reference/backend/organization/create-organization-invitation-bulk.mdx
+++ b/docs/reference/backend/organization/create-organization-invitation-bulk.mdx
@@ -53,7 +53,7 @@ function createOrganizationInvitationBulk(
- `role`
- [`OrganizationCustomRoleKey`](/docs/reference/javascript/types/organization-custom-role-key)
- The [Role](/docs/guides/organizations/roles-and-permissions) to assign the invited user within the Organization.
+ The [Role](/docs/guides/organizations/control-access/roles-and-permissions) to assign the invited user within the Organization.
---
diff --git a/docs/reference/backend/organization/create-organization-invitation.mdx b/docs/reference/backend/organization/create-organization-invitation.mdx
index 0bd7a84d40..b316375670 100644
--- a/docs/reference/backend/organization/create-organization-invitation.mdx
+++ b/docs/reference/backend/organization/create-organization-invitation.mdx
@@ -41,7 +41,7 @@ function createOrganizationInvitation(
- `role`
- `string`
- The [Role](/docs/guides/organizations/roles-and-permissions) to assign the invited user within the Organization.
+ The [Role](/docs/guides/organizations/control-access/roles-and-permissions) to assign the invited user within the Organization.
---
diff --git a/docs/reference/backend/organization/create-organization-membership.mdx b/docs/reference/backend/organization/create-organization-membership.mdx
index fa09c0a151..c6f9a9bb72 100644
--- a/docs/reference/backend/organization/create-organization-membership.mdx
+++ b/docs/reference/backend/organization/create-organization-membership.mdx
@@ -34,7 +34,7 @@ function createOrganizationMembership(
- `role`
- `string`
- The [Role](/docs/guides/organizations/roles-and-permissions) to assign the added user within the Organization.
+ The [Role](/docs/guides/organizations/control-access/roles-and-permissions) to assign the added user within the Organization.
## Example
diff --git a/docs/reference/backend/organization/get-organization.mdx b/docs/reference/backend/organization/get-organization.mdx
index 45a225f216..54d1cb64a3 100644
--- a/docs/reference/backend/organization/get-organization.mdx
+++ b/docs/reference/backend/organization/get-organization.mdx
@@ -21,7 +21,7 @@ function getOrganization(params: GetOrganizationParams): Promise
The ID of the Organization to retrieve, or the slug of the Organization to retrieve.
-## Examples
+## Usage
@@ -43,6 +43,230 @@ const slug = 'my-organization-slug'
const response = await clerkClient.organizations.getOrganization({ slug })
```
+## Example
+
+To use the `getOrganization()` method, you first need to initialize the [`clerkClient()`](/docs/js-backend/getting-started/quickstart) helper. Then, you need to get the [Active Organization's](!active-organization) ID which you can access from the [`Auth`](/docs/reference/backend/types/auth-object) object. Finally, you can pass the Organization ID to the `getOrganization()` method to get the [`Organization`](/docs/reference/backend/types/backend-organization) object.
+
+**If your SDK isn't listed, use the comments in the example to help you adapt it to your SDK.**
+
+
+
+ ```tsx {{ filename: 'app/page.tsx' }}
+ import { useOrganization, useOrganizationList } from '@clerk/nextjs'
+ import { auth, clerkClient } from '@clerk/nextjs/server'
+
+ export default async function Home() {
+ // Accessing the `Auth` object differs depending on the SDK you're using
+ // https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object
+ const { isAuthenticated, orgId, orgRole } = await auth()
+
+ // Check if user is authenticated
+ if (!isAuthenticated) return You must be signed in to access this page.
+
+ // Check if there is an Active Organization
+ if (!orgId) return Set an Active Organization to access this page.
+
+ // Initialize the JS Backend SDK
+ // This varies depending on the SDK you're using
+ // https://clerk.com/docs/js-backend/getting-started/quickstart
+ const client = await clerkClient()
+
+ // Use the `getOrganization()` method to get the Backend `Organization` object
+ const organization = await client.organizations.getOrganization({ organizationId: orgId })
+
+ return (
+
+
Welcome to the {organization.name} organization
+
Your role in this organization: {orgRole}
+
+ )
+ }
+ ```
+
+
+
+ ```astro {{ filename: 'src/pages/index.astro' }}
+ ---
+ import Layout from '../layouts/Layout.astro'
+ import { SignedIn, SignedOut } from '@clerk/astro/components'
+ import { clerkClient } from '@clerk/astro/server'
+
+ const { isAuthenticated, orgId, orgRole } = Astro.locals.auth()
+
+ let organization = null
+ if (isAuthenticated && orgId) {
+ organization = await clerkClient(Astro).organizations.getOrganization({ organizationId: orgId })
+ }
+ ---
+
+
+
+ Sign in to try Clerk out!
+
+
+ {
+ organization && (
+
+
+ Welcome to the {organization.name} organization
+
+
+ Your role in this organization: {orgRole}
+
+
+ )
+ }
+
+
+ ```
+
+
+
+ ```js {{ filename: 'index.js' }}
+ import { createClerkClient, getAuth } from '@clerk/express'
+ import express from 'express'
+
+ const app = express()
+ // Initialize the JS Backend SDK
+ // This varies depending on the SDK you're using
+ // https://clerk.com/docs/js-backend/getting-started/quickstart
+ const clerkClient = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY })
+
+ app.get('/user', async (req, res) => {
+ // Accessing the `Auth` object differs depending on the SDK you're using
+ // https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object
+ const { isAuthenticated, orgId } = getAuth(req)
+
+ // Protect the route from unauthenticated users
+ if (!isAuthenticated) {
+ res.status(401).json({ error: 'User not authenticated' })
+ }
+
+ // Check if there is an Active Organization
+ if (!orgId) {
+ res.status(404).json({ error: 'Set an Active Organization to access this page.' })
+ }
+
+ // Use the `getOrganization()` method to get the Backend `Organization` object
+ const organization = await clerkClient.organizations.getOrganization({ organizationId: orgId })
+
+ // Return the `Organization` object
+ res.json(organization)
+ })
+ ```
+
+
+
+ ```js
+ import { createClerkClient } from '@clerk/backend'
+
+ // Initialize the JS Backend SDK
+ // This varies depending on the SDK you're using
+ // https://clerk.com/docs/js-backend/getting-started/quickstart
+ const clerkClient = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY })
+
+ async function getOrganization(request) {
+ // Accessing the `Auth` object differs depending on the SDK you're using
+ // https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object
+ const { isAuthenticated, orgId } = getAuth(req)
+
+ // Protect the route from unauthenticated users
+ if (!isAuthenticated) return null
+
+ // Check if there is an Active Organization
+ if (!orgId) return null
+
+ // Use the `getOrganization()` method to get the Backend `Organization` object
+ const organization = await clerkClient.organizations.getOrganization({ organizationId: orgId })
+
+ // Return the `Organization` object
+ return organization
+ }
+ ```
+
+
+
+ ```tsx {{ filename: 'app/routes/organization.tsx' }}
+ import { getAuth } from '@clerk/react-router/ssr.server'
+ import { createClerkClient } from '@clerk/react-router/api.server'
+ import type { Route } from './+types/notion'
+
+ // Initialize the JS Backend SDK
+ // This varies depending on the SDK you're using
+ // https://clerk.com/docs/js-backend/getting-started/quickstart
+ const clerkClient = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY })
+
+ export async function loader(args: Route.LoaderArgs) {
+ // Accessing the `Auth` object differs depending on the SDK you're using
+ // https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object
+ const { isAuthenticated, orgId } = await getAuth(args)
+
+ // Protect the route from unauthenticated users
+ if (!isAuthenticated) {
+ return new Response('User not authenticated', {
+ status: 401,
+ })
+ }
+
+ // Check if there is an Active Organization
+ if (!orgId) {
+ return new Response('Set an Active Organization to access this page.', {
+ status: 404,
+ })
+ }
+
+ // Use the `getOrganization()` method to get the Backend `Organization` object
+ const organization = await clerkClient.organizations.getOrganization({ organizationId: orgId })
+
+ // Return the `Organization` object
+ return json({ organization })
+ }
+ ```
+
+
+
+ ```tsx {{ filename: 'app/routes/api/organization.tsx' }}
+ import { json } from '@tanstack/react-start'
+ import { createFileRoute } from '@tanstack/react-router'
+ import { auth, clerkClient } from '@clerk/tanstack-react-start/server'
+
+ export const ServerRoute = createFileRoute('/api/organization')({
+ server: {
+ handlers: {
+ GET: async () => {
+ // Accessing the `Auth` object differs depending on the SDK you're using
+ // https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object
+ const { isAuthenticated, orgId } = await auth()
+
+ // Protect the route from unauthenticated users
+ if (!isAuthenticated) {
+ return new Response('User not authenticated', {
+ status: 401,
+ })
+ }
+
+ // Check if there is an Active Organization
+ if (!orgId) {
+ return new Response('Set an Active Organization to access this page.', {
+ status: 404,
+ })
+ }
+
+ // Use the `getOrganization()` method to get the Backend `Organization` object
+ const organization = await clerkClient.organizations.getOrganization({
+ organizationId: orgId,
+ })
+
+ // Return the `Organization` object
+ return json(organization)
+ },
+ },
+ },
+ })
+ ```
+
+
+
## Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint `GET/organizations/{organization_id}`. See the [BAPI reference](/docs/reference/backend-api/tag/organizations/get/organizations/\{organization_id}){{ target: '_blank' }} for more information.
diff --git a/docs/reference/backend/organization/update-organization-membership.mdx b/docs/reference/backend/organization/update-organization-membership.mdx
index 98b00e7dd9..e6274ef3d4 100644
--- a/docs/reference/backend/organization/update-organization-membership.mdx
+++ b/docs/reference/backend/organization/update-organization-membership.mdx
@@ -34,7 +34,7 @@ function updateOrganizationMembership(
- `role`
- `string`
- The [Role](/docs/guides/organizations/roles-and-permissions) to assign the user.
+ The [Role](/docs/guides/organizations/control-access/roles-and-permissions) to assign the user.
## Example
diff --git a/docs/reference/backend/types/auth-object.mdx b/docs/reference/backend/types/auth-object.mdx
index fad74b24ee..a27eb5129e 100644
--- a/docs/reference/backend/types/auth-object.mdx
+++ b/docs/reference/backend/types/auth-object.mdx
@@ -135,14 +135,14 @@ function has(isAuthorizedParams: CheckAuthorizationParamsWithCustomPermissions):
- `role`
- `string`
- The [Role](/docs/guides/organizations/roles-and-permissions) to check for.
+ The [Role](/docs/guides/organizations/control-access/roles-and-permissions) to check for.
---
- `permission`
- `string`
- The [Permission](/docs/guides/organizations/roles-and-permissions) to check for.
+ The [Permission](/docs/guides/organizations/control-access/roles-and-permissions) to check for.
---
diff --git a/docs/reference/components/control/protect.mdx b/docs/reference/components/control/protect.mdx
index 1709e6736d..f56e330bb8 100644
--- a/docs/reference/components/control/protect.mdx
+++ b/docs/reference/components/control/protect.mdx
@@ -1130,14 +1130,14 @@ The following example uses ``'s `condition` prop to conditionally rende
- `permission?`
- `string`
- Optional string corresponding to a [Permission](/docs/guides/organizations/roles-and-permissions) in the format `org::`
+ Optional string corresponding to a [Permission](/docs/guides/organizations/control-access/roles-and-permissions) in the format `org::`
---
- `role?`
- `string`
- Optional string corresponding to a [Role](/docs/guides/organizations/roles-and-permissions) in the format `org:`
+ Optional string corresponding to a [Role](/docs/guides/organizations/control-access/roles-and-permissions) in the format `org:`
---
diff --git a/docs/reference/components/organization/organization-list.mdx b/docs/reference/components/organization/organization-list.mdx
index cf171d7db8..0418707f54 100644
--- a/docs/reference/components/organization/organization-list.mdx
+++ b/docs/reference/components/organization/organization-list.mdx
@@ -6,7 +6,7 @@ sdk: astro, chrome-extension, expo, nextjs, nuxt, react, react-router, remix, ta
{{ style: { maxWidth: '460px' } }}
-The `` component displays Organization-related memberships and automatic [invitations](/docs/guides/organizations/verified-domains#automatic-invitations) and [suggestions](/docs/guides/organizations/verified-domains#automatic-suggestions) for the user.
+The `` component displays Organization-related memberships and automatic [invitations](/docs/guides/organizations/add-members/verified-domains#automatic-invitations) and [suggestions](/docs/guides/organizations/add-members/verified-domains#automatic-suggestions) for the user.
` component accepts the following properties, all of wh
- `afterSelectPersonalUrl`
- ((org: [Organization][org-ref]) => string) | string
- The full URL or path to navigate to after selecting the [Personal Account](/docs/guides/organizations/overview#allow-personal-accounts). Defaults to `undefined`.
+ The full URL or path to navigate to after selecting the [Personal Account](/docs/guides/organizations/configure#allow-personal-accounts). Defaults to `undefined`.
---
@@ -308,7 +308,7 @@ The `` component accepts the following properties, all of wh
- `hidePersonal`
- `boolean`
- A boolean that controls whether `` will include the user's [Personal Account](/docs/guides/organizations/overview#allow-personal-accounts) in the Organization list. Setting this to `true` will hide the Personal Account option, and users will only be able to switch between Organizations. Defaults to `false`.
+ A boolean that controls whether `` will include the user's [Personal Account](/docs/guides/organizations/configure#allow-personal-accounts) in the Organization list. Setting this to `true` will hide the Personal Account option, and users will only be able to switch between Organizations. Defaults to `false`.
---
diff --git a/docs/reference/components/organization/organization-profile.mdx b/docs/reference/components/organization/organization-profile.mdx
index ebf5497458..06388ab4c9 100644
--- a/docs/reference/components/organization/organization-profile.mdx
+++ b/docs/reference/components/organization/organization-profile.mdx
@@ -10,7 +10,7 @@ The `` component allows users to manage their Organizatio
This component's **General** tab displays the Organization's information and the **Leave organization** button. Admins will be able to see the **Update profile** button, **Verified domains** section, and **Delete organization** button.
-The **Members** tab shows the Organization's members along with their join dates and Roles. Admins will have the ability to invite a member, change a member's Role, or remove them from the Organization. Admins will have tabs within the **Members** tab to view the Organization's [invitations](/docs/guides/organizations/overview#organization-invitations) and [requests](/docs/guides/organizations/verified-domains#membership-requests).
+The **Members** tab shows the Organization's members along with their join dates and Roles. Admins will have the ability to invite a member, change a member's Role, or remove them from the Organization. Admins will have tabs within the **Members** tab to view the Organization's [invitations](/docs/guides/organizations/add-members/invitations) and [requests](/docs/guides/organizations/add-members/verified-domains#membership-requests).
The **Billing** tab displays the Plans and Features that are available to the Organization, as well as the user's billing information, such as their invoices and payment methods.
diff --git a/docs/reference/components/organization/organization-switcher.mdx b/docs/reference/components/organization/organization-switcher.mdx
index 7e38066a68..c3a6b69f4a 100644
--- a/docs/reference/components/organization/organization-switcher.mdx
+++ b/docs/reference/components/organization/organization-switcher.mdx
@@ -6,7 +6,7 @@ sdk: astro, chrome-extension, expo, nextjs, nuxt, react, react-router, remix, ta
{{ style: { maxWidth: '436px' } }}
-The `` component allows a user to switch between their joined Organizations. If [Personal Accounts are enabled](/docs/guides/organizations/overview#allow-personal-accounts), users can also switch to their Personal Account. This component is useful for applications that have a multi-tenant architecture, where users can be part of multiple Organizations. It handles all Organization-related flows, including full Organization management for admins. Learn more about [Organizations](/docs/guides/organizations/overview).
+The `` component allows a user to switch between their joined Organizations. If [Personal Accounts are enabled](/docs/guides/organizations/configure#allow-personal-accounts), users can also switch to their Personal Account. This component is useful for applications that have a multi-tenant architecture, where users can be part of multiple Organizations. It handles all Organization-related flows, including full Organization management for admins. Learn more about [Organizations](/docs/guides/organizations/overview).
` component accepts the following properties, all o
- `hidePersonal`
- `boolean`
- A boolean that controls whether `` will include the user's [Personal Account](/docs/guides/organizations/overview#allow-personal-accounts) in the Organization list. Setting this to `true` will hide the Personal Account option, and users will only be able to switch between Organizations. Defaults to `false`.
+ A boolean that controls whether `` will include the user's [Personal Account](/docs/guides/organizations/configure#allow-personal-accounts) in the Organization list. Setting this to `true` will hide the Personal Account option, and users will only be able to switch between Organizations. Defaults to `false`.
---
diff --git a/docs/reference/express/overview.mdx b/docs/reference/express/overview.mdx
index 17cfc37062..78935edd8d 100644
--- a/docs/reference/express/overview.mdx
+++ b/docs/reference/express/overview.mdx
@@ -23,9 +23,9 @@ The `getAuth()` helper retrieves authentication state from the `request` object.
## `clerkClient`
-[Clerk's JS Backend SDK](/docs/js-backend/getting-started/quickstart) provides access to Backend API resources and low-level authentication utilities for JavaScript environments. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JS Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint.
+[Clerk's JS Backend SDK](/docs/js-backend/getting-started/quickstart) is a wrapper around the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} that makes it easier to interact with the API. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JS Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint.
-All resource operations are mounted as sub-APIs on the `clerkClient` object. See the [reference documentation](/docs/js-backend/getting-started/quickstart#usage){{ target: '_blank' }} for more information.
+To access a resource, you must first instantiate a `clerkClient` instance. See the [reference documentation](/docs/js-backend/getting-started/quickstart) for more information.
### Example: Use `clerkClient` to get a user's information
diff --git a/docs/reference/javascript/organization.mdx b/docs/reference/javascript/organization.mdx
index 877651f3a7..da05b65802 100644
--- a/docs/reference/javascript/organization.mdx
+++ b/docs/reference/javascript/organization.mdx
@@ -6,7 +6,7 @@ sdk: js-frontend
The `Organization` object holds information about an Organization, as well as methods for managing it.
-To use these methods, you must have the **Organizations** feature [enabled in your app's settings in the Clerk Dashboard](/docs/guides/organizations/overview#enable-organizations-in-your-application).
+To use these methods, you must have the **Organizations** feature [enabled in your app's settings in the Clerk Dashboard](/docs/guides/organizations/configure#enable-organizations).
## Properties
@@ -227,7 +227,7 @@ function getDomains(params?: GetDomainsParams): Promise
#### Example
@@ -317,7 +317,7 @@ For an example on how to use `getMemberships()`, see the [custom flow on managin
Retrieve the list of membership requests for the currently [Active Organization](!active-organization). Returns a [`ClerkPaginatedResponse`][pag-ref] of [`OrganizationMembershipRequest`][org-mem-ref]-request) objects.
> [!WARNING]
-> You must have [**Organizations**](/docs/guides/organizations/overview#enable-organizations-in-your-application), and [**Verified domains** and **Automatic suggestion**][verified-domains-ref] enabled in your app's settings in the Clerk Dashboard.
+> You must have [**Organizations**](/docs/guides/organizations/configure#enable-organizations), and [**Verified domains** and **Automatic suggestion**][verified-domains-ref] enabled in your app's settings in the Clerk Dashboard.
```ts
function getMembershipRequests(
@@ -578,8 +578,8 @@ await organization.updateMember({ userId: 'user_123', role: 'org:admin' })
[org-mem-ref]: /docs/reference/javascript/types/organization-membership
-[roles-perms-ref]: /docs/guides/organizations/roles-and-permissions
+[roles-perms-ref]: /docs/guides/organizations/control-access/roles-and-permissions
[pag-ref]: /docs/reference/javascript/types/clerk-paginated-response
-[verified-domains-ref]: /docs/guides/organizations/verified-domains
+[verified-domains-ref]: /docs/guides/organizations/add-members/verified-domains
diff --git a/docs/reference/javascript/session.mdx b/docs/reference/javascript/session.mdx
index dcf525ff37..b33bf487ed 100644
--- a/docs/reference/javascript/session.mdx
+++ b/docs/reference/javascript/session.mdx
@@ -224,11 +224,11 @@ type WithReverification = T & {
type CheckAuthorizationParams = WithReverification<
| {
/**
- * The [Role](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for.
+ * The [Role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for.
*/
role: OrganizationCustomRoleKey
/**
- * The [Permission](https://clerk.com/docs/guides/organizations/roles-and-permissions) to check for.
+ * The [Permission](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for.
*/
permission?: never
/**
@@ -266,14 +266,14 @@ type CheckAuthorizationParams = WithReverification<
- `role`
- `string`
- Accepts [Role](/docs/guides/organizations/roles-and-permissions#roles) key.
+ Accepts [Role](/docs/guides/organizations/control-access/roles-and-permissions#roles) key.
---
- `permission`
- `string`
- Accepts [Permission](/docs/guides/organizations/roles-and-permissions#permissions) key.
+ Accepts [Permission](/docs/guides/organizations/control-access/roles-and-permissions#permissions) key.
---
diff --git a/docs/reference/javascript/types/organization-custom-permission-key.mdx b/docs/reference/javascript/types/organization-custom-permission-key.mdx
index f78dd81366..cb3bd4146c 100644
--- a/docs/reference/javascript/types/organization-custom-permission-key.mdx
+++ b/docs/reference/javascript/types/organization-custom-permission-key.mdx
@@ -6,4 +6,4 @@ sdk: js-frontend
`OrganizationCustomPermissionKey` is a type that represents a user's Permission in an organization. It will be string unless the developer has provided their own types through [`ClerkAuthorization`](/docs/guides/development/override-clerk-types-interfaces#example-custom-roles-and-permissions).
-Clerk provides [default System Permissions](/docs/guides/organizations/roles-and-permissions#system-permissions). However, you can create [Custom Permissions](/docs/guides/organizations/roles-and-permissions#custom-permissions) as well.
+Clerk provides [default System Permissions](/docs/guides/organizations/control-access/roles-and-permissions#system-permissions). However, you can create [Custom Permissions](/docs/guides/organizations/control-access/roles-and-permissions#custom-permissions) as well.
diff --git a/docs/reference/javascript/types/organization-domain.mdx b/docs/reference/javascript/types/organization-domain.mdx
index 80b2213b6d..e9a9d0d49b 100644
--- a/docs/reference/javascript/types/organization-domain.mdx
+++ b/docs/reference/javascript/types/organization-domain.mdx
@@ -33,7 +33,7 @@ The `OrganizationDomain` object is the model around an Organization domain.
- `enrollmentMode`
- `'manual_invitation' | 'automatic_invitation' | 'automatic_suggestion'`
- An [enrollment mode](/docs/guides/organizations/verified-domains#enable-verified-domains) will change how new users join an Organization.
+ An [enrollment mode](/docs/guides/organizations/add-members/verified-domains#enable-verified-domains) will change how new users join an Organization.
---
diff --git a/docs/reference/javascript/types/organization-invitation.mdx b/docs/reference/javascript/types/organization-invitation.mdx
index 5bfc4c4359..5a1666592a 100644
--- a/docs/reference/javascript/types/organization-invitation.mdx
+++ b/docs/reference/javascript/types/organization-invitation.mdx
@@ -40,7 +40,7 @@ The `OrganizationInvitation` object is the model around an Organization invitati
- `role`
- [`OrganizationCustomRoleKey`](/docs/reference/javascript/types/organization-custom-role-key)
- The [Role](/docs/guides/organizations/roles-and-permissions) of the current user in the Organization.
+ The [Role](/docs/guides/organizations/control-access/roles-and-permissions) of the current user in the Organization.
---
@@ -81,7 +81,7 @@ The following example demonstrates how to revoke an Organization invitation. It
It assumes:
- you have followed the [quickstart](/docs/js-frontend/getting-started/quickstart) in order to add Clerk to your JavaScript application
-- you have [enabled the Organizations feature in the Clerk Dashboard](/docs/guides/organizations/overview#enable-organizations-in-your-application)
+- you have [enabled the Organizations feature in the Clerk Dashboard](/docs/guides/organizations/configure#enable-organizations)
```js {{ filename: 'main.js', mark: [22, 23] }}
import { Clerk } from '@clerk/clerk-js'
diff --git a/docs/reference/javascript/types/organization-membership.mdx b/docs/reference/javascript/types/organization-membership.mdx
index 4e178a478a..b593bbf195 100644
--- a/docs/reference/javascript/types/organization-membership.mdx
+++ b/docs/reference/javascript/types/organization-membership.mdx
@@ -26,7 +26,7 @@ The `OrganizationMembership` object is the model around an Organization membersh
- `role`
- `string`
- The [Role](/docs/guides/organizations/roles-and-permissions) of the current user in the Organization.
+ The [Role](/docs/guides/organizations/control-access/roles-and-permissions) of the current user in the Organization.
---
@@ -81,5 +81,5 @@ function update(updateParams: UpdateOrganizationMembershipParams): Promise
diff --git a/docs/reference/javascript/types/user-organization-invitation.mdx b/docs/reference/javascript/types/user-organization-invitation.mdx
index 4b788b36e9..0aeaa307de 100644
--- a/docs/reference/javascript/types/user-organization-invitation.mdx
+++ b/docs/reference/javascript/types/user-organization-invitation.mdx
@@ -46,7 +46,7 @@ The `UserOrganizationInvitation` object is the model around a user's invitation
- `role`
- [`OrganizationCustomRoleKey`](/docs/reference/javascript/types/organization-custom-role-key)
- The [Role](/docs/guides/organizations/roles-and-permissions) of the current user in the Organization.
+ The [Role](/docs/guides/organizations/control-access/roles-and-permissions) of the current user in the Organization.
---
diff --git a/docs/reference/nextjs/overview.mdx b/docs/reference/nextjs/overview.mdx
index ff4cf20427..ec5355e101 100644
--- a/docs/reference/nextjs/overview.mdx
+++ b/docs/reference/nextjs/overview.mdx
@@ -36,9 +36,9 @@ Clerk continues to provide drop-in support for the Next.js Pages Router. In addi
## `clerkClient`
-[Clerk's JS Backend SDK](/docs/js-backend/getting-started/quickstart) provides access to Backend API resources and low-level authentication utilities for JavaScript environments. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JS Backend SDK instead of manually making a fetch request to the [https://api.clerk.com/v1/users](https://clerk.com/docs/reference/backend-api/tag/users/get/users) endpoint.
+[Clerk's JS Backend SDK](/docs/js-backend/getting-started/quickstart) is a wrapper around the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} that makes it easier to interact with the API. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JS Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint.
-All resource operations are mounted as sub-APIs on the `clerkClient` object. See the [reference documentation](/docs/js-backend/getting-started/quickstart#usage) for more information.
+To access a resource, you must first instantiate a `clerkClient` instance. See the [reference documentation](/docs/js-backend/getting-started/quickstart) for more information.
## `Auth` object
diff --git a/docs/reference/nuxt/overview.mdx b/docs/reference/nuxt/overview.mdx
index 2749d408ec..ff33995c60 100644
--- a/docs/reference/nuxt/overview.mdx
+++ b/docs/reference/nuxt/overview.mdx
@@ -62,7 +62,11 @@ The `clerkMiddleware()` helper integrates Clerk authentication and authorization
## `clerkClient()`
-The `clerkClient()` helper returns an instance of the [JS Backend SDK](/docs/js-backend/getting-started/quickstart). [Learn more](/docs/nuxt/guides/users/reading).
+[Clerk's JS Backend SDK](/docs/js-backend/getting-started/quickstart) is a wrapper around the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} that makes it easier to interact with the API. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JS Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint.
+
+To access a resource, you must first instantiate a `clerkClient` instance. See the [reference documentation](/docs/js-backend/getting-started/quickstart) for more information.
+
+[Learn more](/docs/nuxt/guides/users/reading).
## Protect pages and API routes
diff --git a/docs/reference/react-router/overview.mdx b/docs/reference/react-router/overview.mdx
index c20e55f8e8..2b23b23017 100644
--- a/docs/reference/react-router/overview.mdx
+++ b/docs/reference/react-router/overview.mdx
@@ -20,6 +20,12 @@ The following references show how to integrate Clerk features into applications
- [`clerkMiddleware()`](/docs/reference/react-router/clerk-middleware)
- [`rootAuthLoader()`](/docs/reference/react-router/root-auth-loader)
+## `clerkClient()`
+
+[Clerk's JS Backend SDK](/docs/js-backend/getting-started/quickstart) is a wrapper around the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} that makes it easier to interact with the API. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JS Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint.
+
+To access a resource, you must first instantiate a `clerkClient` instance. See the [reference documentation](/docs/js-backend/getting-started/quickstart) for more information.
+
## React Router implementations
React Router can be integrated with Clerk in three ways:
diff --git a/public/images/orgs/relationship-diagram.jpg b/public/images/orgs/relationship-diagram.jpg
new file mode 100644
index 0000000000..765be8017f
Binary files /dev/null and b/public/images/orgs/relationship-diagram.jpg differ
diff --git a/redirects/static/docs.json b/redirects/static/docs.json
index 0dcb09a980..0cfeb087c0 100644
--- a/redirects/static/docs.json
+++ b/redirects/static/docs.json
@@ -2361,17 +2361,17 @@
},
{
"source": "/docs/organizations/creator-role",
- "destination": "/docs/guides/organizations/roles-and-permissions#the-creator-role",
+ "destination": "/docs/guides/organizations/control-access/roles-and-permissions#the-creator-role",
"permanent": true
},
{
"source": "/docs/organizations/default-role",
- "destination": "/docs/guides/organizations/roles-and-permissions#the-default-role-for-members",
+ "destination": "/docs/guides/organizations/control-access/roles-and-permissions#the-default-role-for-members",
"permanent": true
},
{
"source": "/docs/organizations/create-roles-permissions",
- "destination": "/docs/guides/organizations/roles-and-permissions#custom-roles",
+ "destination": "/docs/guides/organizations/control-access/roles-and-permissions#custom-roles",
"permanent": true
},
{
@@ -2741,12 +2741,17 @@
},
{
"source": "/docs/organizations/invitations",
- "destination": "/docs/guides/organizations/invitations",
+ "destination": "/docs/guides/organizations/add-members/invitations",
+ "permanent": true
+ },
+ {
+ "source": "/docs/guides/organizations/invitations",
+ "destination": "/docs/guides/organizations/add-members/invitations",
"permanent": true
},
{
"source": "/docs/organizations/manage-sso",
- "destination": "/docs/guides/organizations/sso",
+ "destination": "/docs/guides/organizations/add-members/sso",
"permanent": true
},
{
@@ -2761,12 +2766,27 @@
},
{
"source": "/docs/organizations/roles-permissions",
- "destination": "/docs/guides/organizations/roles-and-permissions",
+ "destination": "/docs/guides/organizations/control-access/roles-and-permissions",
+ "permanent": true
+ },
+ {
+ "source": "/docs/guides/organizations/roles-and-permissions",
+ "destination": "/docs/guides/organizations/control-access/roles-and-permissions",
"permanent": true
},
{
"source": "/docs/organizations/verified-domains",
- "destination": "/docs/guides/organizations/verified-domains",
+ "destination": "/docs/guides/organizations/add-members/verified-domains",
+ "permanent": true
+ },
+ {
+ "source": "/docs/guides/organizations/verified-domains",
+ "destination": "/docs/guides/organizations/add-members/verified-domains",
+ "permanent": true
+ },
+ {
+ "source": "/docs/guides/organizations/sso",
+ "destination": "/docs/guides/organizations/add-members/sso",
"permanent": true
},
{