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

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.

Knowledge base and environments

The knowledge base is project-wide: every environment in the project points at the same set of documents, and editing a document’s content affects all of them. Individual environments hold their own pointers into that shared set, so you can add a document from a non-Main environment and only that environment will see it until the environment is merged into Main. Knowledge base API endpoints accept an optional environment alias parameter. When provided, the request targets the document pointers for that environment.