API ReferenceKnowledge Base
Overview
Manage knowledge base collections and documents, and search them, via the API
A knowledge base gives an agent grounded answers from your own documents instead of relying purely on the model's own knowledge. Documents belong to a collection (every organization gets a Default collection automatically), and one or more collections are assigned to a workflow to control what it can retrieve from.
| Method | Endpoint | Quick Link |
|---|---|---|
GET | /knowledge-base/collections | List collections |
POST | /knowledge-base/collections | Create a collection |
PATCH | /knowledge-base/collections/{collection_uuid} | Update a collection |
DELETE | /knowledge-base/collections/{collection_uuid} | Delete a collection |
GET | /knowledge-base/workflows/{workflow_id}/collections | Get a workflow's collections |
PUT | /knowledge-base/workflows/{workflow_id}/collections | Set a workflow's collections |
POST | /knowledge-base/upload-url | Get a document upload URL |
POST | /knowledge-base/process-document | Process an uploaded document |
POST | /knowledge-base/documents/from-url | Add a document from a URL |
GET | /knowledge-base/documents | List documents |
GET | /knowledge-base/documents/{document_uuid} | Get a document |
DELETE | /knowledge-base/documents/{document_uuid} | Delete a document |
POST | /knowledge-base/search | Search chunks |
Uploading a document is a two-step flow: get a presigned upload URL, PUT the file to it directly, then call Process an uploaded document to create the document record and trigger chunking/embedding.