---
title: "Expand Content"
description: "Elaborate on brief content by adding details, examples, context, \nor specific information to make it more comprehensive.\n\n**Note**: This endpoint is deployed on Cloudflare Workers at `https://ai-notes.customerconnects.app`\n"
---

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

Path: Channel Automation API › AI

`POST /api/notes/expand`

Elaborate on brief content by adding details, examples, context, 
or specific information to make it more comprehensive.

**Note**: This endpoint is deployed on Cloudflare Workers at `https://ai-notes.customerconnects.app`

## Authentication

Requires one of the following:

- `NoAuth`
- `ApiKeyAuth`, apiKey, in header, header `X-API-Key`, format `API_KEY`

## Header parameters

- `X-Workspace-Id` (`post/api/notes/expand.header.X-Workspace-Id`; string, required) — Workspace ID for data isolation

## Request body

_Required._

- `workspaceId` (`post/api/notes/expand.workspaceId`; integer, required)
  - example `12345`
- `content` (`post/api/notes/expand.content`; string, required)
  - example `"AI chatbots improve customer service efficiency."`
- `expandType` (`post/api/notes/expand.expandType`; string, optional)
  - one of `"elaborate"`, `"examples"`, `"context"`, `"details"`; default `"elaborate"`; example `"examples"`
- `noteId` (`post/api/notes/expand.noteId`; string, optional)
  - example `"note_123"`
- `options` (`post/api/notes/expand.options`; object, optional)

## Example requests

### Basic elaboration

```json
{
  "workspaceId": 15213,
  "content": "AI chatbots improve customer service efficiency.",
  "expandType": "elaborate"
}
```

### Add examples

```json
{
  "workspaceId": 15213,
  "content": "Machine learning models can predict customer behavior.",
  "expandType": "examples"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.channelautomation.com/api/notes/expand \
  --header 'Content-Type: application/json' \
  --header 'X-Workspace-Id: 15213' \
  --data '
{
  "workspaceId": 15213,
  "content": "AI chatbots improve customer service efficiency.",
  "expandType": "elaborate"
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/notes/expand';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', 'X-Workspace-Id': '15213'},
  body: JSON.stringify({
    workspaceId: 15213,
    content: 'AI chatbots improve customer service efficiency.',
    expandType: 'elaborate'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/notes/expand"

payload = {
    "workspaceId": 15213,
    "content": "AI chatbots improve customer service efficiency.",
    "expandType": "elaborate"
}
headers = {
    "Content-Type": "application/json",
    "X-Workspace-Id": "15213"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Content expanded successfully

#### Example

```json
{
  "success": true,
  "original": "AI chatbots improve customer service efficiency.",
  "expanded": "AI chatbots significantly improve customer service efficiency by automating routine inquiries...",
  "expandType": "examples",
  "metadata": {
    "tokensUsed": 187,
    "processingTime": 4567,
    "model": "gpt-4o",
    "expansionRatio": 8.7
  }
}
```

- `success` (`post/api/notes/expand.response.200.success`; boolean, optional)
  - example `true`
- `original` (`post/api/notes/expand.response.200.original`; string, optional)
  - example `"AI chatbots improve customer service efficiency."`
- `expanded` (`post/api/notes/expand.response.200.expanded`; string, optional)
  - example `"AI chatbots significantly improve customer service efficiency by automating routine inquiries..."`
- `expandType` (`post/api/notes/expand.response.200.expandType`; string, optional)
  - example `"examples"`
- `metadata` (`post/api/notes/expand.response.200.metadata`; object, optional)
  - `tokensUsed` (`post/api/notes/expand.response.200.metadata.tokensUsed`; integer, optional)
    - example `187`
  - `processingTime` (`post/api/notes/expand.response.200.metadata.processingTime`; integer, optional)
    - example `4567`
  - `model` (`post/api/notes/expand.response.200.metadata.model`; string, optional)
    - example `"gpt-4o"`
  - `expansionRatio` (`post/api/notes/expand.response.200.metadata.expansionRatio`; number, optional)
    - example `8.7`


Source: https://developer.channelautomations.com/api/post-api-notes-expand/index.md
