
# List the memberships of an organization

`GET /v1/organizations/{org_id}/memberships` · permission `organizations:read`

Lists the organization's memberships by last update, oldest first (ties by ID). Only forward pagination is supported. Filters: `status`, `role_id`, `updated_after`. The cursor is bound to the organization and the filters.

## Request

| Field | Type | Required | Description |
|---|---|---|---|
| `org_id` | path | yes | Organization ID (`org_…`). |
| `limit` | query | no | 1–100, default 20. |
| `after` | query | no | Cursor from `list_metadata.after`. |
| `status` | query | no | `invited`, `active`, `suspended` or `removed`. |
| `role_id` | query | no | Only memberships that hold this role (`rol_…`). |
| `updated_after` | query | no | RFC 3339 time; only memberships updated after it. |

No request body.

## Response

`200 OK` with a page of memberships.

```json
{
  "data": [
    {
      "id": "mem_01j9xn5p9s0t4v6w8x0y2z4a6c",
      "organization_id": "org_01j9xk3m7q8r2s4t6v8w0y2z4a",
      "user_id": "usr_01j9xh2k6p7q1r3s5t7v9w1x3y",
      "status": "active",
      "source": "admin_api",
      "reason": null,
      "roles": [
        {
          "role_id": "rol_01j9xr7s1t2w6x8y0z2a4b6c8e",
          "source": "admin_api",
          "assigned_at": "2026-10-12T09:31:00.123456Z"
        }
      ],
      "expires_at": null,
      "created_at": "2026-10-12T09:31:00.123456Z",
      "activated_at": "2026-10-12T09:31:00.123456Z",
      "suspended_at": null,
      "removed_at": null,
      "updated_at": "2026-10-12T09:31:00.123456Z",
      "version": 1
    }
  ],
  "list_metadata": {
    "before": null,
    "after": null
  }
}
```

## Errors

| HTTP | code | When |
|---|---|---|
| 400 | `invalid_cursor` | The cursor is invalid or belongs to another organization or filter. |
| 404 | `not_found` | The organization does not exist in this environment. |
| 422 | `validation_failed` | A filter or `limit` is invalid, or `before` or a non-`asc` `order` was given. |
| 401 | `unauthenticated` | The credential is missing, invalid or revoked. |
| 403 | `insufficient_permissions` | The credential lacks the required permission. |
| 429 | `rate_limited` | The rate limit was exceeded; retry after the `Retry-After` period. |
| 503 | `service_unavailable` | A dependency is temporarily unavailable; retry after the `Retry-After` period. |

## Example

```bash
curl -i "https://api.eu.keenauth.com/v1/organizations/org_01j9xk3m7q8r2s4t6v8w0y2z4a/memberships?status=active&limit=20" \
  -H "Authorization: Bearer $KEENAUTH_SECRET_KEY"
```

## Personal data

This endpoint carries personal data: organization memberships and invitations. [Personal data in the KeenAuth APIs](/docs/policies/personal-data) 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.
