POST
Unban user

Overview

Reverses a ban. Clears bannedAt and bannedReason and restores users.status = ACTIVE. The user can sign in again (they were forced out of all sessions at ban time; unban does not re-issue tokens — the user logs in normally). Idempotent: a no-op on a user who is already ACTIVE.

Authentication

Bearer <accessToken> with scope: 'admin' required (requireAdmin).
Role-gated: requires SUPER or MODERATOR. A FINANCE admin receives 403 FORBIDDEN.

Path parameters

Query parameters

None.

Request body

None.

Response — 200 OK

Returns the updated user summary object with status: "ACTIVE" and bannedAt/bannedReason cleared to null.

Error responses

Example error — 404 NOT_FOUND

Side effects

  • users row updated (status = ACTIVE, bannedAt/bannedReason = null).
  • An audit-log row is written (admin id, target user id, action users.unban).

See also

  • Ban user — the action this reverses.

curl

Postman

See docs/postman/swappr.postman_collection.json → Admin Users → Unban.