āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/clerk/clerk-docs/reference/backend/invitations/get-invitation-list ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
getInvitationList()'
description: Use Clerk's JS Backend SDK to retrieve a list of non-revoked invitations for your application.
sdk: js-backend{/* clerk/javascript file: https://github.com/clerk/javascript/blob/main/packages/backend/src/api/endpoints/InvitationApi.ts#L34 */}
Retrieves a list of non-revoked invitations for your application, sorted by descending creation date. Returns a PaginatedResourceResponse object with a data property that contains an array of Invitation objects, and a totalCount property that indicates the total number of invitations in the system.
function getInvitationList(
params: GetInvitationListParams,
): Promise<PaginatedResourceResponse<Invitation[]>>
GetInvitationListParamsFilter by invitation status.
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.
</Properties>
const response = await clerkClient.invitations.getInvitationList()
Retrieves list of invitations that have been revoked.
// get all revoked invitations
const response = await clerkClient.invitations.getInvitationList({ status: 'revoked' })
Retrieves list of invitations that have been revoked that is filtered by the number of results.
const { data, totalCount } = await clerkClient.invitations.getInvitationList({
status: 'revoked',
// returns the first 10 results
limit: 10,
})
Retrieves list of invitations that have been revoked that is filtered by the number of results to skip.
const { data, totalCount } = await clerkClient.invitations.getInvitationList({
status: 'revoked',
// skips the first 10 results
offset: 10,
})
This method in the SDK is a wrapper around the BAPI endpoint GET/invitations. See the BAPI reference{{ target: '_blank' }} for more information.
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā