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

# Upload Files to Project

> The Upload Files API endpoint enables organizations to both upload new files and update existing ones within Vault projects. A maximum of 50 files can be uploaded per API request.

### Permissions

Requires `Vault API` and `Modify workspace projects` permissions.


## OpenAPI

````yaml /vault_api.json post /api/v1/vault/upload_files/{project_id}
openapi: 3.0.1
info:
  title: Vault - Upload Documents
  description: >-
    The Vault Upload Documents API enables users to programmatically upload and
    manage documents within Vault projects. This API allows organizations to
    maintain projects with their own internal files for their users to use
    within the Harvey app.
  version: 1.0.0
  contact:
    email: support@harvey.ai
servers:
  - url: https://api.harvey.ai
    description: Harvey API server
security: []
paths:
  /api/v1/vault/upload_files/{project_id}:
    post:
      tags:
        - Vault
      summary: Upload Files to Project
      description: >-
        The Upload Files API endpoint enables organizations to both upload new
        files and update existing ones within Vault projects. A maximum of 50
        files can be uploaded per API request.
      operationId: uploadFilesToProject
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            description: The project ID.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                files:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: >-
                    Path to the files to be uploaded, e.g.
                    `@/path/to/hello_world.pdf`. Each file is a separate
                    multipart/form-data. PDF, DOCX, XLSX, PPT, TXT, RTF, CSV,
                    EML, and other file formats supported (reference our Help
                    Center). Max size of 500 MB for all file types. A maximum of
                    50 files can be uploaded per API request. Beware of HTTPS
                    timeouts if too many large files are sent at a time.
                  example: '@/path/to/hello_world.pdf'
                file_paths:
                  type: array
                  items:
                    type: string
                  description: >-
                    The desired folder structure for the file(s), e.g.
                    `/caselaw/usa/california/sf/hello_world.pdf`. This will be
                    reconciled with the names in the provided `files` paths.
                  example: /caselaw/usa/california/sf/hello_world.pdf
                duplicate_mode:
                  type: string
                  enum:
                    - skip
                    - replace
                    - keep
                  description: >-
                    Determines how duplicate file names are handled. `skip` will
                    not update if a file with the same name already exists.
                    `replace` will create a new file record (with its own unique
                    `file_id`) and set its `root_file_id` to the original
                    `file_id`. `keep` will rename the new file to avoid
                    collision (e.g. `document (1).pdf`).
                  example: skip
      responses:
        '201':
          description: Files successfully uploaded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadResponse'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '413':
          description: Payload too large.
        '429':
          description: Rate limit exceeded.
        '500':
          description: Internal server error.
      security:
        - bearerAuth: []
components:
  schemas:
    UploadResponse:
      type: object
      properties:
        project_id:
          type: string
          description: The project ID.
        file_ids:
          type: array
          items:
            type: string
          description: Array of file IDs that were added to the project.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````