Developers/Guides

Data retention

PostBuddy stores recipient data only as long as an item needs it. Once an item has reached a final status (COMPLETED, FAILED, CANCELLED or SUPPRESSED), a daily job anonymises it after the organisation's retention period.

Retention period

The default is 90 days after the item reached its final status. An Owner or Admin changes it per organisation between 30 and 365 days through the organisation settings (PATCH /v1/organisation, field retentionDays); the change is recorded in the audit log. A shorter period applies to items that are already past it at the next run.

What anonymisation does

The item keeps its id, status, timestamps, warnings, external id, price reference and the salted address hash that the suppression list and statistics rely on. The following are removed:

  • the recipient (name and address) and the variables,
  • the carrier codes,
  • the metadata you attached,
  • the production PDF and any preview images; GET /v1/items/{id}/pdf and GET /v1/items/{id}/preview answer 404 from then on.

anonymisedAt on the item tells you when this happened, and the item's event trail gains an entry with reason retention. Anonymised items are left out of data exports.

Before the boundary

Items that are still open (HELD, PENDING_APPROVAL, READY, NEEDS_ATTENTION, scheduled or in production) are never anonymised; NEEDS_ATTENTION items only trigger reminders until they are repaired or cancelled. Export what you need with POST /v1/exports before the retention period ends.