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

# Upload a document



## OpenAPI

````yaml /api-reference/openapi.json post /v1/companies/{id}/documents
openapi: 3.0.0
info:
  version: 1.0.0
  title: Caplia Investor API
  description: >-
    Public REST API for the Caplia Investor Portal. Auth: `Authorization: Bearer
    cap_inv_live_<32 chars>`.
  contact:
    name: Caplia
    url: https://docs.venture.caplia.ai
servers:
  - url: https://api.venture.caplia.ai
    description: Production
security: []
paths:
  /v1/companies/{id}/documents:
    post:
      tags:
        - Data rooms
      summary: Upload a document
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  nullable: true
                category:
                  type: string
                name:
                  type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                  category:
                    type: string
                    nullable: true
                  size:
                    type: number
                    nullable: true
                  type:
                    type: string
                    nullable: true
                  uploaded_at:
                    type: string
                    nullable: true
                required:
                  - id
                  - name
                  - category
                  - size
                  - type
                  - uploaded_at
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      request_id:
                        type: string
                    required:
                      - code
                      - message
                      - request_id
                required:
                  - error
        '404':
          description: Not found or out of scope
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      request_id:
                        type: string
                    required:
                      - code
                      - message
                      - request_id
                required:
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      request_id:
                        type: string
                    required:
                      - code
                      - message
                      - request_id
                required:
                  - error

````