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

# Response Format

> Standard structure of API responses

## Success Response

All successful responses follow this pattern:

```json theme={null}
{
  "success": true,
  "data": {
    // Response data
  }
}
```

## List Response

Listings include pagination metadata:

```json theme={null}
{
  "success": true,
  "data": [
    // Array of items
  ],
  "pagination": {
    "total": 100,
    "limit": 20,
    "offset": 0,
    "has_more": true
  }
}
```

## Error Response

Errors follow a consistent pattern:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Human readable error description",
    "details": {
      // Additional information when available
    }
  }
}
```

## HTTP Status Codes

| Code  | Description                      |
| ----- | -------------------------------- |
| `200` | Success                          |
| `201` | Created                          |
| `204` | No Content (successful deletion) |
| `400` | Bad Request                      |
| `401` | Unauthorized                     |
| `403` | Forbidden                        |
| `404` | Not Found                        |
| `409` | Conflict                         |
| `429` | Rate Limit Exceeded              |
| `500` | Internal Error                   |

## Pagination

<ParamField query="limit" type="integer" default="20">
  Maximum number of items to return (max: 100)
</ParamField>

<ParamField query="offset" type="integer" default="0">
  Number of items to skip
</ParamField>

### Example

```bash theme={null}
GET /backend/leads?limit=50&offset=100
```

## Filters

Most list endpoints support common filters:

<ParamField query="search" type="string">
  Text search in relevant fields
</ParamField>

<ParamField query="created_after" type="string">
  Filter by creation date (ISO 8601)
</ParamField>

<ParamField query="created_before" type="string">
  Filter by creation date (ISO 8601)
</ParamField>

### Example

```bash theme={null}
GET /backend/leads?search=john&created_after=2024-01-01T00:00:00Z
```
