Upload a document into a source
Upload a file directly into a source. The document is queued for extraction automatically. Duplicate files (by content hash) return a duplicate status with the existing document ID. A source's own key writes into that source only: any other source answers 404.
Request
- Base URLhttps://api.talonic.com
- AuthHTTP bearer
Path parameters
Resource UUID.
Request body multipart/form-data
The document file. Max 500 MB.
"realtime" (default) — processed immediately. "batch" — 50% cost discount, results within 48 hours.
Optional caller grouping key stamped on the document (documents.client_batch_id).
Optional JSON string of a FLAT object { [key]: string | number | boolean | null } (nested objects/arrays rejected 400; ≤50 keys, key ≤128, string value ≤1024), stamped on the document as documents.client_metadata.
Response
Document ingested (or duplicate detected).
ID of the created document. When status is duplicate, this is the id of the linked-duplicate row created for this upload (see existing_document_id for the canonical document).
The uploaded file's own name — present on both the queued and duplicate branches.
The uploaded file's own size in bytes — present on both the queued and duplicate branches.
queued if the document was accepted, duplicate if a matching file already exists.
Present when status is duplicate.
Present when status is duplicate — the canonical document this upload deduplicated to (the linked duplicate reads its extracted data from it). The document_id field carries the id of the linked-duplicate row created for this upload.
Example response
{
"document_id": "f0e1d2c3-b4a5-9687-8765-432109876543",
"filename": "invoice-042.pdf",
"size_bytes": 148213,
"status": "completed",
"source_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Re-extraction started.",
"existing_document_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}Changes
No recorded changes to this operation across all 32 revisions of this API.