# HTTP status codes

The status code tells you whether to fix the request or try again.

## Status codes

| Code | Meaning | What to do |
| --- | --- | --- |
| `400` Bad Request | A parameter is missing or the body has a syntax error. | Check the body against the endpoint’s Body params. |
| `401` Unauthorized | The API key is missing, wrong or not active yet. | Check the key and the `Bearer` prefix. |
| `402` Payment Required | The project is out of credit. | Top up credit in the project administration. |
| `403` Forbidden | The key is valid but not allowed here, usually an IP restriction. | Check the IP restriction of the key. |
| `404` Not Found | The URL does not exist. | Check the endpoint URL. |
| `405` Method Not Allowed | Wrong HTTP method. All endpoints use POST. | Send the request as POST. |
| `429` Too Many Requests | You exceeded the rate limit. | Wait and retry with backoff. Watch the rate limit headers. |
| `500` Internal Server Error | Something failed on our side. | Retry later. If it persists, contact support. |
| `503` Service Unavailable | The service is temporarily down. | Retry later. Check the status page. |

Retry only 429 and 5xx, with growing pauses: 1 s, 2 s, 4 s and so on. Other 4xx errors fail the same way again.

## The errors object

**Error response**

```json
{
  "status": 400,
  "errors": [
    {
      "group": "REQUEST",
      "type": "BODY",
      "subtype": "EMPTY",
      "severity": "critical",
      "relatedTo": [],
      "description": "Cannot process the request because of the empty body."
    }
  ]
}
```

| Field | Meaning |
| --- | --- |
| `group` | Category: REQUEST, SYNTAX, VALUE, FORMAT or INTERNAL. |
| `type` | What kind of problem it is. |
| `subtype` | Detail of the type, can be null. |
| `severity` | `info` cosmetic, `warning` may change the meaning, `critical` blocks the result. |
| `relatedTo` | Which inputs the error belongs to. |
| `description` | Text for people. Do not parse it, use group, type and subtype. |

All values of group, type and subtype are in [Validator errors and fixes](errors.html).
