---
title: "Record a security event"
method: POST
path: "/sca/record-event"
tags: ["Strong Customer Authentication"]
---

# Record a security event

`POST /sca/record-event`

Record a client-side security-relevant event for the customer with Grid's risk engine (e.g. a sign-in, a sensitive view), to
feed adaptive-authentication signals.

This endpoint is only meaningful for customers in a region where SCA is required (e.g. EU). For customers outside SCA-regulated regions, this returns `409`.

## Request body

- RecordSecurityEventRequest — Records a client-side security event for the customer so Grid can maintain the customer's login-security state (SCA session revocation and failed-login lockout).
  - `eventType` 'RESET_PASSWORD_COMPLETED' | 'FAILED_LOGIN_ATTEMPT', required — The security event to record: | Value | Effect | |-------|--------| | `RESET_PASSWORD_COMPLETED` | Revokes every active SCA session for the customer and clears the failed-login counter. | | `FAILED_LOGIN_ATTEMPT` | Increments the cumulative failed-login counter and escalates the lockout at each milestone: 5 attempts → 15 minutes, 6 → 30 minutes, 7 → 1 hour, 8 → 24 hours, 9 or more → suspension. |

## Response `200`

Event recorded; the customer's resulting login-security state is returned (including any lockout).

- RecordSecurityEventResponse — The customer's login-security state after recording the event, so the integrator can surface a lockout to the end user.
  - `eventType` 'RESET_PASSWORD_COMPLETED' | 'FAILED_LOGIN_ATTEMPT', required — The event that was recorded.
  - `suspended` boolean, required — Whether the customer's login is currently suspended (locked with no automatic expiry). A suspended customer must go through a password reset (`RESET_PASSWORD_COMPLETED`) to clear the lockout.
  - `lockedUntil` string, date-time, nullable — When the customer may attempt to log in again, if temporarily locked. Null when not locked, or when `suspended` is true (no automatic expiry).
  - `failedAttempts` integer, required — The customer's current cumulative failed-login count.

## Other responses

- `400` — Invalid event type
- `401` — Unauthorized
- `404` — Customer not found
- `409` — SCA is not required for this customer.
- `423` — The customer's login is locked (or suspended) after too many failed attempts. `details.lockedUntil` says when they may retry.
- `500` — Internal service error

---

[API](https://skmtc.net/stainless-api/apis/grid-api.md) · [All operations](https://skmtc.net/stainless-api/apis/grid-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stainless-api/grid-api/revisions/151f2d9bad9c/schema)
