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

# Delete sources from a knowledge base

> Delete sources from a knowledge base.



## OpenAPI

````yaml /api-reference-v1/openapi.json delete /v1/knowledge-bases/{knowledge_base_id}/sources
openapi: 3.1.0
info:
  title: Rounded API
  description: Rounded API
  version: 1.0.0
servers:
  - url: https://api.callrounded.com
security:
  - ApiKeyHeader: []
paths:
  /v1/knowledge-bases/{knowledge_base_id}/sources:
    delete:
      tags:
        - knowledge bases
      summary: Delete sources from a knowledge base
      description: Delete sources from a knowledge base.
      operationId: >-
        delete_knowledge_base_sources_v1_knowledge_bases__knowledge_base_id__sources_delete
      parameters:
        - name: knowledge_base_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Knowledge Base Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteKnowledgeBaseSourcesApiRequest'
      responses:
        '200':
          description: Successfully deleted sources from knowledge base
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DeleteKnowledgeBaseSourcesApiResponse-Input
          headers:
            ratelimit-limit:
              description: The number of requests allowed in the current rate limit period
              schema:
                type: integer
            ratelimit-remaining:
              description: >-
                The number of requests remaining in the current rate limit
                period
              schema:
                type: integer
            x-ratelimit-limit-minute:
              description: >-
                The number of requests allowed in the current minute window, if
                rate limit is set to minutes.
              schema:
                type: integer
            x-ratelimit-remaining-minute:
              description: >-
                The number of requests remaining in the current minute window,
                if rate limit is set to minutes.
              schema:
                type: integer
            x-ratelimit-limit-hour:
              description: >-
                The number of requests allowed in the current hour window, if
                rate limit is set to hourly.
              schema:
                type: integer
            x-ratelimit-remaining-hour:
              description: >-
                The number of requests remaining in the current hour window, if
                rate limit is set to hourly.
              schema:
                type: integer
            x-ratelimit-limit-<seconds>:
              description: >-
                The number of requests allowed in the current <seconds> window,
                where <seconds> is the number of seconds, if rate limit is set
                to seconds.
              schema:
                type: integer
            x-ratelimit-remaining-<seconds>:
              description: >-
                The number of requests remaining in the current <seconds>
                window, where <seconds> is the number of seconds, if rate limit
                is set to seconds.
              schema:
                type: integer
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: Bad request
                  type: api_error
                  status: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              examples:
                auth_error:
                  summary: Error from the API Service
                  value:
                    message: Unauthorized
                    type: auth_error
                    status: 401
                gateway_error:
                  summary: Error from the API Gateway
                  value:
                    message: Unauthorized
                    type: gateway_auth_error
                    status: 401
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: Access forbidden
                  type: api_error
                  status: 403
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: The request endpoint does not exist
                  type: http_error
                  status: 404
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: Invalid request body
                  type: validation_error
                  status: 422
                  details:
                    - field: email
                      message: Invalid email format
        '429':
          description: Rate Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: API rate limit exceeded
                  type: gateway_rate_limit_error
                  status: 429
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: An unexpected error occurred
                  type: generic_error
                  status: 500
components:
  schemas:
    DeleteKnowledgeBaseSourcesApiRequest:
      properties:
        source_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Source Ids
          description: List of source IDs to delete from the knowledge base.
          examples:
            - - 123e4567-e89b-12d3-a456-426614174000
              - 123e4567-e89b-12d3-a456-426614174001
      type: object
      required:
        - source_ids
      title: DeleteKnowledgeBaseSourcesApiRequest
    DeleteKnowledgeBaseSourcesApiResponse-Input:
      properties:
        message:
          type: string
          title: Message
          description: Response message indicating the result of the operation.
          default: Sources deleted from knowledge base successfully
        data:
          $ref: '#/components/schemas/KnowledgeBaseGetApiResponseData'
          description: The updated knowledge base data after sources were deleted.
        error:
          anyOf:
            - $ref: '#/components/schemas/ApiResponseError'
            - type: 'null'
        status:
          type: integer
          title: Status
          description: HTTP status code of the response.
          default: 200
      type: object
      required:
        - data
      title: DeleteKnowledgeBaseSourcesApiResponse
    ApiResponseError:
      properties:
        message:
          type: string
          title: Message
        type:
          type: string
          title: Type
        status:
          type: integer
          title: Status
        details:
          anyOf:
            - items:
                $ref: '#/components/schemas/ApiResponseErrorDetail'
              type: array
            - type: 'null'
          title: Details
      type: object
      required:
        - message
        - type
        - status
      title: ApiResponseError
      example:
        details:
          - field: email
            message: Invalid email format
        message: An error occurred while processing your request
        status: 400
        type: generic_error
    KnowledgeBaseGetApiResponseData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Unique identifier for the knowledge base.
          examples:
            - 123e4567-e89b-12d3-a456-426614174000
        organization_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organization Id
          description: ID of the organization the knowledge base belongs to.
          examples:
            - 123e4567-e89b-12d3-a456-426614174001
        name:
          type: string
          title: Name
          description: Name of the knowledge base.
          examples:
            - Product Documentation
            - Customer Support KB
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the knowledge base was created.
          examples:
            - '2023-06-15T14:30:00Z'
        status:
          $ref: '#/components/schemas/KnowledgeBaseStatus'
          description: Current status of the knowledge base ('ready' or 'ingesting').
          examples:
            - ready
            - ingesting
        sources:
          items:
            anyOf:
              - $ref: '#/components/schemas/FileSourceApiResponseData'
              - $ref: '#/components/schemas/TextSourceApiResponseData'
          type: array
          title: Sources
          description: List of sources included in the knowledge base.
      type: object
      required:
        - id
        - name
        - created_at
        - status
      title: KnowledgeBaseGetApiResponseData
    ApiResponseErrorDetail:
      properties:
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
        message:
          type: string
          title: Message
      type: object
      required:
        - message
      title: ApiResponseErrorDetail
    KnowledgeBaseStatus:
      type: string
      enum:
        - ingesting
        - ready
      title: KnowledgeBaseStatus
    FileSourceApiResponseData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Unique identifier for the source.
          examples:
            - 123e4567-e89b-12d3-a456-426614174000
        type:
          type: string
          title: Type
          description: Indicates this is a file source.
          default: file
          examples:
            - file
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the source was created.
          examples:
            - '2023-06-15T14:30:00Z'
        file_name:
          type: string
          title: File Name
          description: Name of the file.
          examples:
            - document.pdf
            - meeting_notes.txt
        file_url:
          type: string
          title: File Url
          description: URL where the file can be accessed.
          examples:
            - https://storage.example.com/files/document.pdf
      type: object
      required:
        - id
        - created_at
        - file_name
        - file_url
      title: FileSourceApiResponseData
    TextSourceApiResponseData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Unique identifier for the source.
          examples:
            - 123e4567-e89b-12d3-a456-426614174000
        type:
          type: string
          title: Type
          description: Indicates this is a text source.
          default: text
          examples:
            - text
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the source was created.
          examples:
            - '2023-06-15T14:30:00Z'
        title:
          type: string
          title: Title
          description: Title of the text content.
          examples:
            - Meeting Notes
            - Research Summary
        content_url:
          type: string
          title: Content Url
          description: URL where the text content can be accessed.
          examples:
            - https://storage.example.com/content/meeting_notes.txt
      type: object
      required:
        - id
        - created_at
        - title
        - content_url
      title: TextSourceApiResponseData
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        The API Key created in [Rounded Studio](https://app.callrounded.com).

        - You can create it by going to the "API Keys" settings of your profile.

        - Need help? You can email us at
        [team@callrounded.com](mailto:team@callrounded.com) or join our [Discord
        community](https://discord.gg/en537j5z75).

````