Skip to content

Beacon: a search was refined (facet-change telemetry)

POST
/api/v2/search-events/refined
curl --request POST \
--url https://crate.0xhoneyjar.xyz/api/v2/search-events/refined \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "search_event_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "changed_facets": [ { "name": "genre", "from": [ "example" ], "to": [ "example" ] } ], "timestamp": "2026-04-15T12:00:00Z" }'

Client beacon reporting facet changes that refined a prior search (≤10 changed facets). Authenticated with the per-search beacon JWT (Authorization: Bearer), NOT the X-API-Key. Body ≤512 bytes; idempotent.

Media type application/json
object
search_event_id
required
string format: uuid
changed_facets
required
Array<object>
<= 10 items
object
name
required
string
Allowed values: genre style year_from year_to country format label q
from
Any of:
string
to
Any of:
string
timestamp
required
string format: date-time

Beacon accepted (idempotent no-op on duplicate)

X-RateLimit-Limit
integer

Requests allowed in the current window.

X-RateLimit-Remaining
integer

Requests remaining in the current window.

X-RateLimit-Reset
integer

Unix epoch (seconds) when the current window resets.

Validation failure — invalid_json, invalid_payload (with details = Zod flattened error object), or timestamp_skew (with skew_ms)

Media type application/json
object
error
required
string
details
skew_ms
number
Example
{
"error": "invalid_payload"
}

Beacon-token failure — missing_token, invalid_token, or token_search_event_mismatch

Media type application/json
object
error
required
string
details
skew_ms
number
Example
{
"error": "invalid_payload"
}

Payload too large (>512 bytes)

Media type application/json
object
error
required
string
details
skew_ms
number
Example
{
"error": "invalid_payload"
}