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

# Errors

> One envelope, typed codes, a param when a field is to blame.

Every error responds with the same envelope:

```json theme={null}
{
  "error": {
    "type": "invalid_request_error",
    "code": "parameter_invalid",
    "message": "url must be http(s)",
    "param": "url"
  }
}
```

| HTTP | type                    | codes                                                         |
| ---- | ----------------------- | ------------------------------------------------------------- |
| 401  | `authentication_error`  | `missing_api_key`, `invalid_api_key`                          |
| 404  | `invalid_request_error` | `resource_missing`                                            |
| 405  | `invalid_request_error` | `method_not_allowed`                                          |
| 409  | `invalid_request_error` | `resource_archived`, `idempotency_conflict`                   |
| 422  | `invalid_request_error` | `parameter_invalid`, `parameter_missing`, `parameter_unknown` |
| 429  | `rate_limit_error`      | `rate_limited`                                                |
| 500  | `api_error`             | `internal`                                                    |

Notes:

* **Validation errors are `422`** (not 400): the request was well-formed but a value was refused; `error.param` names the field.
* **`resource_archived` (409)** protects intent: an archived source stays archived until you explicitly restore it — a sync must not silently resurrect something an owner removed from their agents. The message includes the restore call.
* **DELETE answers 405**: sources are never destroyed, only archived — history (citations, conversations that used the source) stays intact.
