Errors

All errors follow a consistent JSON structure with a stable machine-readable code, a human-readable message, and a request ID you can quote to support.

Error response format

{
  "error": {
    "code": "tier_insufficient",
    "message": "Your plan doesn't include NBA real-time tier.",
    "request_id": "req_8f3a2b1c",
    "documentation_url": "https://sportapidata.com/docs/concepts/errors#tier_insufficient",
    "param": "sport"
  }
}
  • code — stable identifier; safe to switch on in code
  • message — human-readable; may change over time, do not switch on
  • request_id — include when contacting support
  • param — present when a specific parameter caused the error
  • documentation_url — deep link to the error in our docs

HTTP status codes

StatusMeaning
200Success
400Bad request — fix the request and retry
401Unauthorized — invalid or missing API key
403Forbidden — tier insufficient or resource restricted
404Not found — resource doesn't exist
409Conflict — idempotency-key clash, or duplicate webhook
422Unprocessable — request shape OK, but semantically invalid
429Rate limited — back off and retry
500Server error — retry with exponential backoff
503Service unavailable — partial outage, check status page

Error code reference

CodeStatusDescription & resolution
unauthorized401API key missing, malformed, or revoked. Check the Authorization header.
tier_insufficient403The endpoint requires a tier your plan doesn't include. Upgrade or scope down.
scope_denied403Restricted key tried to access a resource outside its scope.
resource_not_found404The path is valid but no resource with the given ID exists.
invalid_parameter400One of your query params is malformed. Check param for which one.
missing_parameter400A required parameter is missing.
idempotency_conflict409Same idempotency key used with a different body. Use a new key.
rate_limited429Slow down. Honour retry_after_seconds.
internal_error500We had a problem. Retry with backoff. Persisting? Open a support ticket.
service_unavailable503Partial outage. Check status.sportapi.io.