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

# Errors

> How the Unblocked API formats error responses and what each status code means

When a request to the Unblocked API fails, the response body is a JSON object with a `status` field containing the HTTP status code.

```json theme={null}
{
  "status": 401
}
```

## Status codes

| Status | Description |
| - | - |
| 400 | Bad request. The request body or parameters are invalid. |
| 401 | Unauthorized. The request is missing a valid API token, or the token is invalid or expired. |
| 403 | Forbidden. The API token doesn't have permission to perform this action. |
| 404 | Not found. The requested resource doesn't exist, or you don't have access to it. |
| 429 | Too many requests. You've exceeded a rate limit. See [Rate limits](/api-reference/rate-limits). |
| 500 | Internal server error. An unexpected error occurred on the server. |
| 502 | Bad gateway. The API couldn't connect to an upstream service. |
| 504 | Gateway timeout. An upstream service didn't respond in time. |

## Retrying failed requests

502 and 504 responses are transient. Retry the request with a short delay between attempts.

A 500 response may also be transient, but retrying isn't guaranteed to succeed. If it persists, [contact us](https://getunblocked.com/dashboard?showIntercom=true).

For 429 responses, wait before retrying. See [Rate limits](/api-reference/rate-limits) for current limits.
