Skip to Content
Clerk logo

Clerk Docs

Ctrl + K
Go to clerkstage.dev

updateOrganizationMembershipMetadata()

Updates the metadata associated with a user's organization membership.

const organizationId = 'my-organization-id';
 
const update = clerkClient.organizations.updateOrganizationMembershipMetadata(organizationId,{
  publicMetadata:{
    "example": "metadata"
  }
});

UpdateOrganizationMembershipMetadataParams

NameTypeDescription
organizationIdstringThe ID of the organization this membership belongs to.
userIdstringThe user ID associated with the metadata being updated.
publicMetadata?Record<string, unknown>Metadata saved on the organization, that is visible to both your Frontend and Backend APIs.
privateMetadata?Record<string, unknown>Metadata saved on the organization that is only visible to your Backend API.

Was this helpful?

Clerk © 2023