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

# Disconnect a source

> Stops syncing and removes the connection. With `delete_documents=true` it also deletes the documents it synced.



## OpenAPI

````yaml /api/openapi.yaml delete /sources/{id}
openapi: 3.1.0
info:
  title: Conare API
  version: '1'
  summary: Store your data, keep it in sync, and return the right context to your AI.
  description: >
    Write documents into namespaces, query them with hybrid search, and connect
    apps that keep

    syncing into a namespace.


    Authenticate with an API key from conare.ai/console/keys:

    `Authorization: Bearer sk-conare-…`. Bodies are JSON with snake_case keys;
    timestamps are

    RFC 3339 strings. Every response carries `X-Request-Id`, and every error has
    the shape

    `{"error": {"code", "message", "request_id"}}`. A 429, and a 503 that clears
    on its own,

    carry `Retry-After` (seconds).


    Conare is also an MCP server at `https://api.conare.ai/mcp` (streamable
    HTTP, same bearer key)

    with the tools `search`, `fetch`, `save`, `delete` and `list_namespaces`.
  contact:
    name: Conare
    url: https://conare.ai
servers:
  - url: https://api.conare.ai
security:
  - apiKey: []
tags:
  - name: Namespaces
    description: >-
      A namespace is a named set of documents, e.g. `docs` or `user-42`. It is
      created by its first write.
  - name: Documents
    description: >-
      A document is `{ id, text, metadata }`. Conare chunks and embeds it.
      Writing the same id replaces it.
  - name: Query
    description: >-
      Hybrid search (vector and keyword) over one namespace, with an optional
      metadata filter, reranked.
  - name: Models
    description: The embedding and reranking models Conare searches with.
  - name: Sources
    description: >
      Apps connected to Conare. Each keeps syncing into one namespace. While
      sources are not

      available, every sources route answers 503 with code
      `sources_unavailable`.
  - name: Health
    description: Service health.
paths:
  /sources/{id}:
    parameters:
      - $ref: '#/components/parameters/SourceId'
    delete:
      tags:
        - Sources
      summary: Disconnect a source
      description: >-
        Stops syncing and removes the connection. With `delete_documents=true`
        it also deletes the documents it synced.
      operationId: deleteSource
      parameters:
        - name: delete_documents
          in: query
          schema:
            type: boolean
            default: false
      responses:
        '200':
          $ref: '#/components/responses/Deleted'
        '401':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '503':
          $ref: '#/components/responses/Error'
components:
  parameters:
    SourceId:
      name: id
      in: path
      required: true
      description: The source id, `src_…`.
      schema:
        type: string
  responses:
    Deleted:
      description: Deleted.
      content:
        application/json:
          schema:
            type: object
            required:
              - deleted
            properties:
              deleted:
                type: boolean
                const: true
    Error:
      description: An error. `X-Request-Id` is also in the response headers.
      headers:
        X-Request-Id:
          schema:
            type: string
        Retry-After:
          description: >-
            On 429, and on a 503 that clears on its own, seconds to wait before
            retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_request
              message: text is required
              request_id: req_8f3a2c
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: >
                Stable and machine-readable. 400: `invalid_request`,
                `invalid_json`, `invalid_namespace`,

                `invalid_id`, `invalid_metadata`, `invalid_filter`,
                `invalid_cursor`. 401: `unauthorized`.

                403: `forbidden`. 404: `namespace_not_found`,
                `document_not_found`, `source_not_found`,

                `not_found`. 413: `payload_too_large`. 429: `rate_limited`. 500:
                `internal_error`.

                502: `upstream_error`. 503: `unavailable`,
                `sources_unavailable`. 504: `timeout`.
            message:
              type: string
            request_id:
              type: string
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: sk-conare-…
      description: >-
        An API key from conare.ai/console/keys. It can read and write every
        namespace in its organization.

````