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

# Knowledge Bases

> Manage organization-level RAG knowledge bases and assign them to agents

Knowledge Bases store files and URLs that an agent can search during calls through RAG.

## Availability

These endpoints require Knowledge Base to be available for the organization.
When it is not, every Knowledge Base endpoint returns `403 forbidden` with
`{ "error": "forbidden" }`.

Availability is controlled by Telzino and your partner account — **it cannot be
set through the API**. Organization creation does not accept a Knowledge Base
field, and there is no organization update endpoint.

If these endpoints return `403 forbidden`, enable Knowledge Base for the
organization in the Telzino Dashboard under its feature settings, or contact
Telzino support if that option is not available to you.

## Workflow

1. Create or list knowledge bases for an organization.
2. Add sources to a knowledge base.
3. For file sources, upload the file to the returned presigned URL, then enqueue ingestion.
4. Assign the knowledge base to an agent — either inline with [Create Agent](/api-reference/agents/create#rag-knowledge-base) (`ragEnabled` + `knowledgeBaseId`), or afterwards with [Update Agent](/api-reference/agents/update#rag-knowledge-base).

To read a stored file back, use [Download a Source File](/api-reference/knowledge-bases/source-actions#download-a-source-file).

## Endpoints

| Endpoint                                                                                                 | Purpose                             |
| -------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| [`GET /v1/organizations/{organization_id}/knowledge-bases`](/api-reference/knowledge-bases/list-create)  | List knowledge bases                |
| [`POST /v1/organizations/{organization_id}/knowledge-bases`](/api-reference/knowledge-bases/list-create) | Create a knowledge base             |
| [`PUT /v1/knowledge-bases/{knowledgeBaseId}`](/api-reference/knowledge-bases/update-delete)              | Rename/update a knowledge base      |
| [`DELETE /v1/knowledge-bases/{knowledgeBaseId}`](/api-reference/knowledge-bases/update-delete)           | Delete a knowledge base             |
| [`GET /v1/knowledge-bases/{knowledgeBaseId}/sources`](/api-reference/knowledge-bases/sources)            | List sources                        |
| [`POST /v1/knowledge-bases/{knowledgeBaseId}/sources`](/api-reference/knowledge-bases/sources)           | Create a URL or file source         |
| [`POST /v1/knowledge-sources/{sourceId}/enqueue`](/api-reference/knowledge-bases/source-actions)         | Enqueue file ingestion after upload |
| [`POST /v1/knowledge-sources/{sourceId}/reingest`](/api-reference/knowledge-bases/source-actions)        | Re-ingest a source                  |
| [`GET /v1/knowledge-sources/{sourceId}/download`](/api-reference/knowledge-bases/source-actions)         | Download a source file              |
| [`DELETE /v1/knowledge-sources/{sourceId}`](/api-reference/knowledge-bases/source-actions)               | Delete a source                     |
| [`GET /v1/rag/jobs/{jobId}`](/api-reference/knowledge-bases/job-status)                                  | Poll ingestion job status           |

## Supported Files

File sources support PDF, DOCX, TXT, HTML, CSV, and Markdown up to 50 MB.
