API reference
Delete document
Delete a document to end API access and clear its stored results and document fields. Storage deletion is attempted immediately and retried if needed. Separate account and financial records follow their own retention rules, as described below.
On this page
DELETE/v1/documents/{document_id}
Path parameters
document_idstringRequired
The doc_… ID that create document returned.
Responses
Deleted from the API, with no body. Stored results and document fields are cleared; physical storage cleanup may still be pending.
Errors
Every error uses the typed error envelope.
| Error | Meaning | Retryable |
|---|---|---|
400 invalid_request | The request body, headers, query parameters or path did not validate. What to do | No |
401 invalid_api_key | The API key was not accepted. What to do | No |
404 document_not_found | The document does not exist in this account or was deleted. Never treat this as a successful DELETE. What to do | No |
429 rate_limit_exceeded | Too many requests. Wait at least Retry-After, then retry a limited number of times. Create and upload-complete enforce rate limits today; the other operations reserve this response. What to do | Yes, after Retry-After |
500 internal_error | Something failed on our side. An HTTP 500 alone does not mean you may retry; check retryable and keep the request ID. What to do | No |
Never treat 404 document_not_found as a successful delete. If a DELETE timed out or got no response, you may retry the same DELETE once.
Deletion semantics
Deleting the same document again returns success while its deletion record is still retained. If the delete is recorded before processing finishes, the document is not billed and does not come back; stopping work already sent to a processing provider is best-effort.
Deleting one document never affects other documents in the same accounting_entity_id namespace.
Some records are kept after a document is deleted: your account’s discovery index of accounting-entity IDs (each accounting_entity_id you have used, with when it was first and last seen, kept for the active account lifetime), required financial and security records, and the platform logs of Vercel, our hosting provider. Copies in your own systems are yours to delete. Deleting a document does not close your account. See the Privacy Notice's retention and account-closure details.