List stored scans
list_scansList stored document scans newest first with pagination, helping you find an earlier scan by reference or time before reading or deleting it.
Instructions
List the account's stored scans, most recent first, one page at a time. Inputs: the optional limit (1 to 100 rows, default 20) and cursor (the next_cursor of the previous page; omit it for the first page). Output: scans – one row per scan with id, status (recognized, unreadable, no_document_found, unsupported_document or rejected), billed, duration_ms, reference (your own string from the scan) and created_at – and next_cursor, which is null on the last page. A row holds no extracted data; call get_scan with its id for the full result. Calls GET /v1/scans; it never charges a credit. Only scans made with a live key under a non-zero retention window are stored, and only until that window ends (retain_hours on the scan, or the account's history-retention setting, one year by default); a scan made with retain_hours 0 was never stored. A key reaches its own account's scans and no other account's. Under a sandbox key – the public one or an account's own sk_sandbox_ key – nothing is stored. Under the public sandbox key the answer is an empty list, given without calling the API. Errors: a cursor this API did not issue is refused (validation_failed); a key the API does not know is refused (unauthorized). Use it to find a scan made earlier – by its reference or its time – before reading or deleting it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Rows per page, 1 to 100 (default 20). | |
| cursor | No | next_cursor from the previous page; omit it for the first page. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scans | Yes | The account's scans, most recent first. | |
| next_cursor | Yes | Opaque cursor for the next page: send it back as `cursor` to continue after the last row of this one. Null on the last page. |