Skip to main content
POST
/
api
/
v1
/
vault
/
create_project
Create a new Vault project
curl --request POST \
  --url https://api.harvey.ai/api/v1/vault/create_project \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'name=Example Legal Documents Project' \
  --form is_knowledge_base_project=true \
  --form client_matter_id=11111111-2222-3333-4444-555555555555
import requests

url = "https://api.harvey.ai/api/v1/vault/create_project"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nExample Legal Documents Project\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_knowledge_base_project\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"client_matter_id\"\r\n\r\n11111111-2222-3333-4444-555555555555\r\n-----011000010111000001101001--"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "multipart/form-data"
}

response = requests.post(url, data=payload, headers=headers)

print(response.text)
const form = new FormData();
form.append('name', 'Example Legal Documents Project');
form.append('is_knowledge_base_project', 'true');
form.append('client_matter_id', '11111111-2222-3333-4444-555555555555');

const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

options.body = form;

fetch('https://api.harvey.ai/api/v1/vault/create_project', 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/create_project",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nExample Legal Documents Project\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_knowledge_base_project\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"client_matter_id\"\r\n\r\n11111111-2222-3333-4444-555555555555\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.harvey.ai/api/v1/vault/create_project"

payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nExample Legal Documents Project\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_knowledge_base_project\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"client_matter_id\"\r\n\r\n11111111-2222-3333-4444-555555555555\r\n-----011000010111000001101001--")

req, _ := http.NewRequest("POST", url, payload)

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.post("https://api.harvey.ai/api/v1/vault/create_project")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nExample Legal Documents Project\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_knowledge_base_project\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"client_matter_id\"\r\n\r\n11111111-2222-3333-4444-555555555555\r\n-----011000010111000001101001--")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.harvey.ai/api/v1/vault/create_project")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nExample Legal Documents Project\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_knowledge_base_project\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"client_matter_id\"\r\n\r\n11111111-2222-3333-4444-555555555555\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
{
  "project_id": "proj_1234567890abcdef",
  "name": "My Legal Documents",
  "description": "Project for storing legal case documents",
  "created_at": "2024-01-15T10:30:00Z",
  "settings": {
    "max_file_size": 104857600,
    "max_files": 1000,
    "allowed_file_types": [
      "pdf",
      "docx",
      "xlsx",
      "pptx",
      "txt",
      "rtf",
      "csv",
      "eml"
    ]
  },
  "status": "active"
}

Permissions

Requires Vault API and Modify workspace projects permissions.

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data
name
string
required

The name of the new project

Example:

"Example Legal Documents Project"

is_knowledge_base_project
boolean

Flag indicating whether this project is a knowledge base

Example:

true

client_matter_id
string<uuid>

When set, associates the new project with this client matter. Use the client matter UUID (from Client Matters API responses), not the human-readable matter number.

Example:

"11111111-2222-3333-4444-555555555555"

Response

Project successfully created

project_id
string

The unique identifier of the created project.

Example:

"proj_1234567890abcdef"

name
string

The name of the created project.

Example:

"My Legal Documents"

description
string

The description of the project.

Example:

"Project for storing legal case documents"

created_at
string<date-time>

Timestamp when the project was created.

Example:

"2024-01-15T10:30:00Z"

settings
object
status
string

The status of the project.

Example:

"active"