# Knowledge bases: Create a knowledge base (https://docs.envocal.ai/api-reference/knowledge-bases/create-a-knowledge-base/) > An empty knowledge base; add documents with POST /v1/tenants/{tenantId}/knowledge-bases/{kbId}/documents and link it to agents. ## POST `/v1/tenants/{tenantId}/knowledge-bases` An empty knowledge base; add documents with `POST /v1/tenants/{tenantId}/knowledge-bases/{kbId}/documents` and link it to agents. **Required permission:** `knowledge:write` ### Parameters | Name | In | | Type | Description | | --- | --- | --- | --- | --- | | `tenantId` | path | required | string | Tenant id, or `current` for the key's own tenant. Must be the key's tenant or one of its sub-tenants. | ### Request body `application/json`: KnowledgeBaseCreateDto | Field | Type | | Description | | --- | --- | --- | --- | | `name` | string | required | Name, unique per tenant. | | `description` | string | nullable | Optional description. | ### Responses **201** — KnowledgeBaseDto: Created. | Field | Type | | Description | | --- | --- | --- | --- | | `id` | string | required | Knowledge base id. | | `name` | string | required | Name, unique per tenant. | | `description` | string | nullable | Optional description. | | `documentCount` | integer | | Number of documents. | | `tenantId` | string | required | Tenant it belongs to. | **401**: Missing, invalid, revoked or expired API key. **403**: The key lacks the required permission, or the tenant/resource is outside its reach. **409**: A knowledge base with this name already exists in the tenant. **429**: Rate limit exceeded. Retry after the number of seconds in the Retry-After header. ### Example ```bash curl -X POST "https://api.envocal.ai/v1/tenants/current/knowledge-bases" \ -H "Authorization: Bearer evk_eu_..." \ -H "Content-Type: application/json" \ -d '{"name":"string"}' ```