getOrganizationInvitationList()
Gets the list of Organization invitations for the specified Organization.
Returns a PaginatedResourceResponse object with a data property containing an array of OrganizationInvitation objects and a totalCount property containing the total number of Organization invitations for the Organization.
function getOrganizationInvitationList(params: GetOrganizationInvitationListParams): Promise<PaginatedResourceResponse<OrganizationInvitation[]>>- Name
organizationId- Type
string- Description
The ID of the Organization to get the list of invitations for.
- Name
status?- Type
("pending" | "accepted" | "revoked" | "expired")[]- Description
Filters Organization invitations by status. Accepts up to 100 statuses.
const organizationId = 'org_123'
const response = await clerkClient.organizations.getOrganizationInvitationList({ organizationId })Filter by invitation status
Gets a list of Organization invitations filtered by invitation status.
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'],
})Limit the number of results
Gets a list of Organization invitations, limited to the specified number of results.
const organizationId = 'org_123'
const { data, totalCount } = await clerkClient.organizations.getOrganizationInvitationList({
organizationId,
// returns the first 10 results
limit: 10,
})Skip results
Gets a list of Organization invitations, skipping the specified number of results.
const organizationId = 'org_123'
const { data, totalCount } = await clerkClient.organizations.getOrganizationInvitationList({
organizationId,
// skips the first 10 results
offset: 10,
})Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint GET/organizations/{organization_id}/invitations. See the BAPI reference for more information.
Feedback
Last updated on