Skip to main content
The Knowledge base API gives you programmatic access to the documents that power your agent’s knowledge base. YYou can use it to create, retrieve, update, and delete documents, as well as manage their metadata and individual chunks.

Endpoints

EndpointDescription
Document
GET Search documentsRetrieve all documents in a project, or filter by type, page, and limit.
GET Get documentFetch a single document by ID, including its chunks and metadata.
POST Create documentAdd a new document to the knowledge base from a URL or integration source.
POST Upload table documentUpload structured table data as a knowledge base document, with optional chunking and LLM processing settings.
PUT Replace documentReplace an existing document’s source and metadata entirely.
PATCH Update document metadataUpdate the metadata fields on an existing document without replacing it.
PATCH Update chunk metadataUpdate the metadata on a specific chunk within a document.
DEL Delete documentPermanently remove a document from the knowledge base by ID.

Documents

Documents are the content sources your agent draws from when answering questions. Each document has a type — URL, PDF, DOCX, plain text, CSV, XLSX, or table — and is processed into chunks that get indexed for retrieval. You can create documents from a URL or external integration, upload structured table data directly, or replace an existing document entirely when its source changes. URL documents support a refreshRate setting (daily, weekly, monthly, or never) that controls how often Voiceflow re-fetches and re-indexes the content.

Chunks and metadata

When a document is processed, it’s split into chunks — smaller segments of content that are individually indexed and retrieved during conversations. You can update the metadata on a specific chunk to add context that improves retrieval accuracy without modifying the document itself. Document-level metadata works the same way: use Update document metadata to attach or modify key-value pairs on a document without replacing its source content.