onari

Errors

Every error has the same shape.

View as Markdown
{
  "error": {
    "code": "unknown_event_type",
    "message": "\"order.placd\" isn't in your events list. Add it in Developers → Events, or check the spelling.",
    "did_you_mean": "order.placed"
  }
}

code is stable and safe to branch on; message is written for people and may change. Some errors add details (issues, did_you_mean, index, processed).

StatusCodeWhat to do
400invalid_requestFix the request; issues lists the problems.
401invalid_api_keyCheck the key and environment.
402player_limit_reachedFree plan's monthly player cap. Upgrade, or wait for the 1st.
404player_not_foundThe player hasn't sent an event yet.
404not_foundWrong path.
422unknown_event_typeAdd the event in Developers → Events or fix the spelling.
429rate_limitedWait Retry-After seconds, or batch events.
500server_errorRetry with the same idempotency_key; it's safe.

Retry 429 and 5xx with backoff. Don't retry 4xx errors without changing the request.