List an organization's members
GET /fapi/v1/organizations/{org_id}/memberships · called from the environment's sign-in host
Lists the memberships of an organization, ordered by last change, for an organization profile screen. Pending invitations never appear here. Each row names the user only by their usr_… identifier; this endpoint returns no names or e-mail addresses. Requires the authenticated user's __Host-idp_session cookie; if the cookie is missing, expired, or revoked, returns 401 unauthenticated. A first-party app on another origin can instead send its 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:read 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.members(orgId, { status: "active" }).
Request
Headers:
| Header | Required | Description |
|---|---|---|
Idp-Client |
yes | SDK identifier. |
org_id: the organization identifier (org_…).
Query parameters:
| Parameter | Required | Description |
|---|---|---|
status |
no | active, suspended or removed; all three when omitted. |
role_id |
no | Only memberships that hold this role (rol_…). |
after |
no | The next_after value of the previous page (opaque). |
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: id (mem_…), user_id (usr_…), status, roles (each role_id and source, where the assignment came from, such as admin_api or default), created_at, activated_at (or null), expires_at (or null), updated_at, version.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_cursor |
after is malformed. |
| 401 | unauthenticated |
No valid session cookie. |
| 403 | insufficient_permissions |
The user lacks idp_members:read 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, role_id or limit is invalid. |
| 503 | service_unavailable |
Temporarily unavailable; retry after Retry-After. |
Example
curl "https://example.keenauth.app/fapi/v1/organizations/org_01jbz6x8kq3m2n4p5r6s7t8v9a/memberships?status=active&limit=2" \
-H "Idp-Client: my-app/1.0.0 (node/22.0.0)" \
-b cookies.txt
{
"data": [
{
"id": "mem_01jbz6x8kq3m2n4p5r6s7t8v9b",
"user_id": "usr_01jbz6x8kq3m2n4p5r6s7t8v9c",
"status": "active",
"roles": [{ "role_id": "rol_01jbz6x8kq3m2n4p5r6s7t8v9w", "source": "admin_api" }],
"created_at": "2026-11-03T09:00:00Z",
"activated_at": "2026-11-03T09:00:00Z",
"expires_at": null,
"updated_at": "2026-11-03T09:00:00Z",
"version": 1
}
],
"next_after": "AAAYQ3dAgGUBmgAAAABwAIAAAAAAAADh"
}
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.