Create statement upload slot
well_create_statement_uploadMint a one-time, short-lived upload slot for a bank-statement file.
Use this when the user has a statement file (PDF, or a large CSV/XML) to import; the file's bytes do not travel through the model. It returns a single-use upload URL + token; the client (or the user) POSTs the raw file bytes to that URL, and the resulting document enters the exact same import pipeline as an in-app upload (detection, dedup, promotion).
This result renders a card in widget-capable hosts right away — do not wait for a poll to make it appear. Once the client has uploaded the file bytes, call well_get_statement_import_result with the document_id below ONE time to learn the outcome. The card refreshes itself as extraction and promotion complete, so a repeated poll only serves your own narration in chat, never the card's rendering.
The token authorizes exactly ONE upload to this workspace and expires in 15 minutes. It is burned on first use — a second upload needs a new slot. It cannot be used for anything other than a statement upload.
The response's document_id is PRE-ALLOCATED at mint time — the upload has not happened yet, and this exact id is what the document will carry once it does. A call to well_get_statement_import_result before the upload lands is a normal "not_found_yet", not an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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 | ||
| token | No | ||
| success | Yes | ||
| upload_url | No | ||
| document_id | No | The pre-allocated document id — poll well_get_statement_import_result with it. | |
| expires_in_seconds | No |