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

# Errors

> Error format and common status codes.

### Error responses

Most JSON error responses include an `error` string and may include a `message` with additional detail:

```json theme={null}
{
  "error": "string",
  "message": "string (optional)"
}
```

Some validation endpoints return an `errors` array instead:

```json theme={null}
{
  "errors": ["string"]
}
```

Some authorization failures return `403 Forbidden` with an empty response body. Check the HTTP status code first, then parse the response body when one is present.

### Common status codes

* 400: The request was invalid or malformed.
* 401: Unauthorized - Missing or invalid authentication.
* 403: Forbidden - You don't have permission, required feature access, or remaining quota for the requested operation.
* 404: Resource not found.
* 429: Rate limit or account quota exceeded.
* 500: Unexpected error while processing the request.

### Examples

#### 401 Unauthorized

```json theme={null}
{
  "error": "Unauthorized",
  "message": "Missing or invalid bearer token"
}
```

#### 400 Bad Request

```json theme={null}
{
  "error": "property_ids is required and must be a non-empty array"
}
```

#### 429 Too Many Requests

Request rate limits return rate-limit headers and a plain text body:

```http theme={null}
HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: <limit>
X-RateLimit-Reset-After: <window_seconds>
X-RateLimit-Reset: <reset_unix_timestamp>
Retry-After: <seconds_until_retry>
Content-Type: text/plain

You have exceeded the rate limit for this API.
```

Account quota limits return JSON:

```json theme={null}
{
  "error": "Trial API quota limit exceeded",
  "quota_limit": 5000,
  "quota_usage": 5001
}
```

See [Rate Limits](/v1/rate-limits) for details on rate limit headers and retry timing.
