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

# Upload

> Adds documents for a collaborator to a folder of the employee documents: all of them, or none when one is refused. The request is a multipart one, carrying up to 20 files (`files[]`), each within the maximum size of the instance, the whole within the 20 MB the web server accepts.

> [!WARNING]
>
> This endpoint is in preview: it may change without notice until it becomes part of a stable version.


## OpenAPI

````yaml preview post /api/document/resource-documents.upload
openapi: 3.1.0
info:
  title: tipee
  version: preview
servers: []
security:
  - basicAuth: []
tags:
  - name: Activity
    description: Activity
  - name: Balances
    description: Balances
  - name: Directory
    description: Directory
  - name: Document
    description: Document
  - name: Expenses
    description: Expenses
  - name: Schedule
    description: Schedule
  - name: Security
    description: Security
  - name: Timeclock
    description: Timeclock
paths:
  /api/document/resource-documents.upload:
    post:
      tags:
        - Document
      summary: Upload
      description: >-
        Adds documents for a collaborator to a folder of the employee documents:
        all of them, or none when one is refused. The request is a multipart
        one, carrying up to 20 files (`files[]`), each within the maximum size
        of the instance, the whole within the 20 MB the web server accepts.
      operationId: post_app_ui_api_document_documentcommand_uploadresourcedocuments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadResourceDocumentsCommand'
      responses:
        '201':
          description: Documents uploaded, their ids in the order of the files.
          content:
            application/json:
              schema:
                required:
                  - ids
                properties:
                  ids:
                    type: array
                    items:
                      $ref: '#/components/schemas/Snowflake'
                type: object
components:
  schemas:
    UploadResourceDocumentsCommand:
      required:
        - files
        - folder_id
        - resource_id
      properties:
        files:
          type: array
          items:
            $ref: '#/components/schemas/FileBlob'
          maxItems: 20
          minItems: 1
        folder_id:
          $ref: '#/components/schemas/Snowflake'
        resource_id:
          $ref: '#/components/schemas/Snowflake'
        name:
          description: >-
            Names the documents instead of using the filenames, whose extensions
            they keep nonetheless. Several documents are numbered: "Contract
            (1).pdf", "Contract (2).png".
          type: string
        visible:
          description: >-
            Whether the collaborator sees the documents, by default as the
            instance configures it. A collaborator always sees the documents
            they upload themselves.
          type: boolean
        send_notification:
          description: >-
            Whether the collaborator is notified of the documents they see, by
            default as the instance configures it.
          type: boolean
      type: object
      additionalProperties: false
    Snowflake:
      type: string
      format: snowflake
      example: '872815618512410358'
    FileBlob:
      type: string
      format: binary
      example: (binary)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.