List invitations
Lists a project's invitations, newest first, in any status, paginated with
limit and page_token.
Optional status and type filters narrow the page. Repeat status to
match any of several statuses, for example
status=pending&status=expired&status=rejected. expired is derived on
read from expires_at. expand=inviter adds inviter to each
invitation. Authenticate with a project secret (oauth2) or
a console session cookie (sessionCookie). Listing needs the same project
admin check as createGrant (POST /grants).
AuthorizationBearer <token>Scope: project.write
project_id*stringThe project ID: the id that createProject (POST /projects) returns. zitadel setup prints
it as "Project id" in its summary and as project_id with --json, and
writes it to .env.local as ZITADEL_PROJECT_ID.
^[a-zA-Z0-9_-]+$limit?integerMaximum number of items to return.
1 <= value <= 10020page_token?stringToken for fetching the next page of results.
Obtain this value from next_page_token in the previous response.
Omit to start from the beginning.
Its format is opaque and may change between releases.
status?array<>Only invitations with this status. Repeat the parameter to match any of several statuses.
type?stringOnly invitations of this type.
"project_member""team_member"expand?array<>Related objects to embed on each returned invitation.
A page of the project's invitations.
application/json- response
A page of a project's invitations, newest first.
invitations*array<|>next_page_token?|Token to pass as page_token in the next request to fetch the following page.
Absent when there are no more results.
import { configureZitadel, getApi } from "@zitadel/api/config";// In the browser, through the SDK proxy: the session cookie authenticates the call.const client = getApi(configureZitadel({ projectId: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" }));const invitations = await client.listInvitations({ project_id: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" });{ "invitations": [ { "id": "string", "project_id": "string", "metadata": { "name": "string" }, "status": "pending", "created_by": "string", "created_by_type": "human", "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "journey_id": "string", "responded_by": "string", "responded_at": "2019-08-24T14:15:22Z", "inviter": { "user_id": "string", "identifier": "string", "identifier_property": "string", "display": "string" }, "type": "project_member", "project_member": { "relation": "viewer" } } ], "next_page_token": "string"}Was this helpful?