> ## 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.

# Upload Attachment

> Upload a document attachment to a session for AI reference.

The file is processed asynchronously — text is extracted, converted, and indexed
so the AI can search and reference it during chat. Use GET /v1/attachments/status/{session_id}
to check processing progress.

Supported file types: .pdf, .docx, .txt, .rtf, .md, .html, .htm (max 50 MB).
Returns a job_id for tracking the processing status.



## OpenAPI

````yaml /openapi.json post /v1/attachments/upload
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/upload:
    post:
      tags:
        - v1
        - attachments
      summary: Upload Attachment
      description: >-
        Upload a document attachment to a session for AI reference.


        The file is processed asynchronously — text is extracted, converted, and
        indexed

        so the AI can search and reference it during chat. Use GET
        /v1/attachments/status/{session_id}

        to check processing progress.


        Supported file types: .pdf, .docx, .txt, .rtf, .md, .html, .htm (max 50
        MB).

        Returns a job_id for tracking the processing status.
      operationId: upload_attachment
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_attachment'
      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:
    Body_upload_attachment:
      properties:
        session_id:
          type: string
          title: Session Id
        file:
          type: string
          format: binary
          title: File
      type: object
      required:
        - session_id
        - file
      title: Body_upload_attachment
    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

````