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

# Delete Datastore

> Delete a given `Datastore`, including all the documents ingested into it. This operation is irreversible.

This operation will fail with status code 400 if there is an active `Agent` associated with the `Datastore`.



## OpenAPI

````yaml api-reference/openapi.json delete /datastores/{datastore_id}
openapi: 3.1.0
info:
  title: Endpoints
  version: '1.0'
servers:
  - url: https://api.contextual.ai/v1
security:
  - BearerAuth: []
paths:
  /datastores/{datastore_id}:
    delete:
      tags:
        - /datastores
      summary: Delete Datastore
      description: >-
        Delete a given `Datastore`, including all the documents ingested into
        it. This operation is irreversible.


        This operation will fail with status code 400 if there is an active
        `Agent` associated with the `Datastore`.
      operationId: delete_datastore_datastores__datastore_id__delete
      parameters:
        - name: datastore_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: ID of the datastore to delete
            title: Datastore Id
          description: ID of the datastore to delete
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EmptyResponse:
      properties: {}
      type: object
      title: EmptyResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````