Skip to main content

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? (deprecated)
    Type
    OrganizationPublicMetadata
    Description

    Deprecated. Use updateOrganizationMetadata() for partial updates (deep-merges with the existing value) or replaceOrganizationMetadata() for full replacement. This parameter will be removed in a future major version.

  • Name
    privateMetadata? (deprecated)
    Type
    OrganizationPrivateMetadata
    Description

    Deprecated. Use updateOrganizationMetadata() for partial updates (deep-merges with the existing value) or replaceOrganizationMetadata() for full replacement. This parameter will be removed in a future major version.

  • 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

Using clerkClient varies based on the SDK you're using. Refer to the 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