updateOrganizationMembership()
Updates a user's . Currently, only the role can be updated.
function updateOrganizationMembership(
  params: UpdateOrganizationMembershipParams,
): Promise<OrganizationMembership>- Name
- organizationId
- Type
- string
- Description
- The ID of the organization this membership belongs to. 
 
- Name
- userId
- Type
- string
- Description
- The ID of the user that this membership belongs to. 
 
- Name
- role
- Type
- string
- Description
- The role to assign user. 
 
const organizationId = 'org_123'
const userId = 'user_123'
const role = 'org:admin'
const response = await clerkClient.organizations.updateOrganizationMembership({
  organizationId,
  userId,
  role,
})Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint PATCH/organizations/{organization_id}/memberships/{user_id}. See the BAPI reference for more information.
Feedback
Last updated on