Skip to Content
You are viewing a beta version of Clerk Docs
Visit the latest docs
Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.com

OrganizationMembership

The OrganizationMembership object is the model around an organization membership entity and describes the relationship between users and organizations.

Properties

NameTypeDescription
idstringA unique identifier for this organization membership.
publicMetadataobjectCustom metadata that are visible to the frontend.
rolestringThe role of the current user in the organization.
publicUserDataPublicUserDataPublic information about the user that this membership belongs to.
organizationOrganizationThe Organization object the membership belongs to.
createdAtDateDate of the time the membership was created.
updatedAtDateDate of the last time the membership was updated.

Methods

destroy()

Deletes the membership from the organization it belongs to.

function destroy(): Promise<OrganizationMembership>;

destroy() returns

TypeDescription
Promise<OrganizationMembership>A Promise which resolves to the OrganizationMembership for the deleted membership.

update()

Updates the member's role.

function update(updateParams: UpdateOrganizationMembershipParams): Promise<OrganizationMembership>;

UpdateOrganizationMembershipParams

NameTypeDescription
rolestringThe role of the new member.

update() returns

TypeDescription
Promise<OrganizationMembership>A Promise which resolves to the OrganizationMembership for the updated membership.

Last updated on December 19, 2023

What did you think of this content?

Clerk © 2024