List an organization's invitations
GET /fapi/v1/organizations/{org_id}/invitations · called from the environment's sign-in host
Lists the invitations of an organization in the order they were created, for an organization profile screen. A pending invitation shows the invited address only if you also hold idp_members:read; otherwise email is null. Accepted, revoked and expired invitations never carry an address.
Requires the authenticated user's __Host-idp_session cookie, or a first-party app's front API access token (Authorization: DPoP <token> with a DPoP proof; see Front API access token). The user must be an active member of the organization with the idp_members:invite permission. A user who is not a member gets 404 not_found; a member without the permission gets 403 insufficient_permissions.
With @keenauth/js: await keenauth.organizations.invitations(orgId, { status: "pending" }).
Request
Headers:
| Header | Required | Description |
|---|---|---|
Idp-Client |
yes | SDK identifier. |
org_id: the organization identifier (org_…).
Query parameters:
| Parameter | Required | Description |
|---|---|---|
status |
no | pending, accepted, revoked or expired; all four when omitted. |
after |
no | The next_after value of the previous page. |
limit |
no | 1–100, default 20. |
No body.
Response
200 OK with {"data": [...], "next_after": "..."}; next_after is absent on the last page. Each item has the fields of an invitation.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_cursor |
after is malformed. |
| 401 | unauthenticated |
No valid session cookie or token. |
| 403 | insufficient_permissions |
The user lacks idp_members:invite in the organization. |
| 404 | not_found |
No such organization for this user; an unknown, malformed or foreign identifier answers the same. |
| 422 | validation_failed |
status or limit is invalid. |
| 503 | service_unavailable |
Temporarily unavailable; retry after Retry-After. |
Example
curl "https://example.keenauth.app/fapi/v1/organizations/org_01jbz6x8kq3m2n4p5r6s7t8v9a/invitations?status=pending&limit=1" \
-H "Idp-Client: my-app/1.0.0 (node/22.0.0)" \
-b cookies.txt
{
"data": [
{
"id": "inv_01jbz6x8kq3m2n4p5r6s7t8v9d",
"email": "new.member@example.com",
"role_ids": ["rol_01jbz6x8kq3m2n4p5r6s7t8v9w"],
"delivery": "email",
"delivery_status": "sent",
"status": "pending",
"send_count": 1,
"last_sent_at": "2026-11-03T10:00:00Z",
"expires_at": "2026-11-10T10:00:00Z",
"accepted_user_id": null,
"accepted_at": null,
"revoked_at": null,
"created_at": "2026-11-03T10:00:00Z",
"updated_at": "2026-11-03T10:00:00Z",
"version": 1
}
],
"next_after": "inv_01jbz6x8kq3m2n4p5r6s7t8v9d"
}
Personal data
This endpoint carries personal data: organization memberships and invitations. Personal data in the KeenAuth APIs describes what is stored, how long it is kept and how it is deleted. Do not send special categories of personal data (health, biometric data, religion, political opinions, sexual orientation) in any field.