> ## Documentation Index
> Fetch the complete documentation index at: https://docs.verbeo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Bases

> Create knowledge bases, upload files to them in one call, add text and FAQs, and manage what your assistants search during calls. The knowledge base and file objects, plan limits and error codes.

A **knowledge base** is a set of documents an assistant can search during a call: price lists, FAQs, policies, manuals. You upload files; Verbeo reads each one, splits it into short passages and indexes them by meaning. An assistant searches the knowledge bases in its [`config.kbStoreIds`](https://docs.verbeo.ai/api-reference/assistants/overview#the-configuration-document) whenever a caller asks something your files may answer. [Knowledge Base for AI Agents](https://docs.verbeo.ai/concepts/knowledge-base.md) explains how agents use it.

## Endpoints

| Endpoint | Purpose |
| - | - |
| [`GET /knowledge-base`](https://docs.verbeo.ai/api-reference/knowledge-bases/list) | List your knowledge bases, each with its file counts |
| [`POST /knowledge-base`](https://docs.verbeo.ai/api-reference/knowledge-bases/create) | Create one, empty or with its first files in the same call |
| [`GET /knowledge-base/{id}`](https://docs.verbeo.ai/api-reference/knowledge-bases/get) | One knowledge base |
| [`PUT /knowledge-base/{id}`](https://docs.verbeo.ai/api-reference/knowledge-bases/update) | Edit the description your assistants read |
| [`POST /knowledge-base/{id}/description`](https://docs.verbeo.ai/api-reference/knowledge-bases/write-description) | Write the description from the files again |
| [`DELETE /knowledge-base/{id}`](https://docs.verbeo.ai/api-reference/knowledge-bases/delete) | Delete a knowledge base and all its files |
| [`GET /knowledge-base/usage`](https://docs.verbeo.ai/api-reference/knowledge-bases/usage) | Your plan's limits and what you use of them |
| [`POST /knowledge-base/search`](https://docs.verbeo.ai/api-reference/knowledge-bases/search) | Test what an assistant's search finds for a question |
| [`GET /knowledge-base/{id}/files`](https://docs.verbeo.ai/api-reference/knowledge-bases/list-files) | A knowledge base's files |
| [`POST /knowledge-base/{id}/files`](https://docs.verbeo.ai/api-reference/knowledge-bases/upload-files) | Upload files: up to 25 files and 25 MB in one call |
| [`POST /knowledge-base/{id}/texts`](https://docs.verbeo.ai/api-reference/knowledge-bases/add-text) | Add a text, or a list of questions and answers |
| [`GET /knowledge-base/files/{fileId}`](https://docs.verbeo.ai/api-reference/knowledge-bases/get-file) | One file: check whether it is ready |
| [`POST /knowledge-base/files/{fileId}/replace`](https://docs.verbeo.ai/api-reference/knowledge-bases/replace-file) | Upload a new version of a file |
| [`PUT /knowledge-base/files/{fileId}/text`](https://docs.verbeo.ai/api-reference/knowledge-bases/edit-text) | New words for a text or an FAQ list |
| [`POST /knowledge-base/{id}/files/retry`](https://docs.verbeo.ai/api-reference/knowledge-bases/retry-files) | Process failed files again |
| [`DELETE /knowledge-base/files/{fileId}`](https://docs.verbeo.ai/api-reference/knowledge-bases/delete-file) | Delete a file |
| [`POST /knowledge-base/{id}/files/delete`](https://docs.verbeo.ai/api-reference/knowledge-bases/delete-files) | Delete several files |
| [`GET /knowledge-base/files/{fileId}/passages`](https://docs.verbeo.ai/api-reference/knowledge-bases/passages) | What an assistant reads from a file |
| [`GET /knowledge-base/files/{fileId}/download`](https://docs.verbeo.ai/api-reference/knowledge-bases/download) | A link that downloads the file |
| [`POST /knowledge-base/{id}/files` (JSON)](https://docs.verbeo.ai/api-reference/knowledge-bases/upload-link) | Upload through a link instead: resumable, for slow connections |

The workspace comes from your API key, so no endpoint asks you for a workspace id.

## From files to an assistant that uses them

**1. Create the knowledge base with its files**

One call creates it and uploads its first files. The answer comes back once the files are stored, each one `processing`.

```bash theme={null}
curl -X POST "https://api.verbeo.ai/v1/knowledge-base" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "display_name=Clinic FAQ" \
  -F "files=@prices.pdf" \
  -F "files=@opening-hours.docx"
```

**2. Wait until it is ready**

Read the knowledge base until `processing_count` is `0`. A small file is usually ready within a minute; a large one can take several minutes.

```bash theme={null}
curl "https://api.verbeo.ai/v1/knowledge-base/KNOWLEDGE_BASE_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**3. Attach it to an assistant**

Add its id to the assistant's `kbStoreIds`. A `PATCH` replaces the whole list, so send every knowledge base the assistant should search.

```bash theme={null}
curl -X PATCH "https://api.verbeo.ai/v1/assistant/ASSISTANT_ID" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "config": { "kbStoreIds": ["KNOWLEDGE_BASE_ID"] } }'
```

The guide [Add a knowledge base with the API](https://docs.verbeo.ai/guides/knowledge-base-api.md) walks through the same steps in Node.js and Python.

## Uploading files

Send the files as `multipart/form-data`, each one under the field name `files` (`curl -F files=@prices.pdf`). One request can carry:

* **Up to 25 files**, together **up to 25 MB**. Send more in further requests. A larger request is refused with `413 PAYLOAD_TOO_LARGE` before anything is stored.
* **Any of these types**, told apart by the file name's extension: PDF (`.pdf`), Word (`.docx`, `.doc`), OpenDocument (`.odt`), Rich Text (`.rtf`), EPUB (`.epub`), plain text (`.txt`), Markdown (`.md`, `.markdown`), HTML (`.html`, `.htm`), XML (`.xml`), JSON (`.json`), YAML (`.yaml`, `.yml`), Excel (`.xlsx`) and CSV (`.csv`). Verbeo then checks the file's real format from its bytes.

**A request is all or nothing.** Each file is checked against your plan's limits in turn, and a second copy of the same bytes counts as a duplicate. If any file is refused, or a file cannot be stored, none of the request's files is kept, and the error names the file it is about:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "KB_DUPLICATE_FILE",
    "message": "hours-copy.txt: This file is already in this knowledge base, as \"hours.txt\"."
  }
}
```

Fix that file, or leave it out, and send the request again.

**The answer comes once the files are stored**, not once they are read: each file is `processing`. Verbeo then reads it in the background. Read the file with [`GET /knowledge-base/files/{fileId}`](https://docs.verbeo.ai/api-reference/knowledge-bases/get-file), or its knowledge base, until it is `ready`. What your plan counts is the files, their size and their passages ([plan limits](#plan-limits)).

> [!TIP]
>
> A text or a list of questions and answers needs no file: [add it as text](https://docs.verbeo.ai/api-reference/knowledge-bases/add-text.md), and Verbeo saves it as a Markdown file of the knowledge base.

### A file's status

```text theme={null}
processing → ready
     ↓
   error
```

| `status` | Meaning |
| - | - |
| `uploading` | Only for an [upload through a link](https://docs.verbeo.ai/api-reference/knowledge-bases/upload-link.md) that has not been confirmed yet |
| `processing` | Stored; Verbeo is reading it. Not searchable yet |
| `ready` | Searchable: assistants find its passages from their next search |
| `error` | It could not be read. `error_code` and `error_message` say why and what to do |

A file that ends in `error` carries one of these `error_code` values:

| `error_code` | What happened | What to do |
| - | - | - |
| `UNSUPPORTED` | The bytes are not the type the extension names | Upload it with its real extension |
| `ENCRYPTED` | Password-protected | Remove the password and upload it again |
| `NO_TEXT` | No text to read, such as a scanned PDF | Upload a version with selectable text |
| `CORRUPT` | The file is damaged | Export it again and upload that |
| `TOO_MUCH_TEXT` | More text than one file may hold on your plan | Split it into smaller files |
| `TOO_COMPLEX` | Reading it took too much memory or time | Split it, or save it in a simpler format |
| `DOWNLOAD_FAILED`, `EMBEDDING_FAILED`, `SAVE_FAILED` | A temporary failure on Verbeo's side | [Retry](https://docs.verbeo.ai/api-reference/knowledge-bases/retry-files.md) |
| `KB_FULL`, `WORKSPACE_FULL`, `MONTHLY_LIMIT` | Its passages would go past a [plan limit](#plan-limits) | Delete files, or retry after the 1st of the month |

## The knowledge base object

```json theme={null}
{
  "id": "5df09066-0842-4c92-8ef0-6cf2ff6d7455",
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "agent_id": null,
  "display_name": "Clinic FAQ",
  "tool_description": "Search this knowledge base before answering questions about the clinic's prices, opening hours and treatments.",
  "tool_description_source": "generated",
  "tool_description_review": false,
  "tool_description_input_hash": "8f3c1d0e9b7a65f4e3d2c1b0a9f8e7d6c5b4a39281706f5e4d3c2b1a09f8e7d6",
  "metadata": {},
  "created_at": "2026-11-07T09:12:44.512301+00:00",
  "updated_at": "2026-11-07T09:13:02.044870+00:00",
  "file_count": 2,
  "ready_count": 2,
  "processing_count": 0,
  "error_count": 0,
  "chunk_count": 14
}
```

**id** `string` *required*

UUID of the knowledge base: what goes in an assistant's `kbStoreIds`.

**workspace\_id** `string` *required*

The workspace it belongs to: your API key's.

**display\_name** `string` *required*

Its name, 1 to 255 characters.

**tool\_description** `string | null` *required*

What your assistants are told this knowledge base covers, so they know when to search it. Verbeo writes it from the files once they are ready; you can [edit it](https://docs.verbeo.ai/api-reference/knowledge-bases/update.md). `null` until a file is ready: assistants then use a general description.

**tool\_description\_source** `string` *required*

Who wrote the description last: `generated` (Verbeo) or `manual` (you). Verbeo never rewrites a `manual` one on its own.

**tool\_description\_review** `boolean` *required*

`true` when files changed after you wrote the description yourself: check that it still names what the files cover.

**tool\_description\_input\_hash** `string | null` *required*

A fingerprint of the files the description was written from. Verbeo's own; ignore it.

**agent\_id** `string | null` *required*

Not used by the API; ignore it. An assistant searches a knowledge base only while it is in its `kbStoreIds`.

**metadata** `object | null` *required*

Verbeo's own; ignore it.

**file\_count** `number` *required*

Its files: ready, processing and failed. A replacement still on its way is not counted: the file it replaces is.

**ready\_count** `number` *required*

Files assistants can search.

**processing\_count** `number` *required*

Files Verbeo is still reading. `0` means every file has finished, ready or failed.

**error\_count** `number` *required*

Files that could not be read.

**chunk\_count** `number` *required*

Passages its ready and processing files hold: what counts toward the plan's passages.

**created\_at** `string` *required*

ISO 8601 timestamp with microseconds and a UTC offset.

**updated\_at** `string` *required*

The last change, in the same format.

## The file object

```json theme={null}
{
  "id": "c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0",
  "store_id": "5df09066-0842-4c92-8ef0-6cf2ff6d7455",
  "display_name": "prices.pdf",
  "file_name": "5df09066-0842-4c92-8ef0-6cf2ff6d7455/c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0/prices.pdf",
  "file_type": "application/pdf",
  "file_size": 371989,
  "status": "ready",
  "error_code": null,
  "error_message": null,
  "chunk_count": 12,
  "chunks_saved": 12,
  "content_hash": "15375e6b518b63b07e33cb2bc0a954ff49a9b326a49fe53dc324c8a894390127",
  "upload_expires_at": null,
  "text_chars": 9575,
  "attempts": 0,
  "processed_at": "2026-11-07T09:12:58.348375+00:00",
  "uploaded_by": "c90ed82c-1ff8-4389-9077-d28b53894763",
  "replaces_id": null,
  "warnings": [],
  "created_at": "2026-11-07T09:12:44.833957+00:00",
  "updated_at": "2026-11-07T09:12:58.348375+00:00"
}
```

**id** `string` *required*

UUID of the file.

**store\_id** `string` *required*

UUID of its knowledge base.

**display\_name** `string` *required*

The file's name as you uploaded it.

**file\_name** `string` *required*

Where Verbeo stores it. Verbeo's own; use `display_name`.

**file\_type** `string` *required*

Its content type, from the extension: `application/pdf`, `text/markdown`, `text/csv`…

**file\_size** `number` *required*

Its size in bytes.

**status** `string` *required*

`processing`, `ready` or `error` ([a file's status](#a-files-status)); `uploading` for a link upload not yet confirmed.

**error\_code** `string | null` *required*

Why it failed, when `status` is `error` (table above).

**error\_message** `string | null` *required*

The same, as a sentence you can show a person.

**chunk\_count** `number | null` *required*

Its passages, once it has been read.

**chunks\_saved** `number` *required*

Passages saved so far while it is processing: `chunks_saved` of `chunk_count` is its progress.

**content\_hash** `string | null` *required*

The SHA-256 of its bytes, as 64 hex characters. The same bytes cannot be uploaded twice to one knowledge base.

**text\_chars** `number | null` *required*

Characters of text read from it.

**warnings** `string[] | null` *required*

What could not be read from a ready file, such as a page with no text. Empty when everything was read.

**replaces\_id** `string | null` *required*

On a [replacement](https://docs.verbeo.ai/api-reference/knowledge-bases/replace-file.md): the file it takes the place of once it is ready.

**processed\_at** `string | null` *required*

When it was last read.

**attempts** `number` *required*

How many times Verbeo has started reading it.

**upload\_expires\_at** `string | null` *required*

For a link upload still `uploading`: when its link stops working.

**uploaded\_by** `string | null` *required*

The user who uploaded it. A file uploaded with an API key names the workspace's owner.

**created\_at** `string` *required*

ISO 8601 timestamp.

**updated\_at** `string` *required*

The last change.

## Plan limits

| | Free | Pro |
| - | - | - |
| Knowledge bases | 2 | 25 |
| File size | 5 MB | 25 MB (HTML, XML and YAML: 8 MB) |
| Text per file | About 2,000 pages (6,500 passages) | About 7,500 pages (25,000 passages) |
| Files per knowledge base | 10 | 100 |
| Passages per knowledge base | 6,500 | 50,000 |
| Passages across all knowledge bases | 13,000 | 250,000 |
| Storage for your files | 100 MB | 5 GB |
| Passages processed each month | 6,500 | 125,000 |

A failed file does not count toward the files in a knowledge base, but it still uses storage until you delete it. [`GET /knowledge-base/usage`](https://docs.verbeo.ai/api-reference/knowledge-bases/usage) answers your plan's limits and what you use of them.

## Who may do what

An API key acts as the owner of its workspace, so it may read, create, change and delete every knowledge base and file in it. A knowledge base or a file in another workspace answers `404 NOT_FOUND`, exactly like one that does not exist.

## Errors

Every error has the [published shape](https://docs.verbeo.ai/api-reference/errors.md), `{ "success": false, "error": { "code", "message" } }`. A refused upload's `message` starts with the file's name. These codes are this API's own:

| Code | Status | When |
| - | - | - |
| `KB_DUPLICATE_FILE` | 409 | The same bytes are already a file of this knowledge base, or twice in one request. |
| `KB_EMPTY_FILE` | 409 | A file of 0 bytes. |
| `KB_FILE_TOO_LARGE` | 409 | A file over your plan's file size. |
| `KB_FILE_LIMIT` | 409 | The knowledge base already has the files your plan allows. |
| `KB_STORAGE_FULL` | 409 | Your files would use more storage than your plan includes. |
| `KB_FULL` | 409 | The knowledge base holds the passages your plan allows. |
| `KB_WORKSPACE_FULL` | 409 | Your knowledge bases together hold the passages your plan allows. |
| `KB_MONTHLY_LIMIT` | 409 | You have processed this month's passages. More can be added from the 1st of next month (UTC). |
| `KB_LIMIT` | 409 | You have the knowledge bases your plan allows. |
| `KB_FILE_NOT_READY` | 409 | Only a ready file can be replaced or edited. |
| `KB_FILE_BEING_REPLACED` | 409 | The file already has a replacement on its way. Delete or retry that one first. |
| `KB_UPLOAD_EXPIRED` | 409 | A link upload confirmed more than 2 hours after its link was made. |
| `KB_UPLOAD_CLOSED` | 409 | A link upload confirmed after it was cancelled or failed. |
| `KB_UPLOAD_AGAIN` | 409 | A failed file Verbeo cannot process again: upload it again. |
| `PAYLOAD_TOO_LARGE` | 413 | More than 25 MB of files in one request. |

### Errors every route can give

| Code | Status | When |
| - | - | - |
| `UNAUTHORIZED` | 401 | No API key, or one that is wrong, revoked or expired. |
| `FORBIDDEN` | 403 | A public widget key (`vbr_pub_…`). |
| `NOT_FOUND` | 404 | No such knowledge base or file, or one in another workspace. |
| `VALIDATION_FAILED` | 422 | A field is missing or wrong: the message names it, such as `display_name: required`. |
| `CONFLICT` | 409 | The file is not in a state that allows it, such as passages of a file still processing. |
| `BAD_GATEWAY` | 502 | Storage or the search did not answer just now. Nothing was changed: try again in a moment. |
| `INTERNAL_ERROR` | 500 | Something failed on Verbeo's side. Usually safe to retry. |

## Authentication

Every endpoint takes a **private** workspace API key (`vbr_…`) as a Bearer token. Public widget keys (`vbr_pub_…`) are rejected with `403 FORBIDDEN`: they ship inside web pages, where anyone can read them. See [Authentication](https://docs.verbeo.ai/api-reference/authentication.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.