curl --request GET \
--url https://api.harvey.ai/api/v1/vault/projects/{project_id}/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.harvey.ai/api/v1/vault/projects/{project_id}/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.harvey.ai/api/v1/vault/projects/{project_id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.harvey.ai/api/v1/vault/projects/{project_id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.harvey.ai/api/v1/vault/projects/{project_id}/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.harvey.ai/api/v1/vault/projects/{project_id}/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvey.ai/api/v1/vault/projects/{project_id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"response": {
"content": {
"files": [
{
"id": "018e38dc-8726-7bc2-af5d-bdd5d04c84ec",
"name": "engagement_letter.pdf",
"content_type": "application/pdf",
"processing_status": "READY_TO_QUERY",
"size": 184320,
"uploaded_at": 1767225600
},
{
"id": "0199c5c1-50d9-7d60-93aa-cd65c3b7d5a9",
"name": "merger_agreement.docx",
"content_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"processing_status": "PROCESSING",
"size": 521447,
"uploaded_at": 1767139200
}
],
"pagination": {
"page_size": 20,
"has_more": true,
"next_cursor": "eyJsYXN0X2ZpbGVfaWQiOiAiMDE5OWM1YzEtNTBkOS03ZDYwLTkzYWEtY2Q2NWMzYjdkNWE5In0=",
"total_count": 137
}
}
}
}{
"error": "Invalid query parameters",
"details": [
{
"field": "processing_status",
"message": "Value error, processing_status must be one of: ['PROCESSING', 'READY_TO_QUERY', 'READY_TO_REVIEW', 'RECOVERABLE_FAILURE', 'UNRECOVERABLE_FAILURE', 'UPLOADED']"
}
]
}List Files in a Vault Project
Lists files within a single vault project, with filtering and sorting supported.
Pagination. Omit cursor on the first request. Subsequent requests should pass back the next_cursor value returned in the previous response. Continue until has_more is false.
curl --request GET \
--url https://api.harvey.ai/api/v1/vault/projects/{project_id}/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.harvey.ai/api/v1/vault/projects/{project_id}/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.harvey.ai/api/v1/vault/projects/{project_id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.harvey.ai/api/v1/vault/projects/{project_id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.harvey.ai/api/v1/vault/projects/{project_id}/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.harvey.ai/api/v1/vault/projects/{project_id}/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvey.ai/api/v1/vault/projects/{project_id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"response": {
"content": {
"files": [
{
"id": "018e38dc-8726-7bc2-af5d-bdd5d04c84ec",
"name": "engagement_letter.pdf",
"content_type": "application/pdf",
"processing_status": "READY_TO_QUERY",
"size": 184320,
"uploaded_at": 1767225600
},
{
"id": "0199c5c1-50d9-7d60-93aa-cd65c3b7d5a9",
"name": "merger_agreement.docx",
"content_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"processing_status": "PROCESSING",
"size": 521447,
"uploaded_at": 1767139200
}
],
"pagination": {
"page_size": 20,
"has_more": true,
"next_cursor": "eyJsYXN0X2ZpbGVfaWQiOiAiMDE5OWM1YzEtNTBkOS03ZDYwLTkzYWEtY2Q2NWMzYjdkNWE5In0=",
"total_count": 137
}
}
}
}{
"error": "Invalid query parameters",
"details": [
{
"field": "processing_status",
"message": "Value error, processing_status must be one of: ['PROCESSING', 'READY_TO_QUERY', 'READY_TO_REVIEW', 'RECOVERABLE_FAILURE', 'UNRECOVERABLE_FAILURE', 'UPLOADED']"
}
]
}Permissions
RequiresVault API permission and access to the specified vault project.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the vault project
Query Parameters
Opaque pagination cursor returned in the previous response's next_cursor field. Omit on the first request.
2048Maximum number of files to return per page.
1 <= x <= 100Case-insensitive substring match on file name. % and _ are treated as literals, not SQL LIKE wildcards.
256Filter by MIME type. Repeat the query parameter to match any of multiple values (e.g. ?content_type=application/pdf&content_type=text/plain). Up to 20 values, each at most 256 characters.
20256Filter by processing status. Repeat the query parameter to match any of multiple values. Accepted case-insensitively (READY_TO_QUERY and ready_to_query are equivalent). Internal-only statuses are rejected. Up to 20 values.
20UPLOADED, PROCESSING, READY_TO_QUERY, READY_TO_REVIEW, RECOVERABLE_FAILURE, UNRECOVERABLE_FAILURE Inclusive lower bound on the file's upload time, as a UTC Unix epoch timestamp in seconds. Must be strictly less than uploaded_before when both are provided.
Inclusive upper bound on the file's upload time, as a UTC Unix epoch timestamp in seconds.
Field to sort the results by. Accepted case-insensitively.
name, uploaded_at, size Sort direction. Accepted case-insensitively. Results include the file id as a deterministic tiebreaker so cursor-paginated ordering is stable across pages.
asc, desc Response
Successfully retrieved project files
Show child attributes
Show child attributes