Skip to Content
Clerk logo

Clerk Docs

Ctrl + K
Go to clerkstage.dev

Organization Invitations

These are all methods on the Organization class that allow you to manage the invitations to an organization.

getPendingInvitations()

function getPendingInvitations(params?: GetPendingInvitationsParams): Promise<OrganizationInvitation[]>;

Retrieves a list of organization invitations that have not yet been accepted.

GetPendingInvitationsParams

NameTypeDescription
limitnumberLimit of the results returned.
offsetnumberThe offset of results to start the retrieval.

Returns

TypeDescription
Promise<OrganizationInvitation[]>This method returns a Promise which resolves with a list of OrganizationInvitation objects.

inviteMember()

function inviteMember(params: InviteMemberParams): Promise<OrganizationInvitation>;

Creates and sends an invitation to the target email address for becoming a member with the role passed on the function parameters.

InviteMemberParams

NameTypeDescription
emailAddressstringThe email address to invite.
role'admin' | 'basic_member' | 'guest_member'The role of the new member.

Returns

TypeDescription
Promise<OrganizationInvitation>This method returns a Promise which resolves to the OrganizationInvitation for the created invitation.

inviteMembers()

function inviteMembers(params: InviteMembersParams): Promise<OrganizationInvitation[]>;

Creates and sends an invitation to the target email addresses for becoming a member with the role passed on the function parameters.

InviteMembersParams

NameTypeDescription
emailAddressesstring[]The email addresses to invite.
role'admin' | 'basic_member' | 'guest_member'The role of the new members.

Returns

TypeDescription
Promise<OrganizationInvitation[]>This method returns a Promise which resolves to a list of OrganizationInvitations for the created invitations.

What did you think of this content?

Clerk © 2023