# Record a registration with the affiliate attribution captured at landing ```http POST https://api.onehazel.com/onehazel-api/embed/v1/{key}/track/registrations ``` Unauthenticated. `key` is the operator's public embed key (never the operator id) and the browser `Origin` must be on the operator's allowed websites list, else 403 `unauthorized` with `details.code` `SURFACE_ORIGIN_NOT_ALLOWED`; an unknown or rotated key, an operator id in place of the key, or an account that is not active all get 401 `unauthorized`. The caller proves the player with the same short-lived player token as real-money launch, issued for the operator the key belongs to. Body: `{ "attribution": { "": "" }, "email": "
", "player_token": "" }` (`email` optional). Only the keys the operator's affiliate connections declare are kept; others are dropped, never an error. The player comes from the verified token and is recorded with the kept keys, and the operator's affiliate networks are told about the registration. Returns `{ player_id, attribution, postback: { dispatched, skipped? } }`, where `skipped` says why no affiliate network was told (for example `unattributed`). Errors use the flat `{ code, message, retryable }` envelope: 400 `invalid_request`, 401 `unauthorized` ("player token invalid"), 409 `invalid_request` (no data template), 422 `invalid_request` (the data template needs a field, such as `email` for a new player), and 404 `unavailable` while Track is not enabled. Rate limited per client IP and per operator. Section: [Surfaces](./) Operation id: `postEmbedV1ByKeyTrackRegistrations` ## Authentication No authentication. ## Parameters | Name | In | Required | Description | |---|---|---|---| | `key` | path | yes | | ## Request body JSON object. ## Responses `200` `{ "success": true, "data": ... }` Errors return `{ "success": false, "error": { "code": "...", "message": "..." } }` with a 4xx or 5xx status. ## Example ```bash curl -X POST "https://api.onehazel.com/onehazel-api/embed/v1/{key}/track/registrations" \ -H "Content-Type: application/json" \ -d '{}' ``` Machine-readable: [openapi.yaml](/openapi.yaml), [openapi.json](/openapi.json).