---
title: "Record a security-relevant user event"
method: POST
path: "/user/record-event"
tags: ["Account Security"]
---

# Record a security-relevant user event

`POST /user/record-event`

Reports a security event for a user, driving progressive account lockout under PSD2. — `RESET_PASSWORD_COMPLETED` revokes every active SCA session for the user and clears the failed-login counter (an account already suspended at level 5 remains suspended until access is restored by support). — `FAILED_LOGIN_ATTEMPT` increments the cumulative counter and escalates the lock at each milestone: 5 attempts → 15 minutes, 6 → 30 minutes, 7 → 1 hour, 8 → 24 hours, 9 or more → suspension with no automatic recovery.

## Request body

- object
  - `userId` string, uuid, required — The user the event is recorded against.
  - `event` 'RESET_PASSWORD_COMPLETED' | 'FAILED_LOGIN_ATTEMPT', required

## Response `200`

Event recorded. The populated fields depend on the event and resulting lock state: `RESET_PASSWORD_COMPLETED` returns only `event`; `FAILED_LOGIN_ATTEMPT` adds `failedAttempts` plus `lockedUntil` (time-bounded lock) or `suspended: true` (level-5 suspension).

- object
  - `event` 'RESET_PASSWORD_COMPLETED' | 'FAILED_LOGIN_ATTEMPT', required
  - `failedAttempts` integer — Cumulative failed-login count. Present for `FAILED_LOGIN_ATTEMPT`.
  - `lockedUntil` string, date-time — End of the active lock window. Present for `FAILED_LOGIN_ATTEMPT` when a time-bounded lock is in effect.
  - `suspended` boolean — Present and `true` when the attempt escalated to level 5 and the user was SUSPENDED.

## Other responses

- `400` — Request was rejected. The `errorCode` field disambiguates.
- `401` — Invalid API key or HMAC signature.

---

[API](https://skmtc.net/striga/apis/striga-v1.md) · [All operations](https://skmtc.net/striga/apis/striga-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/striga/striga-v1/revisions/63e57aa7df45/schema)
