Skip to main content

Upload bank statements

POST 

/api/v1/workspaces/:workspace_id/companies/:company_id/bank_statements

Uploads one or more statement files into a company. One file, one statement, so this 202 answers a COLLECTION - one row per file, in request order, each with its own account, state and error - and you poll N ids rather than one. A file that fails extraction never takes its siblings down with it. A part naming an account you cannot reach is different: that is a malformed request, so the whole upload is refused and nothing is stored.

The extraction sends the statement to Mistral AI​

In extract mode - the default when the mode part is omitted - the uploaded file is made available to Mistral AI, a third-party OCR provider, for reading. State it to whoever uploads through you before they send a bank statement: these are financial records, and the decision to have them read by an external processor is theirs to make knowingly.

The flow, exactly: the extraction job generates a signed, expiring URL to the stored file and posts that URL to Mistral's OCR endpoint (https://api.mistral.ai/v1/ocr); Mistral fetches the document from it and returns the lines and balances this API then publishes. The URL is signed for 5 minutes, which bounds how long it can be fetched from - it says nothing about what the provider does with what it already read. Scribee publishes no statement here about Mistral's retention or processing location; if your own processing record needs those, ask us rather than infer them from this page.

Two ways the call does NOT reach Mistral. mode=archive stores the file and nothing else - no extraction is queued and nothing leaves the platform; use it whenever you want retention without reading. And AI extraction is a per-company setting that is off unless it was turned on in Scribee: with it off, an extract upload is accepted and stored, no extraction runs, and the statement simply stays pending - so a 202 is not on its own evidence that anything was sent anywhere.

Request​

Responses​

The files were accepted. Each row exists and is yours to poll; none of them has been extracted yet.

Check for meta.unqueued_statement_ids before you start polling. It is absent from the ordinary upload, and present when the statements were stored but one or more extractions could not be started. Those ids will sit at pending with nothing reading them until you re-drive each one with POST /bank_statements/{id}/retry. Retry exactly those: the rest are queued, and re-driving them pays for a second extraction. Do NOT upload the files again - the statements in data already exist, and a fresh upload duplicates them. Replaying this Idempotency-Key is safe and returns this same body with Idempotency-Replayed: true; it creates nothing.