Skip to content
API documentation

Error Handling

Errors use stable codes so customer integrations can handle auth, rate-limit, validation, and upstream freshness cases.

On this page

Error payload

Every error returns a machine-readable code and a short human message. Rate-limit errors also include error.rate_limit so clients can pause one key, surface the reset time, and avoid aggressive retries.

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Daily API key request limit has been reached.",
    "rate_limit": {
      "scope": "api_key",
      "window": "utc_day",
      "limit": 3000,
      "used": 3000,
      "remaining": 0,
      "reset_at": "2026-05-27T00:00:00.000Z",
      "retry_after_seconds": 3600,
      "hint": "Pause this API key until reset_at or raise the key daily limit in account API key settings."
    }
  }
}

Common status codes

Use 400 for validation, 401 for missing/invalid credentials, 403 for scope/plan mismatch, 404 for unknown lottery or draw, 429 for rate limits, and 503 for temporary feed freshness issues.