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

# Get Knowledge Base

> Get Knowledge Base.

### Authorizations

<ParamField header="X-Api-Key" type="string" required>
  Your Agni API key used to authenticate the request. Pass it in the `X-Api-Key` header. Find or rotate it from your Ravan AI account settings.
</ParamField>

***

### Path Parameters

<ParamField path="kb_id" type="string" required>
  The unique knowledge base ID. Use the ID returned by the knowledge base create or list endpoint.
</ParamField>

***

### Response

<ResponseField name="success" type="boolean">
  Whether the request succeeded.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable status message.
</ResponseField>

<ResponseField name="data" type="object">
  Returned data.

  <Expandable title="data">
    <ResponseField name="knowledge_base_id" type="string">
      Knowledge base UUID
    </ResponseField>

    <ResponseField name="knowledge_base_name" type="string">
      Knowledge base name
    </ResponseField>

    <ResponseField name="status" type="string">
      Status: `complete`, `in_progress`, or `error`
    </ResponseField>

    <ResponseField name="enable_auto_refresh" type="boolean">
      Whether auto-refresh is enabled
    </ResponseField>

    <ResponseField name="knowledge_base_sources" type="array">
      Array of source objects

      <Expandable title="source item">
        <ResponseField name="source_id" type="string">
          Source UUID
        </ResponseField>

        <ResponseField name="source_type" type="string">
          Type: `text`, `url`, or `document`
        </ResponseField>

        <ResponseField name="source_name" type="string">
          Source name or title
        </ResponseField>

        <ResponseField name="source_url" type="string">
          Source URL (for url type)
        </ResponseField>

        <ResponseField name="source_status" type="string">
          Status: `complete`, `indexing`, or `error`
        </ResponseField>

        <ResponseField name="created_timestamp" type="integer">
          Creation timestamp (Unix ms)
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="created_timestamp" type="integer">
      Creation timestamp (Unix ms)
    </ResponseField>

    <ResponseField name="last_updated_timestamp" type="integer">
      Last updated timestamp (Unix ms)
    </ResponseField>
  </Expandable>
</ResponseField>


## OpenAPI

````yaml GET /api/v1/rag/get-knowledge-base/{kb_id}
openapi: 3.0.1
info:
  title: Agni API
  version: 1.0.0
  description: >-
    Agni API for managing agents, tools, widget settings, telephony, and
    integrations.
servers:
  - url: https://api.ravan.ai
security:
  - X-Api-Key: []
tags:
  - name: AgentService
  - name: AgentToolService
  - name: WidgetSettingsService
  - name: PhoneService
  - name: AppointmentService
  - name: GHLService
  - name: CalComService
  - name: CampaignService
  - name: ContactService
  - name: CallingService
  - name: RAGService
  - name: ModelService
  - name: HealthService
paths:
  /api/v1/rag/get-knowledge-base/{kb_id}:
    get:
      tags:
        - RAGService
      summary: Get Knowledge Base
      operationId: GetKnowledgeBase
      parameters:
        - name: kb_id
          in: path
          required: true
          schema:
            type: string
          description: Knowledge Base ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeBaseResponse'
components:
  schemas:
    KnowledgeBaseResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          $ref: '#/components/schemas/KnowledgeBaseDetail'
    KnowledgeBaseDetail:
      type: object
      properties:
        knowledge_base_id:
          type: string
          description: Knowledge base UUID
        knowledge_base_name:
          type: string
          description: Knowledge base name
        status:
          type: string
          description: 'Status: complete, in_progress, or error'
        enable_auto_refresh:
          type: boolean
          description: Whether auto-refresh is enabled
        knowledge_base_sources:
          type: array
          items:
            $ref: '#/components/schemas/KnowledgeBaseSource'
        created_timestamp:
          type: integer
          description: Creation timestamp (Unix ms)
        last_updated_timestamp:
          type: integer
          description: Last updated timestamp (Unix ms)
    KnowledgeBaseSource:
      type: object
      properties:
        source_id:
          type: string
          description: Source UUID
        source_type:
          type: string
          description: 'Type: text, url, or document'
        source_name:
          type: string
          description: Source name or title
        source_url:
          type: string
          description: Source URL (for url type)
        source_status:
          type: string
          description: 'Status: complete, indexing, or error'
        created_timestamp:
          type: integer
          description: Creation timestamp (Unix ms)
  securitySchemes:
    X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key

````