Clear failed_login_count + lockout_until for a user
POST /admin/users/{ref}/unlock-account
Manually clears the per-username lockout state a user has accumulated. Called by admins for legitimate users who got stuck (typo cascades, retrying a forgotten password).
Gated on auth.unlock (admin-only by seed). Idempotent:
calling on an already-unlocked user returns 200 with
unlocked=false; no audit fires for the no-op case.
Audit emits auth.lockout.cleared with subject = target user_ref, actor = admin.user_ref, metadata.source=“admin”
- metadata.prior_failed_count.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”Unlock attempted (see body for effect).
Returned by POST /admin/users/{ref}/unlock-account. Reports whether the call actually unlocked (unlocked=true) or found the user already-unlocked (unlocked=false — idempotent no-op).
object
True when the call cleared existing lockout state (audit fired); false when the user was already unlocked (no state change; no audit).
The failed_login_count value BEFORE the unlock cleared it. Zero when unlocked=false.
Authentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completedResource not found
object
Human-readable error summary
Example
the request could not be completed