> ## 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.

# Create knowledge base

> Create a knowledge base: empty, or with its first files uploaded in the same call.

Creates a knowledge base. Send JSON to create it empty, or a multipart form to create it **with its first files in the same call**.

## Create it empty (JSON)

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

Its name, 1 to 255 characters. Surrounding spaces are trimmed.

```bash theme={null}
curl -X POST "https://api.verbeo.ai/v1/knowledge-base" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "display_name": "Clinic FAQ" }'
```

Then [upload files](https://docs.verbeo.ai/api-reference/knowledge-bases/upload-files.md) or [add text](https://docs.verbeo.ai/api-reference/knowledge-bases/add-text.md) to it.

## Create it with files (multipart)

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

Its name, 1 to 255 characters.

**files** `file` *required*

A file to upload. Repeat the field for each file: up to 25 files, together up to 25 MB. [Uploading files](https://docs.verbeo.ai/api-reference/knowledge-bases/overview.md#uploading-files) lists the types.

The request is all or nothing: if a file is refused, the knowledge base is not created either, and the error names the file.

```bash cURL 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"
```

```javascript Node.js theme={null}
import { readFile } from "node:fs/promises";

const form = new FormData();
form.append("display_name", "Clinic FAQ");
for (const name of ["prices.pdf", "opening-hours.docx"]) {
  form.append("files", new Blob([await readFile(name)]), name);
}
const res = await fetch("https://api.verbeo.ai/v1/knowledge-base", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.VERBEO_API_KEY}` },
  body: form,
});
const { data: knowledgeBase } = await res.json();
```

```python Python theme={null}
import os, requests

res = requests.post(
    "https://api.verbeo.ai/v1/knowledge-base",
    headers={"Authorization": f"Bearer {os.environ['VERBEO_API_KEY']}"},
    data={"display_name": "Clinic FAQ"},
    files=[
        ("files", open("prices.pdf", "rb")),
        ("files", open("opening-hours.docx", "rb")),
    ],
)
knowledge_base = res.json()["data"]
```

## Response

`201 Created` with the [knowledge base object](https://docs.verbeo.ai/api-reference/knowledge-bases/overview.md#the-knowledge-base-object). Created with files, it also carries `files`: each [file object](https://docs.verbeo.ai/api-reference/knowledge-bases/overview.md#the-file-object), in the order you sent them, `processing`.

```json theme={null}
{
  "success": true,
  "data": {
    "id": "5df09066-0842-4c92-8ef0-6cf2ff6d7455",
    "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
    "agent_id": null,
    "display_name": "Clinic FAQ",
    "tool_description": null,
    "tool_description_source": "generated",
    "tool_description_review": false,
    "tool_description_input_hash": null,
    "metadata": {},
    "created_at": "2026-11-07T09:12:44.512301+00:00",
    "updated_at": "2026-11-07T09:12:44.512301+00:00",
    "file_count": 2,
    "ready_count": 0,
    "processing_count": 2,
    "error_count": 0,
    "chunk_count": 0,
    "files": [
      {
        "id": "c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0",
        "store_id": "5df09066-0842-4c92-8ef0-6cf2ff6d7455",
        "display_name": "prices.pdf",
        "file_type": "application/pdf",
        "file_size": 371989,
        "status": "processing",
        "error_code": null,
        "error_message": null,
        "chunk_count": 0,
        "chunks_saved": 0,
        "…": "every field of the file object"
      },
      {
        "id": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
        "display_name": "opening-hours.docx",
        "status": "processing",
        "…": "every field of the file object"
      }
    ]
  }
}
```

Read the knowledge base until `processing_count` is `0`, then [attach it to an assistant](https://docs.verbeo.ai/api-reference/knowledge-bases/overview.md#from-files-to-an-assistant-that-uses-them).

## Errors

| Code | Status | When |
| - | - | - |
| `VALIDATION_FAILED` | 422 | `display_name` missing (`display_name: Required`), empty or longer than 255 characters. In a form: no file (`files: must include at least one file`), more than 25, a file under another field name, a file with no name, or a type that is not taken (`photo.png: This file type is not supported. …`). |
| `KB_LIMIT` | 409 | You have the knowledge bases your plan allows: `The Free plan includes 2 knowledge bases. Upgrade to Pro for up to 25.` |
| `KB_*` | 409 | A file was refused, and nothing was created: see [Errors](https://docs.verbeo.ai/api-reference/knowledge-bases/overview.md#errors). |
| `PAYLOAD_TOO_LARGE` | 413 | More than 25 MB of files in one request. |
| `BAD_GATEWAY` | 502 | `The files could not be stored just now. Try again in a moment.` Nothing was created. |

And the [errors every route can give](https://docs.verbeo.ai/api-reference/knowledge-bases/overview.md#errors-every-route-can-give).


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