Base URL and authentication
Authorization header:
qyr_test_…— sandbox. Events validate and store but never affect billing or production models. Recommendations come from a deterministic seed so your tests are repeatable.qyr_live_…— production. Real events, real recommendations, billable.
Endpoint 1: Ingest events
Request
Batching
- Up to 100 events per request.
- Up to 10 KB per event.
- Flush every 2–5 seconds, or whenever you reach ~50 buffered events, whichever comes first. Don’t wait for the batch to fill — latency hurts model quality more than a few extra HTTP calls cost you.
Response codes
Partial acceptance example
event_index is the position in the array you sent. Use it to find the offending event in your local buffer, fix it, and retry just that one. Full schema details are in Event Schema.
Endpoint 2: Request a recommendation
Request
context is optional but strongly encouraged. The more you tell Qyren about the player’s current state, the better the picks.
Response
If no offers are eligible after filtering and pacing,
offers is an empty array and you should fall back to your default. When you actually show offers on screen, log an offer_impression event for each one. This is non-negotiable — without impressions, Qyren can’t compute conversion rates and recommendations get worse over time.
Latency and timeouts
- p95 under 150ms for
/v1/recommend. - Set a client-side timeout of around 500ms.
- If the call times out or fails, fall back to a default offer list. Never block gameplay waiting on Qyren.
Endpoint 3: Report feedback
Request
outcome values:
If you’re already sending
purchase and offer_impression events on /v1/ingest, Qyren can derive most of this automatically — but explicit feedback closes the loop faster and is recommended for your highest-value placements.
Putting it together
A typical session looks like:- Player opens the game → log
session_startto/v1/ingest. - Player opens the shop → call
/v1/recommend, get an ordered list, render it, logoffer_impressionfor each rendered offer. - Player taps an offer → log
offer_click. - Player completes purchase → log
purchase. Optionally also send aconvertedfeedback event. - Player closes the game → log
session_end.

