Delete a stored scan
delete_scanPermanently remove a stored scan's result, history and thumbnail before its retention window ends. Verify the id with list_scans or get_scan first, since deletion is final and credits are not refunded.
Instructions
Permanently delete one stored scan now, before its retention window would end. This cannot be undone: the stored result, its history row and its thumbnail are removed, and the scan can no longer be listed, fetched or replayed through its idempotency_key. The credit it drew is not refunded, and this period's usage counters still count it. Input: scan_id – meta.id of a scan_document result, or id of a list_scans row. Output: { id, deleted: true }. Calls DELETE /v1/scans/{id}. 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. Errors: an id that is unknown, belongs to another account, has passed its window or was already deleted is refused as not_found, and nothing is deleted. Use it when someone asks for a document's data to be removed; confirm the id with list_scans or get_scan first, because the deletion is final.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scan_id | Yes | The scan's id: meta.id of the scan_document result, or id of a list_scans row (a lower-case UUID). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| deleted | Yes | Always true: the stored result is gone and cannot be read back. |