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

# Errors

> HTTP status codes and error response format.

## Error response format

All errors follow a consistent JSON structure:

```json theme={null}
{
  "error": "Error Type",
  "message": "Human-readable description of what went wrong."
}
```

## HTTP status codes

| Status | Meaning | Common cause |
| - | - | - |
| `200` | OK | Request succeeded |
| `400` | Bad Request | Missing or malformed request body / parameter |
| `401` | Unauthorized | Missing, invalid, or revoked API key |
| `402` | Payment Required | No credits remaining on the account |
| `422` | Unprocessable Entity | Input failed validation (e.g. invalid email format) |
| `429` | Too Many Requests | Rate limit exceeded — see [Rate Limits](https://www.datalinkapis.com/docs/rate-limits.md) |
| `500` | Internal Server Error | Unexpected server-side error |
| `503` | Service Unavailable | Upstream provider temporarily unavailable |

## Common errors

> [accordion] 401 — Invalid API key
>
> ```json theme={null}
> {
>   "error": "Unauthorized",
>   "message": "Invalid or missing API key."
> }
> ```
>
> Check that your key is correctly formatted and included in the `Authorization: Bearer` header.

> [accordion] 400 — Missing required field
>
> ```json theme={null}
> {
>   "error": "Bad Request",
>   "message": "Required field 'email' is missing from the request body."
> }
> ```
>
> Ensure your request body contains all required fields for the endpoint you are calling.

> [accordion] 402 — Insufficient credits
>
> ```json theme={null}
> {
>   "error": "Payment Required",
>   "message": "Insufficient credits. Top up your account or upgrade your plan."
> }
> ```
>
> Your credit balance has reached zero. Purchase a top-up from the [billing page](https://datalinkapis.com/dashboard/billing) or upgrade your plan.

> [accordion] 422 — Validation error
>
> ```json theme={null}
> {
>   "error": "Unprocessable Entity",
>   "message": "The value provided for 'email' is not a valid email address."
> }
> ```
>
> The input passed basic format validation but failed deeper validation. Check the `message` field for specifics.

> [accordion] 503 — Upstream unavailable
>
> ```json theme={null}
> {
>   "error": "Service Unavailable",
>   "message": "One or more upstream providers are currently unavailable. Please retry shortly."
> }
> ```
>
> DataLink routes through multiple upstream providers with automatic failover. A `503` means all providers for this data type are temporarily unreachable. Check [status.datalinkapis.com](https://status.datalinkapis.com) for live platform health.


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