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

# Delete Source

> Delete Source from 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>

<ParamField path="source_id" type="string" required>
  The unique source ID inside the knowledge base.
</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">
  Updated knowledge base object.
</ResponseField>


## OpenAPI

````yaml DELETE /api/v1/rag/knowledge-base/{kb_id}/source/{source_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/knowledge-base/{kb_id}/source/{source_id}:
    delete:
      tags:
        - RAGService
      summary: Delete Source
      operationId: DeleteKnowledgeBaseSource
      parameters:
        - name: kb_id
          in: path
          required: true
          schema:
            type: string
          description: Knowledge Base ID
        - name: source_id
          in: path
          required: true
          schema:
            type: string
          description: Source 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

````