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"
  }
}
StatusCodeMeaning
400invalid_parameterA query parameter is missing or has an invalid value. The response includes the offending `param`.
401missing_api_keyNo key was sent. Use the Authorization header or the X-API-Key header. On the stream, send the header or an auth message first.
401api_key_in_urlThe 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.
401invalid_api_keyThe key does not exist. Check for copy/paste truncation.
401key_revokedThe key was revoked or rolled. Create or copy a current key from the dashboard.
401key_expiredThe key passed its expiry date. Extend it or create a new key in the dashboard.
401invalid_tokenMCP 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.
401oauth_token_not_acceptedA 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.
402insufficient_creditsYour balance is lower than the cost of the request. Nothing was charged.
402key_credit_capThis key reached its monthly credit cap. Raise the cap on the API keys page or use another key.
403plan_feature_unavailableThe 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.
403account_pendingYour sandbox is waiting for approval.
403account_suspendedThe account is suspended. Contact support.
403key_scopeThe key is restricted to REST or to the WebSocket stream and was used for the other.
403ip_not_allowedThe request came from an address outside the key’s IP allowlist.
404endpoint_not_foundThe path does not exist.
404event_not_foundUnknown event id, or the event finished more than four hours ago.
404market_not_foundThe requested market is not offered by that source for this event.
404history_not_foundNo history is stored for that market.
429rate_limitedToo 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.
503warming_upThe server has just restarted and is loading the latest odds. Retry after the Retry-After header (5 seconds).
503maintenanceScheduled maintenance is in progress. Retry after the Retry-After header; check the status page for details.
500internal_errorUnexpected 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