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
| Code | Meaning | Typical cause |
|---|---|---|
200 | OK | The request succeeded. |
400 | Bad Request | A malformed parameter (e.g. a match id that isn't a valid id, an invalid status filter, or a corrupted cursor). |
401 | Unauthorized | Missing, unknown, or revoked API key. |
404 | Not Found | Unknown game namespace, or no resource with that id. |
429 | Too Many Requests | The key's rate limit or monthly quota is exceeded — the body says which. |
500 | Internal Server Error | An 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
4xxas a problem with the request — fix the input or the key; retrying unchanged won't help (except429, which you retry after a delay). - Treat
5xxas transient — retry with exponential backoff. - Always branch on the HTTP status first, then read
errorfor a message to log.