Upload statement content
well_upload_statement_contentUpload a bank statement's TEXT CONTENT (a .csv, .txt, or .xml file) directly, as an alternative to well_create_statement_upload's out-of-band file POST.
Use it when the user's statement is a small text file whose contents are verbatim in this conversation (1 MiB decoded limit). Send the content EXACTLY as you received it — never reformat, summarize, transcribe from memory, or reconstruct rows. A mangled relay imports wrong financial data.
This path is BEST-EFFORT fidelity: what Well ingests is what you relayed, not a byte-verified copy of the user's file. The response carries content_sha256 and byte_length of what the server received — report them so a corrupted relay is visible. The parsed rows, totals, and import outcome arrive via well_get_statement_import_result with the returned document_id, not in this response.
PDFs and images NEVER go here (the model cannot relay their bytes faithfully) — use well_upload_statement_bytes. XML with DOCTYPE/ENTITY declarations is rejected. The document enters the same import pipeline as an in-app upload (detection, dedup, promotion).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | The statement's file name, e.g. "statement.csv". Only its extension selects the format. | |
| content_text | Yes | The file's full text content, verbatim. UTF-8 encoded on the wire; capped at 1 MiB decoded. | |
| 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. | |
| 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. |