Confirm uploaded files
curl --request POST \
--url https://canary.effectiveai.app/api/v2/files/uploads/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirmations": [
{
"uploadToken": "<string>"
}
]
}
'import requests
url = "https://canary.effectiveai.app/api/v2/files/uploads/complete"
payload = { "confirmations": [{ "uploadToken": "<string>" }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({confirmations: [{uploadToken: '<string>'}]})
};
fetch('https://canary.effectiveai.app/api/v2/files/uploads/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://canary.effectiveai.app/api/v2/files/uploads/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([
'confirmations' => [
[
'uploadToken' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://canary.effectiveai.app/api/v2/files/uploads/complete"
payload := strings.NewReader("{\n \"confirmations\": [\n {\n \"uploadToken\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://canary.effectiveai.app/api/v2/files/uploads/complete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"confirmations\": [\n {\n \"uploadToken\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://canary.effectiveai.app/api/v2/files/uploads/complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"confirmations\": [\n {\n \"uploadToken\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"uri": "<string>",
"success": true,
"artifact": {
"id": "<string>",
"name": "<string>",
"nodeKind": "file",
"isIndexed": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"type": "<string>",
"data": {
"id": "<string>",
"name": "<string>",
"size": 123,
"mimeType": "text/plain",
"path": "<string>",
"storageInfo": {
"location": "gcs",
"object": "<string>",
"url": "<string>"
},
"pageCount": 123,
"totalPages": 123,
"pageMapPath": "<string>",
"extractionMethod": "<string>",
"lastModified": 123,
"contentVersion": "<string>",
"indexed": true
},
"parentId": "<string>",
"tags": [],
"metadata": {
"facetSchema": {
"stringFacet1": "<string>",
"stringFacet2": "<string>",
"stringFacet3": "<string>"
},
"description": "<string>"
},
"orgId": "",
"path": "<string>",
"relativePath": "<string>",
"extractedTextPath": "<string>",
"stringFacet1": "<string>",
"stringFacet2": "<string>",
"stringFacet3": "<string>",
"createdBy": "<string>",
"sessionId": "<string>",
"storageScopeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"immutableContent": true,
"contentSha256": "<string>",
"visibility": "org",
"visibleTo": [
"<string>"
],
"currentVersion": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"versionNumber": 1,
"contentSha256": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
},
"error": {
"code": "PERMISSION_DENIED",
"message": "<string>"
}
}
]
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}Files
Confirm uploaded files
Pass up to 100 confirmations after their signed PUTs succeed. JSON body limit: 1 MiB. Shared Vault checks permissions and storage, creates or updates artifacts, and schedules indexing. HTTP 200 may contain per-file failures; inspect every result. Native upload tokens expire after one hour. Completion is not idempotent: replay can create another version and repeat indexing. Inspect the destination after an uncertain result before retrying. Does not create filing items or wait for indexing.
POST
/
files
/
uploads
/
complete
Confirm uploaded files
curl --request POST \
--url https://canary.effectiveai.app/api/v2/files/uploads/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirmations": [
{
"uploadToken": "<string>"
}
]
}
'import requests
url = "https://canary.effectiveai.app/api/v2/files/uploads/complete"
payload = { "confirmations": [{ "uploadToken": "<string>" }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({confirmations: [{uploadToken: '<string>'}]})
};
fetch('https://canary.effectiveai.app/api/v2/files/uploads/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://canary.effectiveai.app/api/v2/files/uploads/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([
'confirmations' => [
[
'uploadToken' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://canary.effectiveai.app/api/v2/files/uploads/complete"
payload := strings.NewReader("{\n \"confirmations\": [\n {\n \"uploadToken\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://canary.effectiveai.app/api/v2/files/uploads/complete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"confirmations\": [\n {\n \"uploadToken\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://canary.effectiveai.app/api/v2/files/uploads/complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"confirmations\": [\n {\n \"uploadToken\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"uri": "<string>",
"success": true,
"artifact": {
"id": "<string>",
"name": "<string>",
"nodeKind": "file",
"isIndexed": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"type": "<string>",
"data": {
"id": "<string>",
"name": "<string>",
"size": 123,
"mimeType": "text/plain",
"path": "<string>",
"storageInfo": {
"location": "gcs",
"object": "<string>",
"url": "<string>"
},
"pageCount": 123,
"totalPages": 123,
"pageMapPath": "<string>",
"extractionMethod": "<string>",
"lastModified": 123,
"contentVersion": "<string>",
"indexed": true
},
"parentId": "<string>",
"tags": [],
"metadata": {
"facetSchema": {
"stringFacet1": "<string>",
"stringFacet2": "<string>",
"stringFacet3": "<string>"
},
"description": "<string>"
},
"orgId": "",
"path": "<string>",
"relativePath": "<string>",
"extractedTextPath": "<string>",
"stringFacet1": "<string>",
"stringFacet2": "<string>",
"stringFacet3": "<string>",
"createdBy": "<string>",
"sessionId": "<string>",
"storageScopeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"immutableContent": true,
"contentSha256": "<string>",
"visibility": "org",
"visibleTo": [
"<string>"
],
"currentVersion": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"versionNumber": 1,
"contentSha256": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
},
"error": {
"code": "PERMISSION_DENIED",
"message": "<string>"
}
}
]
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}Authorizations
Effective API key. Send Authorization: Bearer sk-eai-...
Body
application/json
Confirmations for successfully uploaded files
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
Response
Per-file results, including created/updated artifacts or errors.
Results for each confirmation
Show child attributes
Show child attributes