---
title: "Add manual, FAQ, file, or public URL knowledge"
---

> 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 Knowledge Studio

`POST /api/knowledge-studio/sources`

## Request body

_Required._

- `title` (`post/api/knowledge-studio/sources.title`; string, required)
- `source_type` (`post/api/knowledge-studio/sources.source_type`; string, required)
  - one of `"manual"`, `"faq"`, `"file"`, `"url"`
- `category` (`post/api/knowledge-studio/sources.category`; string, optional)
- `content` (`post/api/knowledge-studio/sources.content`; string, optional)
- `source_url` (`post/api/knowledge-studio/sources.source_url`; string, optional)
- `citation_mode` (`post/api/knowledge-studio/sources.citation_mode`; string, optional)
  - one of `"internal"`, `"when_helpful"`, `"always"`
- `agent_config_id` (`post/api/knowledge-studio/sources.agent_config_id`; string, optional)
  - format `uuid`
- `file` (`post/api/knowledge-studio/sources.file`; string, optional)
  - format `binary`

## Example request

```text
{
  "title": "string",
  "category": "string",
  "source_type": "manual",
  "content": "string",
  "source_url": "string",
  "citation_mode": "internal",
  "agent_config_id": "ad864fb7-5a30-4692-ba6e-a3153683a0d2",
  "file": "<file>"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.channelautomation.com/api/knowledge-studio/sources \
  --form-string 'title=string' \
  --form-string 'category=string' \
  --form-string 'source_type=manual' \
  --form-string 'content=string' \
  --form-string 'source_url=string' \
  --form-string 'citation_mode=internal' \
  --form-string 'agent_config_id=ad864fb7-5a30-4692-ba6e-a3153683a0d2' \
  --form 'file=@<file>;type=application/octet-stream'
```

### TypeScript

```typescript
import { readFile } from 'node:fs/promises';

const formData = new FormData();
formData.append('title', 'string');
formData.append('category', 'string');
formData.append('source_type', 'manual');
formData.append('content', 'string');
formData.append('source_url', 'string');
formData.append('citation_mode', 'internal');
formData.append('agent_config_id', 'ad864fb7-5a30-4692-ba6e-a3153683a0d2');
formData.append('file', new Blob([await readFile('<file>')]), '<file>');

const url = 'https://api.channelautomation.com/api/knowledge-studio/sources';
const options = {method: 'POST', body: formData};

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/knowledge-studio/sources"

files = [
    ("file", ("<file>", open("<file>", "rb"), "application/octet-stream"))
]
payload = {
    "title": "string",
    "category": "string",
    "source_type": "manual",
    "content": "string",
    "source_url": "string",
    "citation_mode": "internal",
    "agent_config_id": "ad864fb7-5a30-4692-ba6e-a3153683a0d2"
}

response = requests.post(url, data=payload, files=files)

print(response.text)
```

## Responses

### 201

Source created and chunked


Source: https://developer.channelautomations.com/api/post-api-knowledge-studio-sources/index.md
