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

# Error Codes

> HTTP status codes and error response format used by the NeevLegal API.

All error responses follow a consistent structure.

## Error Response Format

```json theme={null}
{
  "success": false,
  "message": "API key not found or has been revoked.",
  "moreInfo": "No additional info found."
}
```

| Field | Type | Description |
| :- | :- | :- |
| `success` | boolean | Always `false` for error responses |
| `message` | string | Human-readable description of the error |
| `moreInfo` | string | Additional context when available |

## HTTP Status Codes

| Status | Name | When it occurs |
| :- | :- | :- |
| `200` | OK | Request succeeded |
| `400` | Bad Request | Request body or parameters failed validation |
| `401` | Unauthorized | Key is missing, malformed, expired, or revoked |
| `403` | Forbidden | Key is valid but lacks the required scope |
| `404` | Not Found | The resource does not exist |
| `409` | Conflict | Request conflicts with existing state |
| `422` | Unprocessable Entity | Request is valid but cannot be processed |
| `429` | Too Many Requests | Rate limit exceeded — see `Retry-After` header |
| `500` | Internal Server Error | Unexpected server error |

## 401 vs 403

A `401` means the key could not be authenticated at all — it is missing, expired, or revoked. A `403` means the key authenticated successfully but its scopes do not permit the requested operation.

To resolve a `403`, generate a new key with the required scope from the Developer Portal under **Settings → API Keys**.

## Validation Errors

When a `400` is returned, the `message` field identifies the offending field:

```json theme={null}
{
  "success": false,
  "message": "cnrNumber: CNR number must be exactly 16 characters",
  "moreInfo": "No additional info found."
}
```


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