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

# Delete data sources

> Delete one or more data sources from an agent. This endpoint supports both single and bulk deletion operations.



## OpenAPI

````yaml delete /api/v2/data-sources
openapi: 3.0.1
info:
  title: LiveChatAI API v2
  description: >-
    LiveChatAI API v2 - Build powerful AI-powered customer support experiences.
    This API follows REST principles with predictable, resource-oriented URLs,
    JSON responses, and standard HTTP methods.
  version: 2.0.0
servers:
  - url: https://app.livechatai.com
    description: Production server
security:
  - bearerAuth: []
paths:
  /api/v2/data-sources:
    delete:
      tags:
        - Data Sources
      summary: Delete data sources
      description: >-
        Delete one or more data sources from an agent. This endpoint supports
        both single and bulk deletion operations.
      requestBody:
        required: true
        description: Data source deletion details
        content:
          application/json:
            schema:
              type: object
              required:
                - agentId
                - source
              properties:
                agentId:
                  type: string
                  example: clx1234567890abcdef
                  description: Unique identifier of the agent
                source:
                  type: string
                  example: WEBSITE
                  enum:
                    - WEBSITE
                    - TEXT
                    - QA
                    - PDF
                    - DOCX
                    - IMAGE
                  description: Type of data source to delete
                id:
                  type: string
                  example: ds_1234567890
                  description: >-
                    Unique identifier of the data source item to delete (for
                    single deletion)
                ids:
                  type: array
                  items:
                    type: string
                  example:
                    - ds_1234567890
                    - ds_0987654321
                  description: Array of unique identifiers for bulk deletion
      responses:
        '200':
          description: Data sources deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 2 items deleted successfully
                      agentId:
                        type: string
                        example: clx1234567890abcdef
                      source:
                        type: string
                        example: TEXT
                      deleted:
                        type: array
                        items:
                          type: string
                        example:
                          - ds_1234567890
                          - ds_0987654321
                      notFound:
                        type: array
                        items:
                          type: string
                        example: []
        '401':
          description: Unauthorized access
        '403':
          description: Access denied - Invalid agent access.
        '404':
          description: One or more data sources not found
        '500':
          description: An internal server error occurred.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````