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

# Upload Csv

> Upload a CSV estimate for catalog resolution, validation, and ESX generation.



## OpenAPI

````yaml /openapi.json post /upload/csv
openapi: 3.1.0
info:
  title: Capout API
  description: >-
    Programmatic REST, WebSocket, and SSE API for uploading documents, tracking
    processing status, and reading claim balances.
  version: 1.0.0
servers:
  - url: https://api.capout.ai
    description: Public API
security: []
paths:
  /upload/csv:
    post:
      tags:
        - Upload
      summary: Upload Csv
      description: >-
        Upload a CSV estimate for catalog resolution, validation, and ESX
        generation.
      operationId: upload_csv_upload_csv_post
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Idempotency-Key
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_csv_upload_csv_post'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - CapoutApiKey: []
components:
  schemas:
    Body_upload_csv_upload_csv_post:
      properties:
        file:
          type: string
          contentMediaType: application/octet-stream
          title: File
        estimate_metadata:
          anyOf:
            - type: string
            - type: 'null'
          title: Estimate Metadata
      type: object
      required:
        - file
      title: Body_upload_csv_upload_csv_post
    UploadResponse:
      properties:
        document_id:
          type: string
          title: Document Id
          description: >-
            Public document ID for status polling, realtime subscriptions, and
            ESX downloads.
        status:
          type: string
          title: Status
          default: processing
        created_at:
          type: string
          format: date-time
          title: Created At
        status_url:
          type: string
          title: Status Url
        ws_url:
          type: string
          title: Ws Url
          default: /ws/status
        download_url:
          type: string
          title: Download Url
          description: >-
            Stable authenticated ESX download URL. It redirects to the
            Contractor profile by default once export is complete.
        contractor_download_url:
          type: string
          title: Contractor Download Url
          description: Stable authenticated URL for the Contractor (8D) ESX file
        carrier_download_url:
          type: string
          title: Carrier Download Url
          description: Stable authenticated URL for the Carrier (5L) ESX file
        source_type:
          type: string
          title: Source Type
          default: PDF
      type: object
      required:
        - document_id
        - created_at
        - status_url
        - download_url
        - contractor_download_url
        - carrier_download_url
      title: UploadResponse
      description: Response body for POST /upload.
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    CapoutApiKey:
      type: apiKey
      description: Organization-scoped CapOut API key
      in: header
      name: capout-api-key

````