Rename an organization
Change the display name of an existing organization.
Clerk · Module
Updates an existing Clerk organization by ID and returns the updated Organization. Pass optional organization attributes in the params object.
Call the backend organization method with the organization ID and an object containing only the attributes to change. The method returns a promise for the updated organization; use the dedicated metadata methods instead of passing metadata to this method.
function updateOrganization(organizationId: string, params: { adminDeleteEnabled?: boolean; maxAllowedMemberships?: number; name?: string; privateMetadata?: OrganizationPrivateMetadata; publicMetadata?: OrganizationPublicMetadata; slug?: string }): Promise<Organization>| Name | Type | Description |
|---|---|---|
organizationId | string | The ID of the Organization to update. |
params | { adminDeleteEnabled?: boolean; maxAllowedMemberships?: number; name?: string; privateMetadata?: OrganizationPrivateMetadata; publicMetadata?: OrganizationPublicMetadata; slug?: string } | Optional values to update: adminDeleteEnabled, maxAllowedMemberships, name, privateMetadata, publicMetadata, or slug. |
Promise<Organization>
import { clerkClient } from '@clerk/express'
const organization = await clerkClient.organizations.updateOrganization(
'org_123',
{ name: 'Test Updated' },
)
console.log(organization.name)Updates an organization name through Clerk's backend SDK and receives the updated organization.
Change the display name of an existing organization.
Set or remove the maximum number of memberships.
Modify whether administrators can delete users.
Change an organization's URL-friendly identifier.
It accepts an organization ID and an update-parameter object, then returns a Promise resolving to the updated Organization. The available updates include the name, slug, membership limit, admin deletion setting, and metadata fields.
Follow-up: How should metadata be changed? Use updateOrganizationMetadata() for partial deep-merge updates or replaceOrganizationMetadata() for full replacement.
maxAllowedMemberships controls the maximum number of memberships allowed in the organization. A value of 0 means there is no membership limit.
Follow-up: What would you choose when changing only organization metadata? Use updateOrganizationMetadata() so the metadata update is handled by the dedicated endpoint.
The method is available as clerkClient.organizations.updateOrganization(organizationId, params). The organizationId identifies the target organization, while params contains the optional attributes to modify.
Follow-up: What API operation does the SDK wrap? It wraps PATCH /organizations/{organization_id}.
updateOrganizationMetadata()replaceOrganizationMetadata()OrganizationclerkClient