---
title: "Record Event Public"
method: POST
path: "/api/coding-assessment/{magic_token}/event"
tags: ["coding-assessment"]
---

# Record Event Public

`POST /api/coding-assessment/{magic_token}/event`

## Request

- Base URL: `https://api.ruzora.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ruzora.com/api/coding-assessment/{magic_token}/event`
- Auth: none declared

Append one funnel event.

202 and an empty body on every path, including an unknown token or a
bad event name. This is called from `navigator.sendBeacon` on unload,
which cannot read a response and must never be given a reason to
retry — and telemetry that can break the page it measures is worse
than no telemetry.

## Path parameters

- `magic_token` string, required

## Request body

- AssessmentEventRequest: One funnel event. Sent by beacon, so it must never need a reply. EVERY FIELD COERCES; NOTHING REJECTS. The handler answers 202 on every path precisely because `sendBeacon` cannot read a response or retry — but Pydantic runs BEFORE the handler, so a bound expressed as `le=` or `max_length=` turns into a 422 the beacon never sees and an event that is simply gone. That was not theoretical. A plain macOS Chrome user-agent is 47 characters against the old `max_length=40`, so a client passing `navigator.userAgent` would have lost 100% of its events, silently, and the funnel this instrumentation exists to measure would have read as empty rather than as broken. Truncating a 47-character UA to 40 costs a suffix nobody groups by. Rejecting it costs the whole row. The bounds are still enforced — they are just enforced by clamping, which is what a telemetry sink should do with a value it does not like.
  - `event` string, required
  - `viewport_w` integer, nullable
  - `viewport_h` integer, nullable
  - `ua_family` string, nullable

## Response `202`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ruzora/apis/ruzora-candidate-crm-api.md) · [All operations](https://skmtc.dev/ruzora/apis/ruzora-candidate-crm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ruzora/apis/ruzora-candidate-crm-api/revisions/f9b8223f3ac4?raw)
