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

# Post v4corecompanies documents



## OpenAPI

````yaml /openapi_v4_core.json post /v4/core/companies/{companyId}/documents
openapi: 3.0.0
info:
  title: Commenda Integrations V4 API
  description: Commenda Integrations — unified accounting, commerce, and CRM API.
  version: 4.0.0
  contact: {}
servers:
  - url: https://api.integrations.commenda.io
    description: Production
security:
  - api_key: []
tags: []
paths:
  /v4/core/companies/{companyId}/documents:
    post:
      tags:
        - DocumentWrite
      operationId: DocumentWriteController_uploadDocument
      parameters:
        - name: companyId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: File to upload (multipart form field `file`).
                document_type:
                  type: string
                  example: INVOICE
                  description: Parent record type.
                document_type_id:
                  type: string
                  example: inv_123
                  description: Platform ID of the parent record.
                base64_file:
                  type: string
                  description: >-
                    Base64-encoded file content, as an alternative to a
                    multipart `file`.
                file_name:
                  type: string
                  example: invoice.pdf
                  description: File name, required when using `base64_file`.
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: File to upload (multipart form field `file`).
                document_type:
                  type: string
                  example: INVOICE
                  description: Parent record type.
                document_type_id:
                  type: string
                  example: inv_123
                  description: Platform ID of the parent record.
                base64_file:
                  type: string
                  description: >-
                    Base64-encoded file content, as an alternative to a
                    multipart `file`.
                file_name:
                  type: string
                  example: invoice.pdf
                  description: File name, required when using `base64_file`.
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
components:
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api_key
      description: Your Commenda Integrations API key, sent in the `api_key` header.

````