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

# Delete Document

> Permanently delete a document.

This endpoint removes a document from the system. Note that this only deletes
the document record and metadata.

**Args**:
    `id`: Document ID to delete (path parameter)

**Returns**:
    `DeleteDocumentResponse`: Deletion confirmation containing:
        - `document_id`: ID of the deleted document
        - `message`: Success confirmation message

**Raises**:
    - `404`: If the document is not found or doesn't belong to the user

**Example**:
    **Request**:
    ```
        DELETE /api/v3/documents/doc-xyz789
        Headers: {"Authorization": "Bearer <api_key>"}
    ```
    **Response**:
    ```
        {
            "document_id": "doc-xyz789",
            "message": "Document Deleted Successfully"
        }
    ```



## OpenAPI

````yaml https://api.nugen.in/openapi-public.json delete /api/v3/documents/{id}
openapi: 3.1.0
info:
  title: Nugen Intelligence API
  description: 'Nugen Intelligence : Powering Specialized Intelligence At Scale'
  version: 25.4.20
servers: []
security: []
paths:
  /api/v3/documents/{id}:
    delete:
      tags:
        - Documents
      summary: Delete Document
      description: >-
        Permanently delete a document.


        This endpoint removes a document from the system. Note that this only
        deletes

        the document record and metadata.


        **Args**:
            `id`: Document ID to delete (path parameter)

        **Returns**:
            `DeleteDocumentResponse`: Deletion confirmation containing:
                - `document_id`: ID of the deleted document
                - `message`: Success confirmation message

        **Raises**:
            - `404`: If the document is not found or doesn't belong to the user

        **Example**:
            **Request**:
            ```
                DELETE /api/v3/documents/doc-xyz789
                Headers: {"Authorization": "Bearer <api_key>"}
            ```
            **Response**:
            ```
                {
                    "document_id": "doc-xyz789",
                    "message": "Document Deleted Successfully"
                }
            ```
      operationId: delete_document
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: Id
      responses:
        '200':
          description: >-
            Returns a confirmation message with the ID of the deleted document.
            This endpoint permanently deletes the specified document from the
            system, including its metadata and any associated records. The
            response confirms the successful deletion by returning the document
            ID and a success message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteDocumentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    DeleteDocumentResponse:
      properties:
        document_id:
          type: string
          title: Document Id
          description: document id
          example: doc-abc123
        message:
          type: string
          title: Message
          description: Deletion Message
          example: Document doc-abc123 has been successfully deleted.
      type: object
      required:
        - document_id
        - message
      title: DeleteDocumentResponse
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````