> ## Documentation Index
> Fetch the complete documentation index at: https://docsv2.sportxapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors & Status Codes

> HTTP status codes and error formats returned by the SportXAPI Cricket API.

SportXAPI returns standard HTTP response codes to indicate the success or failure of an API request. In general:

* `2xx` codes indicate success.
* `4xx` codes indicate an error from the client (e.g. invalid parameter or missing key).
* `5xx` codes indicate an upstream or temporary server issue.

## Error Codes

| Status | Code | Description & Resolution |
| :- | :- | :- |
| `200` | OK | The request succeeded and returned structured JSON data. |
| `400` | Bad Request | Parameters or filters are malformed. Check IDs and parameter syntax. |
| `401` | Unauthorized | Missing, invalid, or expired `X-API-Key` header. |
| `403` | Forbidden | Your plan does not include access to this endpoint tier or feature. |
| `404` | Not Found | The requested resource (e.g., `matchId`, `teamId`, `playerId`) does not exist. |
| `429` | Too Many Requests | Rate limit or monthly plan quota reached. Upgrade plan or wait for reset. |
| `500` / `502` | Server Error | Temporary backend or upstream provider issue. Retry with exponential backoff. |

## Error Response Format

Errors are returned as a JSON object:

```json theme={null}
{
  "error": "Unauthorized: Missing or invalid API key",
  "code": 401
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.