Errors

HTTP status codes and the neutral JSON error body the API returns.

Errors use standard HTTP status codes and a single, neutral JSON body shape:

{ "error": "human-readable message" }

Error messages describe what went wrong in plain terms and carry no promotional or betting framing.

Status codes

CodeMeaningTypical cause
200OKThe request succeeded.
400Bad RequestA malformed parameter (e.g. a match id that isn't a valid id, an invalid status filter, or a corrupted cursor).
401UnauthorizedMissing, unknown, or revoked API key.
404Not FoundUnknown game namespace, or no resource with that id.
429Too Many RequestsThe key's rate limit or monthly quota is exceeded — the body says which.
500Internal Server ErrorAn unexpected server-side error. Retry with backoff.

Examples

# A match filter that isn't a valid id
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.esportsodds.gg/v1/cs2/odds?match=not-an-id"
# 400 { "error": "match must be a valid id" }
# A game that isn't onboarded
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.esportsodds.gg/v1/dota2/matches"
# 404 { "error": "unknown game" }

Handling errors

  • Treat 4xx as a problem with the request — fix the input or the key; retrying unchanged won't help (except 429, which you retry after a delay).
  • Treat 5xx as transient — retry with exponential backoff.
  • Always branch on the HTTP status first, then read error for a message to log.

On this page