Upload a source file for knowledge processing. The API returns a fileId and fileUrl that can be referenced by a knowledge-processing task.
Supported file types:
- PDF:
application/pdf - Word:
application/vnd.openxmlformats-officedocument.wordprocessingml.document - Excel:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel - TXT:
text/plain - Markdown:
text/markdown,text/mdx - HTML:
text/html - CSV:
text/csv
Limits:
- Maximum file size: 15 MB
- Maximum file-name length: 256 characters
Security
bearerAuth
- Mock serverhttps://threechatai.redocly.app/_mock/apis/3chat-api/api/open/v4/butler/files
- 3Chat production serverhttps://app.3chat.ai/api/open/v4/butler/files
curl -i -X POST \
https://threechatai.redocly.app/_mock/apis/3chat-api/api/open/v4/butler/files \
-H 'Authorization: Bearer <YOUR_Access Token_HERE>' \
-H 'Content-Type: multipart/form-data' \
-F file=string \
-F purpose=knowledge \
-F fileName=stringResponse
{ "code": 200, "message": "success", "data": { "fileId": "0d4e6d3c-4687-4cd8-95b7-2006565c66c2", "fileName": "test-file.md", "mimeType": "text/markdown", "sizeBytes": 2344, "purpose": "knowledge", "fileUrl": "https://files.example.com/knowledge/example.md", "sha256": "a5450fbff557fef5dc28266e28268823a75a47b228707e5b1a77039ab2a24f5e", "createdAt": 1778208611781 } }