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

# Errors & responses

> The standard Delogue API response envelope and error format.

## The response envelope

Every response — success or error — uses the same envelope:

```json theme={"dark"}
{
  "status": "success",
  "code": "ok",
  "data": { },
  "error": null,
  "pagination": { }
}
```

| Field        | Description                                                        |
| ------------ | ------------------------------------------------------------------ |
| `status`     | `"success"` or `"error"`.                                          |
| `code`       | A short, machine-readable result code.                             |
| `data`       | The payload (object or array). `null` on error.                    |
| `error`      | Error details. `null` on success.                                  |
| `pagination` | Present on list responses. See [Pagination](/concepts/pagination). |

## Error format

On failure, `error.details[]` carries one row per problem:

```json theme={"dark"}
{
  "status": "error",
  "code": "validation_error.required_field",
  "error": {
    "details": [
      { "type": "validation_error.required_field", "field": "name", "value": "Name is required." }
    ]
  }
}
```

* `type` — a hierarchical error code (`validation_error.too_long`, `resource_error.brand_not_found`, …).
* `field` — the offending input field, or omitted when no single field is at fault.
* `value` — a human-readable message.

## Status codes

| Status | Meaning                                            |
| ------ | -------------------------------------------------- |
| 200    | Success.                                           |
| 201    | Resource created.                                  |
| 400    | Validation error (malformed or invalid input).     |
| 401    | Unauthenticated — missing or invalid API key.      |
| 403    | Authenticated but not authorized for the resource. |
| 404    | Resource not found.                                |
| 409    | Conflict — e.g. a duplicate resource.              |
| 422    | Business rule violation.                           |
| 500    | Unexpected server error.                           |
