Skip to main content
Docs

updateOrganization()

Updates an Organization.

function updateOrganization(params: UpdateOrganizationParams): Promise<Organization>
  • Name
    organizationId
    Type
    string
    Description

    The organization ID of the organization being updated.

  • Name
    name?
    Type
    string
    Description

    The updated name of the organization.

  • Name
    slug?
    Type
    string
    Description

    The updated slug of the organization.

  • Name
    publicMetadata?
    Type
    OrganizationPublicMetadata
    Description

    Metadata that can be read from both the Frontend API and Backend API, but can be set only from the Backend API. Updating this property will override the existing metadata. To merge metadata, use updateOrganizationMetadata().

  • Name
    privateMetadata?
    Type
    OrganizationPrivateMetadata
    Description

    Metadata that is only visible to your Backend API. Updating this property will override the existing metadata. To merge metadata, use updateOrganizationMetadata().

  • Name
    maxAllowedMemberships?
    Type
    number
    Description

    The maximum number of memberships allowed in the organization. Setting this value to 0 removes any limit, allowing an unlimited number of memberships.

Note

Importing clerkClient varies based on your framework. Refer to the Backend SDK overview for usage details, including guidance on how to access the userId and other properties.

const organizationId = 'org_123'

const name = 'Test Updated'

const response = await clerkClient.organizations.updateOrganization(organizationId, { name })

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint PATCH/organizations/{organization_id}. See the BAPI reference for more information.

Feedback

What did you think of this content?

Last updated on