v5
latestOpenAPI 3.1.02026-08-081,0211,3082.1 MBKnowledge Bases V2
Upload To Existing Kb
Upload a new document version to an existing knowledge base.
This endpoint supports two modes:
- File Upload: Provide 'file' parameter with document (PDF, DOCX, MD, TXT)
- Markdown Content: Provide 'markdown_content' parameter with markdown text
Process:
- Validates knowledge base exists and user has access
- Creates document record (gets version number)
- Uploads content to S3 with kb_id/version path
- Updates document with S3 path
- Returns document info for async processing
The new version will become active only after processing completes successfully. The previous version remains active until the new one is ready.
Note: You must provide either 'file' OR 'markdown_content', but not both.
post/knowledge_bases/v2/{kb_id}/upload
Path parameters
kb_idinteger required
Response
Successful Response