---
title: "Add Sources"
method: POST
path: "/api/v1/rag/knowledge-base/{kb_id}/add-sources"
tags: ["RAGService"]
---

# Add Sources

`POST /api/v1/rag/knowledge-base/{kb_id}/add-sources`

## Path parameters

- `kb_id` string, required

## Request body

- AddSourcesRequest
  - `knowledge_base_texts` object[] — Array of text sources
    - `title` string — Title for the text source
    - `text` string — Text content to index
  - `knowledge_base_urls` string[] — Array of URLs to crawl

## Response `200`

Successful response

- AddSourcesResponse
  - `success` boolean
  - `message` string
  - `data` object
    - `knowledge_base` KnowledgeBaseDetail
      - `knowledge_base_id` string — Knowledge base UUID
      - `knowledge_base_name` string — Knowledge base name
      - `status` string — Status: complete, in_progress, or error
      - `enable_auto_refresh` boolean — Whether auto-refresh is enabled
      - `knowledge_base_sources` KnowledgeBaseSource[]
        - `source_id` string — Source UUID
        - `source_type` string — Type: text, url, or document
        - `source_name` string — Source name or title
        - `source_url` string — Source URL (for url type)
        - `source_status` string — Status: complete, indexing, or error
        - `created_timestamp` integer — Creation timestamp (Unix ms)
      - `created_timestamp` integer — Creation timestamp (Unix ms)
      - `last_updated_timestamp` integer — Last updated timestamp (Unix ms)
    - `url_sources` object[]
      - `source_id` string
      - `url` string
      - `pages_found` integer
      - `status` string

---

[API](https://skmtc.net/ravan/apis/agni-api.md) · [All operations](https://skmtc.net/ravan/apis/agni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ravan/agni-api/revisions/48f45dc58534/schema)
