Beacon: a search result was observed (cache-hit telemetry)
const url = 'https://crate.hosaka.fm/api/v2/search-events/observed';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"search_event_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","source":"swr-cache-hit","timestamp":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://crate.hosaka.fm/api/v2/search-events/observed \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "search_event_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "source": "swr-cache-hit", "timestamp": "2026-04-15T12:00:00Z" }'Client beacon reporting a search result was observed from cache. Authenticated with the per-search beacon JWT (Authorization: Bearer), NOT the X-API-Key (the token is version-agnostic). Body ≤512 bytes; idempotent.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Optional. A partner fronting many end users with one key names the end user this call is made for (an opaque, stable id of YOUR choosing: 1–128 chars of [A-Za-z0-9._:@-]). The key stays the customer; the profile becomes a metering dimension — usage rolls up per profile (GET /api/v2/me/usage?profile=
Request Body
Section titled “Request Body ”object
Responses
Section titled “ Responses ”Beacon accepted (idempotent no-op on duplicate)
Headers
Section titled “Headers ”Requests allowed in the current window.
Requests remaining in the current window.
Unix epoch (seconds) when the current window resets.
The tier’s included monthly 2xx allowance.
Included allowance minus the requests gated this month — an UPPER BOUND on billable 2xx (errors are counted at the gate but never billed; /api/v2/me/usage is the billable truth). 0 once the included bucket is spent (overage, where enabled, is flagged by X-Overage).
Unix epoch (seconds) of the next UTC month start, when the monthly counter resets.
Validation failure — invalid_json, invalid_payload (with details = Zod flattened error object), or timestamp_skew (with skew_ms)
object
Example
{ "error": "invalid_payload"}Beacon-token failure — missing_token, invalid_token, or token_search_event_mismatch
object
Example
{ "error": "invalid_payload"}Payload too large (>512 bytes)
object
Example
{ "error": "invalid_payload"}