Create Request
curl --request POST \
--url https://api.harvey.ai/api/v1/intake/requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form idempotency_key=ticket-48213 \
--form 'title=Review the Northwind master services agreement' \
--form 'description=Counterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off.' \
--form files=@example-fileimport requests
url = "https://api.harvey.ai/api/v1/intake/requests"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = {
"idempotency_key": "ticket-48213",
"title": "Review the Northwind master services agreement",
"description": "Counterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off."
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('idempotency_key', 'ticket-48213');
form.append('title', 'Review the Northwind master services agreement');
form.append('description', 'Counterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off.');
form.append('files', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.harvey.ai/api/v1/intake/requests', 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/intake/requests",
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=\"idempotency_key\"\r\n\r\nticket-48213\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nReview the Northwind master services agreement\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nCounterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\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/intake/requests"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idempotency_key\"\r\n\r\nticket-48213\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nReview the Northwind master services agreement\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nCounterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\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/intake/requests")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idempotency_key\"\r\n\r\nticket-48213\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nReview the Northwind master services agreement\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nCounterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvey.ai/api/v1/intake/requests")
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=\"idempotency_key\"\r\n\r\nticket-48213\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nReview the Northwind master services agreement\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nCounterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"request_id": "6b5d8f02-4c1a-4f8e-9a77-2d0c3e5b1a94",
"status": "TODO",
"harvey_url": "https://app.harvey.ai/intake/requests/6b5d8f02-4c1a-4f8e-9a77-2d0c3e5b1a94"
}Intake
Create Request
Submits a request into your workspace’s Intake queue and returns its identifier. Read the intake request for its progress.
POST
/
api
/
v1
/
intake
/
requests
Create Request
curl --request POST \
--url https://api.harvey.ai/api/v1/intake/requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form idempotency_key=ticket-48213 \
--form 'title=Review the Northwind master services agreement' \
--form 'description=Counterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off.' \
--form files=@example-fileimport requests
url = "https://api.harvey.ai/api/v1/intake/requests"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = {
"idempotency_key": "ticket-48213",
"title": "Review the Northwind master services agreement",
"description": "Counterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off."
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('idempotency_key', 'ticket-48213');
form.append('title', 'Review the Northwind master services agreement');
form.append('description', 'Counterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off.');
form.append('files', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.harvey.ai/api/v1/intake/requests', 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/intake/requests",
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=\"idempotency_key\"\r\n\r\nticket-48213\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nReview the Northwind master services agreement\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nCounterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\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/intake/requests"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idempotency_key\"\r\n\r\nticket-48213\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nReview the Northwind master services agreement\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nCounterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\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/intake/requests")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idempotency_key\"\r\n\r\nticket-48213\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nReview the Northwind master services agreement\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nCounterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvey.ai/api/v1/intake/requests")
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=\"idempotency_key\"\r\n\r\nticket-48213\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nReview the Northwind master services agreement\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nCounterparty sent back redlines on the termination and liability sections. Please review against our standard positions and flag anything that needs partner sign-off.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"request_id": "6b5d8f02-4c1a-4f8e-9a77-2d0c3e5b1a94",
"status": "TODO",
"harvey_url": "https://app.harvey.ai/intake/requests/6b5d8f02-4c1a-4f8e-9a77-2d0c3e5b1a94"
}Permissions
RequiresIntake API permission, and one of Intake requests, Intake access, or Intake admin permission. If these permissions are not available to select, contact support@harvey.ai.Authorizations
Body
multipart/form-data
An identifier you choose for this request, unique within your workspace. A retry carrying a key Harvey has already accepted returns the original request with 200 instead of creating a second one. Must not be blank or whitespace only.
Minimum string length:
1Example:
"ticket-48213"
Response
A request with this idempotency_key was already accepted. The body names the original request, and nothing new was created.
Returned when a request is submitted, and when a retry replays an idempotency key Harvey already accepted.