
# Reactivate a member

`POST /fapi/v1/organizations/{org_id}/memberships/{membership_id}:reactivate` · called from the environment's sign-in host

Reactivates a suspended membership; the member can select the organization again with the roles they held. Reactivating an active member answers the membership unchanged. The user's account must itself be active.

Requires the authenticated user's `__Host-idp_session` cookie with an exact `Origin`, or a first-party app's front API access token (`Authorization: DPoP <token>` with a DPoP proof; see [Front API access token](/docs/api/fapi/front-api-token)). The user must be an active member of the organization with both the `idp_members:update_roles` and `idp_members:remove` permissions. A user who is not a member gets `404 not_found`; a member without both permissions gets `403 insufficient_permissions`. You cannot change your own membership here (`403 insufficient_permissions`), and only a member who holds the admin role can change a member who holds a privileged role (`403 role_not_assignable`).

With `@keenauth/js`: `await keenauth.organizations.reactivateMember(orgId, membershipId, { expectedVersion: 4 })`.

## Request

Headers:

| Header | Required | Description |
| --- | --- | --- |
| `Idp-Client` | yes | SDK identifier. |
| `Origin` | yes, with the cookie | `https://<sign-in host>`. |
| `If-Match` | no | One version, `"<version>"`, from the member list. A version that does not match, or more than one version, returns `412 precondition_failed`. |

`org_id`: the organization identifier (`org_…`). `membership_id`: the membership identifier (`mem_…`).

No body.

## Response

`200 OK` with the membership (the same fields as an item of [the member list](/docs/api/fapi/organizations/memberships/list)) and `ETag: "<version>"`.

## Errors

| Status | Code | When |
| --- | --- | --- |
| 400 | `malformed_request` | `If-Match` is malformed. |
| 401 | `unauthenticated` | No valid session cookie or token. |
| 403 | `insufficient_permissions` | The user lacks `idp_members:update_roles` or `idp_members:remove`, or the membership is the user's own. |
| 403 | `role_not_assignable` | The member holds a privileged role and the user does not hold the admin role. |
| 403 | `origin_not_allowed` | The `Origin` does not match. |
| 403 | `user_not_active` | The user's account is blocked or pending deletion. |
| 404 | `not_found` | No such organization or membership for this user; an unknown, malformed or foreign identifier answers the same. |
| 409 | `organization_disabled` | The organization is disabled or pending deletion (`organization_pending_deletion`). |
| 412 | `precondition_failed` | `If-Match` does not name the membership's current version. |
| 422 | `validation_failed` | The membership has been removed. |
| 503 | `service_unavailable` | Temporarily unavailable; retry after `Retry-After`. |

## Example

```bash
curl -X POST "https://example.keenauth.app/fapi/v1/organizations/org_01jbz6x8kq3m2n4p5r6s7t8v9a/memberships/mem_01jbz6x8kq3m2n4p5r6s7t8v9b:reactivate" \
  -H "Idp-Client: my-app/1.0.0 (node/22.0.0)" \
  -H "Origin: https://example.keenauth.app" \
  -H 'If-Match: "3"' \
  -b cookies.txt
```

```json
{
  "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-03T11:00:00Z",
  "version": 4
}
```

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