Documents
The document register: statements, reports, agreements and other files filed on a client, an entity, an account or another record, with their labels and the period they are valid for. Reads need documents:read, writes documents:write and an operator seat. Every write takes ?dry_run=true and an Idempotency-Key header and is logged in the change history. A document from the legacy platform (origin: legacy) is read-only until your tenant has moved: a write is a 409 legacy_managed.
Data model
idstringA UUID.
namestring or nullThe file's display name.
kindstring or nullstatement,kyc,aml,prospectus,fact_sheet,pack,poa,report,invoice,tax_document,trade_confirmation,audit_reportorcustom. A stored document can also be acontract, which the API does not set.file_typestringThe legacy platform's file type:
report,document,image,private-equity,transactionorinvoice. Set through the API, else the legacy file's own (any spelling, an unknown value isdocument), else derived fromkind(an image MIME type isimage).labelsarray of stringLabels set through the API, else the legacy file's tags.
ownerstringaletafor a report Aleta generated,tenantotherwise. An Aleta report can only be relabelled, and only Aleta archives it.target_kind, target_idstring or nullWhat the document is filed on:
tenant,client,party,entity,custody_account,cash_account,holding,transaction,asset,tag,lensorownership, and its id.mime_type, byte_size, sha256string, integer, string or nullThe file.
uploaded_attimestamp or nullRFC 3339, UTC.
valid_from, valid_todate or nullThe period the document covers.
archived_at, archived_by, archive_reasontimestamp, string, string or nullSet once a DELETE archived the document.
originstringlegacy(mirrored from the legacy platform) orv1(made on this platform, including the reports and exports Aleta generates).
List documents
Returns the documents you can see, newest upload first, as a cursor list. An unknown parameter is a 400.
Query parameters
target_kind, target_idstringDocuments filed on this record.
kind, file_typestringDocuments of this kind or file type.
labelstringDocuments carrying this label.
include_archivedbooleanAlso archived documents. Default
false.cursor, limitstring, integerThe page:
limitdefaults to 100, at most 1000.
curl -G https://api.aleta.ai/v1/documents \
-H "Authorization: Bearer {access_token}" \
-d target_kind=client -d target_id=019dfeb0-0511-77a7-a8be-a911ab988a0a
{
"data": [
{
"id": "019f95f0-2d40-7b58-8f6e-9a3c1d7e5b02",
"name": "Q3 statement",
"kind": "statement",
"file_type": "document",
"labels": ["board"],
"owner": "tenant",
"target_kind": "client",
"target_id": "019dfeb0-0511-77a7-a8be-a911ab988a0a",
"mime_type": "application/pdf",
"byte_size": 182044,
"sha256": "9f2c...",
"uploaded_at": "2026-10-02T08:30:00Z",
"valid_from": "2026-07-01",
"valid_to": "2026-09-30",
"archived_at": null,
"archived_by": null,
"archive_reason": null,
"origin": "v1"
}
],
"next_cursor": null,
"limit": 100
}
Retrieve a document
Returns one document, an archived one too. An unknown id, one you cannot see, or one that is not a UUID is a 404.
curl https://api.aleta.ai/v1/documents/019f95f0-2d40-7b58-8f6e-9a3c1d7e5b02 \
-H "Authorization: Bearer {access_token}"
Update a document
Renames, retypes, relabels or re-dates a document; its target never moves. Send at least one field besides reason; unknown fields are a 400. labels: null clears the labels, an array replaces them; status: active brings back an archived document, status: archived is a 400; reason goes to the change history. Answers 200 with the document. A caller without an operator seat gets 403. Changing more than the labels of an Aleta report is a 409 in_use whose next_action is PATCH /v1/documents/{id} with field: labels.
Body parameters
name, kind, file_typestringA file type sets the matching kind unless a kind is given.
labelsarray of string or nullAt most 50, each at most 100 characters; trimmed, and a repeat (any case) is dropped.
valid_from, valid_todate or nullYYYY-MM-DD;valid_tonot beforevalid_from.statusstringactive.reasonstringFor the change history.
curl -X PATCH https://api.aleta.ai/v1/documents/019f95f0-2d40-7b58-8f6e-9a3c1d7e5b02 \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"labels": ["board", "2026"]}'
Delete a document
Archives the document; the file stays and PATCH with status: active brings it back. 204; an archived document answers 204 again. An Aleta report is a 409 in_use for anyone but Aleta; its next_action (ask_aleta) names the document. Optional ?reason= goes to the change history; it takes ?dry_run=true; any other query parameter is a 400.
curl -X DELETE https://api.aleta.ai/v1/documents/019f95f0-2d40-7b58-8f6e-9a3c1d7e5b02 \
-H "Authorization: Bearer {access_token}"
Document extractions
Reading figures out of a document is not part of this release. The three extraction routes are reserved so that a call to them gets a clear answer rather than a 404: after the scope check (documents:read for the reads, documents:write for the create; 403 without it), each answers 501 not_implemented.
GET /v1/document-extractions: list extractions. Answers501.POST /v1/document-extractions: start an extraction. Takes?dry_run=trueandIdempotency-Keylike every write, and answers501.GET /v1/document-extractions/{id}: retrieve one extraction. Answers501.