Odds API errors and status codes
Errors: Status codes, error codes and how to resolve them. PreciseAPI sports odds API documentation.
Errors use conventional HTTP status codes and a consistent JSON body with a stable, machine-readable code, a human-readable message and a link back to this page.
Error body
{
"error": {
"code": "invalid_parameter",
"message": "Unknown league: xfl. See /v1/leagues for valid values.",
"param": "league",
"docs_url": "https://preciseapi.com/docs/errors#invalid_parameter"
},
"meta": {
"request_id": "req_uzeX2XvyiaiuNSpiy0Fl"
}
}| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_parameter | A query parameter is missing or has an invalid value. The response includes the offending `param`. |
| 401 | missing_api_key | No key was sent. Use the Authorization header or the X-API-Key header. On the stream, send the header or an auth message first. |
| 401 | api_key_in_url | The key was put in the URL (?api_key= or ?apiKey=), which is refused on REST and the stream because URLs are written to logs and browser history. Send the Authorization or X-API-Key header; on the stream, {"type":"auth","api_key":"…"} as the first message also works. Roll the key if the URL was shared or logged anywhere you don't control. |
| 401 | invalid_api_key | The key does not exist. Check for copy/paste truncation. |
| 401 | key_revoked | The key was revoked or rolled. Create or copy a current key from the dashboard. |
| 401 | key_expired | The key passed its expiry date. Extend it or create a new key in the dashboard. |
| 401 | invalid_token | MCP server only: the sign-in token of a connected app is invalid or expired. Apps refresh it on their own; if it keeps failing, connect the app again. |
| 401 | oauth_token_not_accepted | A connected app’s sign-in token was sent to the REST API or the stream. Those take an API key; sign-in tokens work only on the MCP server. |
| 402 | insufficient_credits | Your balance is lower than the cost of the request. Nothing was charged. |
| 402 | key_credit_cap | This key reached its monthly credit cap. Raise the cap on the API keys page or use another key. |
| 403 | plan_feature_unavailable | The endpoint or stream is not included in your plan. Games in progress (in-play odds, live scores and the game clock) and the WebSocket stream are on Syndicate; Edge and Sharp serve pre-game odds and final scores. |
| 403 | account_pending | Your sandbox is waiting for approval. |
| 403 | account_suspended | The account is suspended. Contact support. |
| 403 | key_scope | The key is restricted to REST or to the WebSocket stream and was used for the other. |
| 403 | ip_not_allowed | The request came from an address outside the key’s IP allowlist. |
| 404 | endpoint_not_found | The path does not exist. |
| 404 | event_not_found | Unknown event id, or the event finished more than four hours ago. |
| 404 | market_not_found | The requested market is not offered by that source for this event. |
| 404 | history_not_found | No history is stored for that market. |
| 429 | rate_limited | Too many requests: your plan’s per-minute limit, the per-address ceiling (1,200 a minute without a valid key, or your plan’s own rate with one), repeated failed keys from one address, or /v1/health’s 60 checks a minute per IP. Wait for Retry-After seconds. |
| 503 | warming_up | The server has just restarted and is loading the latest odds. Retry after the Retry-After header (5 seconds). |
| 503 | maintenance | Scheduled maintenance is in progress. Retry after the Retry-After header; check the status page for details. |
| 500 | internal_error | Unexpected failure on our side. The request was not charged — safe to retry with backoff. |
Every response — success or error — carries an X-Request-Id. Include it when contacting support and we can trace the exact request.
Previous: Rate limits · Next: Versioning