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

# Response Format

> Standard JSON structure returned by all Octavia AI CMS API endpoints.

All **Octavia AI CMS** endpoints return responses in a consistent, predictable JSON structure.
This unified format ensures reliable parsing and standardized error handling across all SDKs and integrations.

***

## Envelope structure

```ts theme={null}
export type ApiResponse<T = any> = {
  success: boolean;
  statusCode: number;
  message: string;
  data: T | null;
};
```

### Field descriptions

| Field          | Type        | Description                                                                            |
| -------------- | ----------- | -------------------------------------------------------------------------------------- |
| **success**    | `boolean`   | Indicates whether the request succeeded. `true` for 2xx, `false` for others.           |
| **statusCode** | `number`    | HTTP status code returned by the API. Mirrors the actual HTTP response status.         |
| **message**    | `string`    | Human-readable summary of the outcome. Defaults to a standard message based on status. |
| **data**       | `T or null` | Contains the actual response payload. `null` when no data is returned or on errors.    |

***

## Example responses

### ✅ Success (200 OK)

```json theme={null}
{
  "success": true,
  "statusCode": 200,
  "message": "Request successful",
  "data": {
    "id": "art_123",
    "title": "Introducing AI CMS"
  }
}
```

***

### 🆕 Resource created (201 Created)

```json theme={null}
{
  "success": true,
  "statusCode": 201,
  "message": "Resource created successfully",
  "data": {
    "id": "art_456"
  }
}
```

***

### 🚫 Validation error (422 Unprocessable Entity)

```json theme={null}
{
  "success": false,
  "statusCode": 422,
  "message": "Unprocessable entity",
  "data": {
    "field": "title",
    "error": "Title is required"
  }
}
```

***

### 🧱 No content (204)

```json theme={null}
{
  "success": true,
  "statusCode": 204,
  "message": "No content",
  "data": null
}
```

***

## Next Steps

<Card title="Status Codes" icon="list" href="/api-reference/ai-cms/status-codes" arrow="true">
  Explore all supported HTTP status codes, default messages, and their meanings.
</Card>
