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

# Remove an attachment from a session or cancel its in-progress processing.

> Removes the attachment from the session; the AI will no longer reference it in subsequent chat turns. If processing is still in progress, also cancels the underlying job. Use to free up context, remove sensitive files mid-session, or replace a stale reference document. The attachment_id can be either the final attachment ID or the job ID (during processing).



## OpenAPI

````yaml /openapi.json delete /v1/attachments/{attachment_id}
openapi: 3.1.0
info:
  title: Universal Document AI API
  description: AI-powered document editing with multi-tenant organization support
  version: 2.0.0
servers: []
security: []
paths:
  /v1/attachments/{attachment_id}:
    delete:
      tags:
        - v1
        - mcp
        - attachments
      summary: >-
        Remove an attachment from a session or cancel its in-progress
        processing.
      description: >-
        Removes the attachment from the session; the AI will no longer reference
        it in subsequent chat turns. If processing is still in progress, also
        cancels the underlying job. Use to free up context, remove sensitive
        files mid-session, or replace a stale reference document. The
        attachment_id can be either the final attachment ID or the job ID
        (during processing).
      operationId: delete_attachment
      parameters:
        - name: attachment_id
          in: path
          required: true
          schema:
            type: string
            title: Attachment Id
        - name: session_id
          in: query
          required: true
          schema:
            type: string
            title: Session Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    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

````