Upload statement bytes
well_upload_statement_bytesUpload a bank statement file's BINARY CONTENT (PDF or image) as base64, so the file's real bytes reach Well without any out-of-band HTTP call.
Use it for PDF and image statements up to 5 MiB decoded (the base64 text may be roughly a third larger). Base64-encode the file's bytes EXACTLY — never re-encode a screenshot, a transcription, or a summary of the file. Optionally send the file's sha256 (hex); the server decodes, hashes, and rejects a mismatch, proving the bytes arrived intact.
The response carries content_sha256 and byte_length of the decoded payload — report them for verification. The parsed rows, totals, and import outcome arrive via well_get_statement_import_result with the returned document_id.
Text statements (.csv/.txt/.xml) whose contents are verbatim in this conversation can go through well_upload_statement_content instead. The document enters the same import pipeline as an in-app upload (detection, dedup, promotion).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sha256 | No | The source file's SHA-256 (hex). When sent, a mismatch with the decoded bytes rejects the upload. | |
| filename | Yes | The statement's file name, e.g. "statement.csv". Only its extension selects the format. | |
| workspace_id | No | Target workspace. Omit when the token authorizes one workspace. Required when it authorizes several — a write lands in exactly one workspace and this call would not say which. | |
| content_base64 | Yes | The file's bytes, base64-encoded (RFC 4648; whitespace tolerated). Decoded cap: 5 MiB. | |
| idempotency_key | No | Optional client-supplied key. A retried write with the same key returns the original result instead of re-applying the operation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| success | Yes | ||
| byte_length | No | ||
| document_id | No | Poll well_get_statement_import_result with this id for the import outcome. | |
| deduplicated | No | True when an identical document was already in the workspace — nothing was imported twice. | |
| content_sha256 | No | SHA-256 (hex) of the payload the server received — compare against your source to verify fidelity. |