Docs

List invitations

GET
/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).

Authorization

headerAuthorizationBearer <token>

Scope: project.write

Query Parameters

project_id*string

The 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.

Match^[a-zA-Z0-9_-]+$
limit?integer

Maximum number of items to return.

Range1 <= value <= 100
Default20
page_token?string

Token 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?string

Only invitations of this type.

Value in"project_member""team_member"
expand?array<>

Related objects to embed on each returned invitation.

Response Body

A page of the project's invitations.

application/json
  1. 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.

Example Request
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" });
Example Response
{  "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?