- Keeping sensitive files for minutes instead of a month (
none). - Giving people time to download or open a document before it goes (
7d,30d). - Keeping an artifact online for up to 90 days (
90d).
How it works
- A document finishes (
ready,failedorcanceled). Doconda setsexpires_atto that moment plus its retention. - Each time a hand-edited file is saved,
expires_atis counted again from that save, except withretention: "none". - When
expires_atpasses, Doconda deletes the content and setscontent_deleted_at.
metadata, and for an artifact, its page and its data.
What stays: the document record, without its content. It keeps its name, status, format, type, pages,
quality, style_applied, the error if it failed, and the cost.
After deletion, GET /documents/{id} still answers, without outputs. /report, /events and /data answer
410 content_deleted.
Configuration
A document uses its own
retention if you set one, and otherwise its project’s.
For a whole project
In the dashboard, go to Organization → Projects and change Kept for. Only an owner can change it. It applies to documents created from then on in that project, and to files you upload withPOST /files. Documents that
already exist keep their own retention.
For one document
In the API, setretention in POST /documents:
Limitations
- Converting a file doesn’t take
retention: a text result is not kept at all, and a file result is deleted 15 minutes after it is made. - An artifact with
retention: "none"can only keep its data in each visitor’s browser (artifact.storage: "local"), and its page is delivered as a file to download. Asking forsharedstorage is rejected with422 retention_none_shared. - Events are also kept 7 days at most: after that,
/eventsanswers410 events_expiredeven with a longer retention.
Delete a document sooner
CallDELETE /documents/{id} (documents.delete() in the SDKs). It deletes the content at once and removes the
document: it leaves your lists and GET /documents/{id} answers 404 not_found. A document that is still being made can’t be deleted (409 document_not_finished): cancel it
first.
Next steps
Receive webhooks
Take each document to your system as soon as it finishes.
Artifacts
How long an artifact’s page and data last.