curl --request POST \
--url https://api.anam.ai/v1/knowledge/documents/{id}/confirm-upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.anam.ai/v1/knowledge/documents/{id}/confirm-upload"
payload = {}
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({})
};
fetch('https://api.anam.ai/v1/knowledge/documents/{id}/confirm-upload', 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.anam.ai/v1/knowledge/documents/{id}/confirm-upload",
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([
]),
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://api.anam.ai/v1/knowledge/documents/{id}/confirm-upload"
payload := strings.NewReader("{}")
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://api.anam.ai/v1/knowledge/documents/{id}/confirm-upload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/knowledge/documents/{id}/confirm-upload")
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 = "{}"
response = http.request(request)
puts response.read_body{
"id": "00000000-0000-0000-0000-000000000000",
"knowledgeFolderId": "00000000-0000-0000-0000-000000000000",
"filename": "getting-started.pdf",
"fileType": "application/pdf",
"fileSize": 248320,
"fileUrl": "https://cdn.anam.ai/knowledge/getting-started.pdf",
"status": "READY",
"errorMessage": null,
"chunkSize": null,
"chunkOverlap": null,
"appliedChunking": {
"strategy": "paragraph",
"chunkSize": 800,
"chunkOverlap": 100,
"source": "folder",
"appliedAt": "2026-04-20T10:01:12.000Z"
},
"createdAt": "2026-04-20T10:00:00.000Z",
"updatedAt": "2026-04-20T10:01:12.000Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"message": "<string>"
}confirm upload knowledge document
Finish a direct upload started with POST /v1/knowledge/groups/{id}/documents/presigned-upload, after the file’s bytes were PUT to its uploadUrl. Reads the uploaded file’s real size from storage, checks it against the 50MB limit and the organization’s monthly knowledge upload quota, and starts processing. A file that is missing from storage, over 50MB or over the quota is rejected and its document deleted (with the stored file); upload it again. The returned document starts in PROCESSING and becomes searchable once it reaches READY. Confirming is idempotent: a document already confirmed, and not deleted, is returned as it is, unchanged. A document deleted before it’s confirmed gets a 404 and doesn’t start; deleting one after it’s confirmed doesn’t stop its processing. Requires an API key with knowledge write access.
curl --request POST \
--url https://api.anam.ai/v1/knowledge/documents/{id}/confirm-upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.anam.ai/v1/knowledge/documents/{id}/confirm-upload"
payload = {}
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({})
};
fetch('https://api.anam.ai/v1/knowledge/documents/{id}/confirm-upload', 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.anam.ai/v1/knowledge/documents/{id}/confirm-upload",
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([
]),
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://api.anam.ai/v1/knowledge/documents/{id}/confirm-upload"
payload := strings.NewReader("{}")
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://api.anam.ai/v1/knowledge/documents/{id}/confirm-upload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/knowledge/documents/{id}/confirm-upload")
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 = "{}"
response = http.request(request)
puts response.read_body{
"id": "00000000-0000-0000-0000-000000000000",
"knowledgeFolderId": "00000000-0000-0000-0000-000000000000",
"filename": "getting-started.pdf",
"fileType": "application/pdf",
"fileSize": 248320,
"fileUrl": "https://cdn.anam.ai/knowledge/getting-started.pdf",
"status": "READY",
"errorMessage": null,
"chunkSize": null,
"chunkOverlap": null,
"appliedChunking": {
"strategy": "paragraph",
"chunkSize": 800,
"chunkOverlap": 100,
"source": "folder",
"appliedAt": "2026-04-20T10:01:12.000Z"
},
"createdAt": "2026-04-20T10:00:00.000Z",
"updatedAt": "2026-04-20T10:01:12.000Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Headers
Body
Not needed. A body is accepted for older clients and ignored, including any fileSize: the size is measured from storage.
The body is of type object.
Response
The upload was confirmed and the document is processing, or it was confirmed before and is returned as it is.
A single file uploaded into a knowledge group. Retrieved chunks reference it by ID.

