āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/clerk/clerk-docs/reference/backend/organization/get-organization-invitation-list ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
getOrganizationInvitationList()'
description: Use Clerk's JS Backend SDK to retrieve a list of organization invitations.
sdk: js-backend{/* clerk/javascript file: https://github.com/clerk/javascript/blob/main/packages/backend/src/api/endpoints/OrganizationApi.ts#L237 */}
Retrieves a list of organization invitations. Returns a PaginatedResourceResponse object with a data property that contains an array of OrganizationInvitation objects, and a totalCount property that indicates the total number of organization invitations in the system for the specified organization.
function getOrganizationInvitationList(
params: GetOrganizationInvitationListParams,
): Promise<PaginatedResourceResponse<OrganizationInvitation[]>>
GetOrganizationInvitationListParamsThe ID of the organization to retrieve the list of pending invitations from.
limit?numberThe number of results to return. Must be an integer greater than zero and less than 501. Can be used for paginating the results together with offset. Defaults to 10.
offset?numberSkip the first offset results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with limit. Defaults to 0.
status?string[]The status of the invitation. Possible values: pending, accepted, revoked, expired. Defaults to pending.
</Properties>
const organizationId = 'org_123'
const response = await clerkClient.organizations.getOrganizationInvitationList({ organizationId })
Retrieves organization invitation list that is filtered by the status of the invitation.
const organizationId = 'org_123'
const { data, totalCount } = await clerkClient.organizations.getOrganizationInvitationList({
organizationId,
// returns a list of invitations that have not yet been accepted
status: ['pending'],
})
Retrieves organization invitation list that is filtered by the number of results.
const organizationId = 'org_123'
const { data, totalCount } = await clerkClient.organizations.getOrganizationInvitationList({
organizationId,
// returns the first 10 results
limit: 10,
})
Retrieves organization invitation list that is filtered by the number of results to skip.
const organizationId = 'org_123'
const { data, totalCount } = await clerkClient.organizations.getOrganizationInvitationList({
organizationId,
// skips the first 10 results
offset: 10,
})
This method in the SDK is a wrapper around the BAPI endpoint GET/organizations/{organization_id}/invitations. See the BAPI reference{{ target: '_blank' }} for more information.
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā