import requests
response = requests.post(
"https://api.docintell.com/v1/documents",
headers={"Authorization": "Bearer dk_live_YOUR_API_KEY"},
files={"file": open("invoice.pdf", "rb")},
data={"retention_years": 7}
)
print(response.json())const formData = new FormData();
formData.append("file", fs.createReadStream("invoice.pdf"));
formData.append("retention_years", "7");
const response = await fetch("https://api.docintell.com/v1/documents", {
method: "POST",
headers: { Authorization: "Bearer dk_live_YOUR_API_KEY" },
body: formData,
});
console.log(await response.json());curl -X POST https://api.docintell.com/v1/documents \
-H "Authorization: Bearer dk_live_YOUR_API_KEY" \
-F "file=@invoice.pdf" \
-F "retention_years=7"const form = new FormData();
form.append('file', '<string>');
form.append('retention_years', '7');
form.append('document_type', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('http://localhost:8000/v1/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/documents",
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=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"retention_years\"\r\n\r\n7\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$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 := "http://localhost:8000/v1/documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"retention_years\"\r\n\r\n7\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8000/v1/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"retention_years\"\r\n\r\n7\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/documents")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"retention_years\"\r\n\r\n7\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"created_at": "2025-11-22T18:30:00Z",
"document_id": "6789def0-abcd-4567-ef01-23456789abcd",
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"vault_uri": "gs://docintel-vault-prod/tenant-123/2025/550e8400.pdf"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Upload a document for extraction
Upload a PDF document for extraction.
Accepts a PDF document and queues it for extraction processing. The document is stored in immutable storage with the specified retention period for SEC 17a-4 compliance.
Optionally provide a document_type hint to skip auto-classification. Supported types: capital_call, distribution, k1, nav_statement, audited_financial, invoice, trade_confirmation, wire_confirmation, subscription_agreement, insurance, investor_letter.
Configure webhooks via POST /v1/webhooks to receive notifications when
processing completes.
Returns: IngestResponse with document_id, job_id, and status.
Raises: HTTPException 400: Invalid file type (only PDFs supported) HTTPException 413: File exceeds maximum size limit HTTPException 429: Rate limit exceeded
import requests
response = requests.post(
"https://api.docintell.com/v1/documents",
headers={"Authorization": "Bearer dk_live_YOUR_API_KEY"},
files={"file": open("invoice.pdf", "rb")},
data={"retention_years": 7}
)
print(response.json())const formData = new FormData();
formData.append("file", fs.createReadStream("invoice.pdf"));
formData.append("retention_years", "7");
const response = await fetch("https://api.docintell.com/v1/documents", {
method: "POST",
headers: { Authorization: "Bearer dk_live_YOUR_API_KEY" },
body: formData,
});
console.log(await response.json());curl -X POST https://api.docintell.com/v1/documents \
-H "Authorization: Bearer dk_live_YOUR_API_KEY" \
-F "file=@invoice.pdf" \
-F "retention_years=7"const form = new FormData();
form.append('file', '<string>');
form.append('retention_years', '7');
form.append('document_type', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('http://localhost:8000/v1/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/documents",
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=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"retention_years\"\r\n\r\n7\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$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 := "http://localhost:8000/v1/documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"retention_years\"\r\n\r\n7\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8000/v1/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"retention_years\"\r\n\r\n7\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/documents")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"retention_years\"\r\n\r\n7\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"created_at": "2025-11-22T18:30:00Z",
"document_id": "6789def0-abcd-4567-ef01-23456789abcd",
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"vault_uri": "gs://docintel-vault-prod/tenant-123/2025/550e8400.pdf"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
Response
Document accepted for processing
Response for document ingestion (POST /v1/documents).
Returns 202 Accepted with job tracking information. Webhooks are configured separately via POST /v1/webhooks.