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

# Errors

> Response envelope, error codes, and retry guidance.

Every Public API response uses the same JSON envelope regardless of whether
the request succeeded:

```json theme={null}
{
  "status": "success",
  "code": 200,
  "name": "OK",
  "message": "...",
  "info": { }
}
```

| Field | Description |
| - | - |
| `status` · string | `"success"` for 2xx responses, `"error"` for non-2xx. |
| `code` · integer | HTTP status code (200, 201, 422, 500, …). Mirrors the HTTP response code. |
| `name` · string | Short HTTP status name — `"OK"`, `"Created"`, `"Unprocessable Entity"`, … |
| `message` · string | Human-readable result summary. |
| `info` · object | Payload. Omitted when the response carries no data. |

> [!NOTE]
>
> The HTTP status code is the authoritative signal. `code` and `status`
> duplicate it for clients that cannot easily inspect HTTP headers.

## Standard error responses

| HTTP status | When you see it |
| - | - |
| `400 Bad Request` | Invalid JSON, unknown parameter, or malformed request. |
| `401 Unauthorized` | Missing or invalid API key (`X-API-Key` header or `api-key` query param), or `api_status` disabled. |
| `403 Forbidden` | Key is valid but belongs to a different role. |
| `404 Not Found` | Resource not found or not visible to this account. |
| `422 Unprocessable Entity` | Validation failed — see `info.errors`. |
| `429 Too Many Requests` | A rate limit was hit, such as the two-factor code send limit. The request itself is valid. |
| `500 Internal Server Error` | Server-side problem. Retry with backoff. |

## Validation errors (422)

When validation fails the server returns `422`. Each key in `info.errors`
is the failing field name; the value is an array of error strings:

```json theme={null}
{
  "status": "error",
  "code": 422,
  "name": "Unprocessable Entity",
  "message": "Validation error",
  "info": {
    "errors": {
      "email":    ["Email cannot be blank."],
      "currency": ["Currency must be a valid ISO code."]
    }
  }
}
```

## Retry guidance

* `4xx` — client problem, fix the request before retrying.
* `429` — the exception to `4xx`: do not change the request, wait for the
  limit's window to pass and send it again. The endpoint's description names
  the window (for example 5 minutes for two-factor codes).
* `5xx` — transient server problem. Retry with exponential backoff
  (start 1 s, max 60 s, add 0–25% jitter).
* `GET` and `PUT` on a known resource are always safe to retry.


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