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

# Upload Document

> Upload a new file document

Uploads a new file document for a downstream entity. The file must be a PDF.

<Note>
  Supported document categories: W9, E\&O, Cyber, Producer Agreement, Crime & Fidelity, and more.
</Note>


## OpenAPI

````yaml openapi/v1.json POST /v1/file-documents
openapi: 3.0.0
info:
  title: Turris Public API
  description: API for managing insurance compliance data
  version: 1.0.0
  contact: {}
servers:
  - url: https://public.api.live.turrisfi.com
    description: Production
  - url: https://public.api.sandbox.turrisfi.com
    description: Sandbox
security: []
tags: []
paths:
  /v1/file-documents:
    post:
      tags:
        - file-documents
      operationId: FileDocumentFeatureController_uploadNewDocument_v1
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadDocumentDto'
      responses:
        '201':
          description: Document uploaded successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/FileDocumentResponse'
                  requestId:
                    type: string
                    description: Unique request identifier
                    example: dev-2c5e7cf2-9acf-4c8c-ab2f-b81f39d775a8
                  timestamp:
                    type: string
                    description: Response timestamp
                    example: '2025-11-12T20:49:03.293Z'
                required:
                  - data
                  - requestId
                  - timestamp
        '400':
          description: Invalid file or missing required fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '401':
          description: Invalid or missing auth token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
components:
  schemas:
    UploadDocumentDto:
      type: object
      properties:
        file:
          type: string
          format: binary
          description: PDF file to upload
        category:
          type: string
          description: Document category
          enum:
            - W9
            - E&O
            - Cyber
            - Producer Agreement
            - Crime & Fidelity
            - Other Contract
            - Other Document
            - Payment Details
            - License PDF
            - Contract Container Folder Document
            - Surplus Lines
          example: E&O
        downstreamEntityAssociationId:
          type: string
          description: Downstream entity association ID
          example: 507f1f77bcf86cd799439011
      required:
        - file
        - category
        - downstreamEntityAssociationId
    FileDocumentResponse:
      type: object
      properties:
        _id:
          type: string
          description: Document ID
        category:
          type: string
          description: Document category
          enum:
            - W9
            - E&O
            - Cyber
            - Producer Agreement
            - Crime & Fidelity
            - Other Contract
            - Other Document
            - Payment Details
            - License PDF
            - Contract Container Folder Document
            - Surplus Lines
        versions:
          description: Document versions
          type: array
          items:
            $ref: '#/components/schemas/DocumentVersionResponse'
        createdAt:
          format: date-time
          type: string
          description: Created date
        updatedAt:
          format: date-time
          type: string
          description: Updated date
      required:
        - _id
        - category
    ErrorResponseDto:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
        requestId:
          type: string
          description: Unique request identifier for debugging
        errorType:
          type: string
          description: Error type classification
        errorMessage:
          description: Array of error messages
          type: array
          items:
            type: string
        timestamp:
          type: string
          description: ISO timestamp when the error occurred
        details:
          type: object
          description: Additional error context
      required:
        - statusCode
        - requestId
        - errorType
        - errorMessage
        - timestamp
    DocumentVersionResponse:
      type: object
      properties:
        s3VersionId:
          type: string
          description: S3 version ID
        metadataModel:
          type: string
          description: Metadata model type
        metadataId:
          type: string
          description: Metadata ID
      required:
        - s3VersionId

````