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

# Delete a source

> Permanently deletes a source and removes it from every knowledge base it was attached to. Requires a token with write access.



## OpenAPI

````yaml /openapi-knowledge-base.json delete /knowledge-base/sources/{source_id}
openapi: 3.0.3
info:
  title: AnyReach Knowledge Base API
  version: 1.0.0
  description: Manage knowledge bases, their sources, and run retrieval queries.
servers:
  - url: https://api.anyreach.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Knowledge bases
    description: >-
      A knowledge base (a `dataset` in the API) is a collection of embedded
      content an agent can retrieve from.
  - name: Knowledge base sources
    description: Attach and detach sources to a knowledge base.
  - name: Sources
    description: >-
      A source is a file or URL whose content is ingested, chunked, and
      embedded.
paths:
  /knowledge-base/sources/{source_id}:
    delete:
      tags:
        - Sources
      summary: Delete a source
      description: >-
        Permanently deletes a source and removes it from every knowledge base it
        was attached to. Requires a token with write access.
      operationId: deleteSource
      parameters:
        - name: source_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The source ID.
      responses:
        '204':
          description: Deleted. No content.
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  responses:
    Forbidden:
      description: The token's role doesn't grant access to this action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        detail:
          type: string
          example: Dataset not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Personal access token. See Authentication.

````