Knowledge Base
Upload Knowledge Base Document
Upload a knowledge base document to store and index a PDF or TXT file for agent retrieval.
POST
Upload Knowledge Base Document
Changes state - verify before retry
Upload a knowledge base document to store and index a PDF or TXT file for agent retrieval. The knowledge base must already exist in the authenticated workspace.
Optional
Before you begin
- Create a knowledge base and keep its
kb_ID. - Prepare a PDF or TXT file no larger than 100 MB (104857600 bytes).
- Choose a non-empty title unique within that knowledge base. Each knowledge base allows 25 non-deleted documents.
Upload Knowledge Base Document Request
description and source fields describe the file. Let your HTTP client set the multipart boundary.
Verify the result
A201 response contains the created document in data, including its ID, title, knowledge base ID, file type, and size. List Knowledge Base Documents and confirm the file is present. Attach the knowledge base to the intended agent and ask a test question covered by the document.
Errors and recovery
Uploading stores a file and indexes its content. It is not an idempotent replacement operation. After an uncertain response, list documents before retrying; changing the title can create duplicate content. To replace an existing document, use dashboard document management.
Related endpoints
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
multipart/form-data