Data retention
What Dunning keeps, for how long, and why — the summary for whoever has to answer a DPO, an audit, or a judge. The general rule: business evidence is preserved; transient personal data is discarded as soon as it has served its purpose.
What expires automatically
| Data | Retention | Afterwards |
|---|---|---|
Idempotency keys (X-Idempotency-Key + recorded response) | 24 hours | The key expires; the same value then executes a fresh operation |
| Import file content (CSV with names, documents, contacts) | Until processing finishes | The content is deleted — on success or failure. The metadata stays: file name, counts, and the row-by-row error list |
Discarding the CSV is deliberate (LGPD): the raw file contains personal data the system has no need to retain once records were created or rejected. What you need for auditing and fixing — how many created, how many updated, which row failed and why — remains available.
What is preserved as evidence
- Audit trail — append-only: action records are never edited or deleted. It is the operation's evidentiary base.
- Rule versions — every published version is an immutable snapshot; editing the rule creates new versions, never rewrites old ones. You can always prove which sequence was in force when a debtor was contacted.
- Step executions and notifications — what was sent, through which channel, when, and why something was not sent (suppressed, rescheduled, cancelled, with a typed reason).
- Webhook events — persisted immutably before any delivery; every delivery attempt is recorded with the request and response captured (deliveries and retry).
- Suppressions — creation and revocation are recorded with type, scope, origin, and evidence, even after they expire or are revoked.
- Revoked API keys — the token dies immediately (
401responses), but the key's record stays in the listing for history and audit. - Agreements — acceptance stores the date, IP, and the exact terms in force at that moment.
What this means for your integration
- Do not reuse idempotency keys after 24 hours expecting a replay — on the server side they have already expired.
- Do not treat Dunning as file storage: the imported CSV is not available for later download. Keep the original on your side if your internal policy requires it.
- You can rely on the trail: to reconstruct "what happened to this charge", the combination of audit trail + executions + notifications + versions answers without depending on your own logs.