Complete an upload
curl --request POST \
--url https://api.indoralabs.com/upload/complete \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"uploadId": "upl_123",
"key": "tenant/abc/file/xyz",
"uploadIdS3": "AbC...",
"parts": [
{
"ETag": "\"etag1\"",
"PartNumber": 1
}
]
}
'import requests
url = "https://api.indoralabs.com/upload/complete"
payload = {
"uploadId": "upl_123",
"key": "tenant/abc/file/xyz",
"uploadIdS3": "AbC...",
"parts": [
{
"ETag": "\"etag1\"",
"PartNumber": 1
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uploadId: 'upl_123',
key: 'tenant/abc/file/xyz',
uploadIdS3: 'AbC...',
parts: [{ETag: '"etag1"', PartNumber: 1}]
})
};
fetch('https://api.indoralabs.com/upload/complete', 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.indoralabs.com/upload/complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uploadId' => 'upl_123',
'key' => 'tenant/abc/file/xyz',
'uploadIdS3' => 'AbC...',
'parts' => [
[
'ETag' => '"etag1"',
'PartNumber' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.indoralabs.com/upload/complete"
payload := strings.NewReader("{\n \"uploadId\": \"upl_123\",\n \"key\": \"tenant/abc/file/xyz\",\n \"uploadIdS3\": \"AbC...\",\n \"parts\": [\n {\n \"ETag\": \"\\\"etag1\\\"\",\n \"PartNumber\": 1\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.indoralabs.com/upload/complete")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"uploadId\": \"upl_123\",\n \"key\": \"tenant/abc/file/xyz\",\n \"uploadIdS3\": \"AbC...\",\n \"parts\": [\n {\n \"ETag\": \"\\\"etag1\\\"\",\n \"PartNumber\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.indoralabs.com/upload/complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uploadId\": \"upl_123\",\n \"key\": \"tenant/abc/file/xyz\",\n \"uploadIdS3\": \"AbC...\",\n \"parts\": [\n {\n \"ETag\": \"\\\"etag1\\\"\",\n \"PartNumber\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"file": {
"id": "6ff9fff2-027a-48a0-a5c1-bd2c6e5c03e7",
"org_id": "743db90f-7e76-49f7-8d4e-5f42a16efc06",
"name": "foia_correspondence.mbox",
"size_bytes": 997,
"mime_type": "application/octet-stream",
"department": "Unknown",
"tags": "{}",
"relevancy_score": 0,
"review_status": "pending",
"pages": null,
"duration_seconds": null,
"s3_bucket": "foia-dev-andromeda",
"s3_key": "743db90f-7e76-49f7-8d4e-5f42a16efc06/raw/e863a541-0832-4bce-abb8-11f32ffe5e3b/foia_correspondence.mbox",
"created_by": "ab99f432-1141-43bf-a826-ea015838179f",
"uploaded_at": "2025-08-29 10:28:48.713 -0500",
"updated_at": "2025-08-29 10:28:48.713 -0500",
"s3_bucket_original": "foia-dev-andromeda",
"s3_key_original": "743db90f-7e76-49f7-8d4e-5f42a16efc06/raw/e863a541-0832-4bce-abb8-11f32ffe5e3b/foia_correspondence.mbox",
"s3_bucket_parsed": null,
"s3_key_parsed": null
}
}{
"error": "BadRequest",
"message": "Missing required parameter 'fileId'.",
"details": {
"param": "fileId"
}
}Upload
Complete Upload
Finalize an upload session. Once all file parts are uploaded, call this endpoint to persist the file record, optionally associate it with a case, and enqueue parsing/embedding jobs. This step ensures the uploaded file is fully indexed and ready for search/redaction workflows.
POST
/
upload
/
complete
Complete an upload
curl --request POST \
--url https://api.indoralabs.com/upload/complete \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"uploadId": "upl_123",
"key": "tenant/abc/file/xyz",
"uploadIdS3": "AbC...",
"parts": [
{
"ETag": "\"etag1\"",
"PartNumber": 1
}
]
}
'import requests
url = "https://api.indoralabs.com/upload/complete"
payload = {
"uploadId": "upl_123",
"key": "tenant/abc/file/xyz",
"uploadIdS3": "AbC...",
"parts": [
{
"ETag": "\"etag1\"",
"PartNumber": 1
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uploadId: 'upl_123',
key: 'tenant/abc/file/xyz',
uploadIdS3: 'AbC...',
parts: [{ETag: '"etag1"', PartNumber: 1}]
})
};
fetch('https://api.indoralabs.com/upload/complete', 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.indoralabs.com/upload/complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uploadId' => 'upl_123',
'key' => 'tenant/abc/file/xyz',
'uploadIdS3' => 'AbC...',
'parts' => [
[
'ETag' => '"etag1"',
'PartNumber' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.indoralabs.com/upload/complete"
payload := strings.NewReader("{\n \"uploadId\": \"upl_123\",\n \"key\": \"tenant/abc/file/xyz\",\n \"uploadIdS3\": \"AbC...\",\n \"parts\": [\n {\n \"ETag\": \"\\\"etag1\\\"\",\n \"PartNumber\": 1\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.indoralabs.com/upload/complete")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"uploadId\": \"upl_123\",\n \"key\": \"tenant/abc/file/xyz\",\n \"uploadIdS3\": \"AbC...\",\n \"parts\": [\n {\n \"ETag\": \"\\\"etag1\\\"\",\n \"PartNumber\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.indoralabs.com/upload/complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uploadId\": \"upl_123\",\n \"key\": \"tenant/abc/file/xyz\",\n \"uploadIdS3\": \"AbC...\",\n \"parts\": [\n {\n \"ETag\": \"\\\"etag1\\\"\",\n \"PartNumber\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"file": {
"id": "6ff9fff2-027a-48a0-a5c1-bd2c6e5c03e7",
"org_id": "743db90f-7e76-49f7-8d4e-5f42a16efc06",
"name": "foia_correspondence.mbox",
"size_bytes": 997,
"mime_type": "application/octet-stream",
"department": "Unknown",
"tags": "{}",
"relevancy_score": 0,
"review_status": "pending",
"pages": null,
"duration_seconds": null,
"s3_bucket": "foia-dev-andromeda",
"s3_key": "743db90f-7e76-49f7-8d4e-5f42a16efc06/raw/e863a541-0832-4bce-abb8-11f32ffe5e3b/foia_correspondence.mbox",
"created_by": "ab99f432-1141-43bf-a826-ea015838179f",
"uploaded_at": "2025-08-29 10:28:48.713 -0500",
"updated_at": "2025-08-29 10:28:48.713 -0500",
"s3_bucket_original": "foia-dev-andromeda",
"s3_key_original": "743db90f-7e76-49f7-8d4e-5f42a16efc06/raw/e863a541-0832-4bce-abb8-11f32ffe5e3b/foia_correspondence.mbox",
"s3_bucket_parsed": null,
"s3_key_parsed": null
}
}{
"error": "BadRequest",
"message": "Missing required parameter 'fileId'.",
"details": {
"param": "fileId"
}
}Authorizations
Body
application/json
Server-side upload session id from /upload/init.
S3 key that was uploaded.
S3 UploadId (for multipart).
Completed multipart parts.
Show child attributes
Show child attributes
ETag returned by S3 for single-part upload.
Optional: attach file to case upon finalization.
Response
Upload finalized
Schema inferred from files dataset.
Show child attributes
Show child attributes
Example:
{
"id": "6ff9fff2-027a-48a0-a5c1-bd2c6e5c03e7",
"org_id": "743db90f-7e76-49f7-8d4e-5f42a16efc06",
"name": "foia_correspondence.mbox",
"size_bytes": 997,
"mime_type": "application/octet-stream",
"department": "Unknown",
"tags": "{}",
"relevancy_score": 0,
"review_status": "pending",
"pages": null,
"duration_seconds": null,
"s3_bucket": "foia-dev-andromeda",
"s3_key": "743db90f-7e76-49f7-8d4e-5f42a16efc06/raw/e863a541-0832-4bce-abb8-11f32ffe5e3b/foia_correspondence.mbox",
"created_by": "ab99f432-1141-43bf-a826-ea015838179f",
"uploaded_at": "2025-08-29 10:28:48.713 -0500",
"updated_at": "2025-08-29 10:28:48.713 -0500",
"s3_bucket_original": "foia-dev-andromeda",
"s3_key_original": "743db90f-7e76-49f7-8d4e-5f42a16efc06/raw/e863a541-0832-4bce-abb8-11f32ffe5e3b/foia_correspondence.mbox",
"s3_bucket_parsed": null,
"s3_key_parsed": null
}
⌘I

