POST
/
api
/
v1
/
vault
/
upload_files
/
{project_id}
Upload Files to Project
curl --request POST \
  --url https://api.harvey.ai/api/v1/vault/upload_files/{project_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form files=@example-file \
  --form file_paths=/caselaw/usa/california/sf/hello_world.pdf \
  --form duplicate_mode=skip
{
  "project_id": "<string>",
  "file_ids": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

project_id
string
required

The project ID.

Body

multipart/form-data
files
file[]

Path to the files to be uploaded, e.g. @/path/to/hello_world.pdf. Each file is a seperate multipart/form-data. PDF, DOCX, XLSX, PPT, TXT, RTF, CSV, and EML documents supported. Max size of 100 MB for all file types. A maximum of 50 files can be uploaded per API request.

Example:

"@/path/to/hello_world.pdf"

file_paths
string[]

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
enum<string>

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.

Available options:
skip,
replace
Example:

"skip"

Response

Files successfully uploaded

project_id
string

The project ID.

file_ids
string[]

Array of file IDs that were added to the project.