---
title: "Record Event"
method: POST
path: "/v1/events"
---

# Record Event

`POST /v1/events`

## Request

- Base URL: `https://api.quantradin.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.quantradin.com/v1/events`
- Auth: none declared

Record ONE first-party analytics event.  Write-only, fire-and-forget.

Security surface:
  - per-IP rate limit (IMPORTANT-2): over _EVENTS_RATE_LIMIT/min from one
    IP → 429, checked FIRST and before any DB work, so a flood is cheap
    to reject (this is the first unauthenticated write route — nothing
    here should be able to exhaust the connect-per-request Postgres
    slots).
  - anon_id is capped at _EVENT_ANON_ID_MAX_LEN chars (MINOR-1) — it's a
    client uuid, anything longer is garbage → 400.
  - name must be in the server-side whitelist (_EVENT_NAMES) → else 400.
  - props is size-capped (~1KB serialized) → oversized → 400.
  - user_id is taken from the session cookie when present; NEVER trusted
    from the body.  anon_id (a client localStorage uuid) attributes
    logged-out visitors.  No PII beyond these ids is expected.
The client fires this best-effort and ignores the result — a rejection
here never blocks any UX.

## Request body

- EventBody
  - `name` string, required
  - `props` object, nullable
  - `anon_id` string, nullable

## Response `204`

Successful Response

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/quantradin/apis/vega-api.md) · [All operations](https://skmtc.dev/quantradin/apis/vega-api/llms.txt) · [OpenAPI document](https://skmtc.dev/quantradin/apis/vega-api/revisions/47add154ef38?raw)
