Harvey’s Vault APIs enable your systems to programmatically upload, manage, and delete documents within secure Vault projects. These endpoints support integration with DMS systems, document pipelines, and client workflows requiring consistent structure, metadata, and compliance.

POST /api/v1/vault/upload_files/{project_id}
GET /api/v1/vault/get_metadata/{project_id}
DELETE /api/v1/vault/delete_file/{file_id}

Overview

The Vault APIs are designed to streamline how legal teams ingest and manage large volumes of files (and other supported data formats), making them searchable and reviewable by Harvey. Use it to:

  • Automate Document Ingestion: Upload documents in real-time from your data source of choice (e.g., Document Management System, Contract Lifecycle Management tool, File Storage platform, etc.)
  • Preserve Folder Structure: Create a custom file library system with clear organization using nested directories
  • Track and Manage Files: Retrieve metadata or delete obsolete files as needed automatically

Supported File Types

Vault supports the following formats:

  • PDF
  • Word (.doc, .docx)
  • Excel (.xls, .xlsx)
  • PowerPoint (.ppt, .pptx)
  • Text (.txt)
  • CSV
  • RTF
  • Email (.eml, .msg)
  • Zip archives (.zip)

Use Cases

Use Case 1: Secure Document Storage in Vault

Challenge: Managing legal documents across multiple systems can lead to inefficiencies and security risks.

Solution: Upload files directly into Vault to ensure secure, up-to-date storage with consistent project-level organization.

curl -X POST https://api.harvey.ai/vault/upload_files/{project_id} \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "files=@/path/to/contract.pdf" \
  -F "files=@/path/to/terms.docx" \
  -F "file_paths=contract.pdf" \
  -F "file_paths=terms.docx"

Use Case 2: Retrieve Project Storage Details

Challenge: Without visibility into stored files, users risk losing track of critical documents.

Solution: Use the metadata endpoint to retrieve file IDs, names, sizes, and other details from a Vault project.

curl -X GET https://api.harvey.ai/vault/get_metadata/{project_id} \
  -H "Authorization: Bearer YOUR_API_KEY"

Use Case 3: Remove Outdated or Erroneous Files

Challenge: Projects evolve and occasionally contain outdated or incorrectly uploaded files that must be removed.

Solution: Use the file deletion endpoint to remove files by ID. This is especially useful in automated pipelines or when enforcing compliance.

curl -X DELETE https://api.harvey.ai/vault/delete_file/{file_id} \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Best Practices

Organize by Project

Use distinct project_id values to group documents by matter, client, or internal team structure.

Maintain File Path Consistency

Use the file_paths field to define relative folder structures so that uploads reflect your organization’s hierarchy.

Confirm Uploads and Deletions

After uploading, call GET /vault/get_metadata/{project_id} to confirm files are present. After deletions, check for a 200 confirmation response.

Error Handling

Status CodeDescriptionExample Error Message
201SuccessN/A
400Bad Request – Missing or invalid input{ "error": "Missing file" }
401Unauthorized – Invalid API key{ "error": "Unauthorized" }
404Not Found – Project or File not found{ "error": "File not found" }
500Internal Server Error{ "error": "Unexpected server error" }

Need help getting started? Contact your Harvey Customer Success Manager for more information.