BitelioBitelio
Guides

Data Retention

How long Bitelio keeps email content, request logs, and idempotency keys

Bitelio keeps the record of everything you send indefinitely. Some of the bulkier data attached to those records is aged out on a schedule to keep storage bounded.

DataKept forWhat happens after
Email metadata and metricsIndefinitelyNever removed
Rendered email HTML90 daysBody is cleared; the email row remains
API request logs30 daysLog entry is deleted
Idempotency keys24 hoursKey is deleted and becomes reusable

Email content

Every email Bitelio sends is stored with its fully rendered HTML body, which is what the Preview button on a contact's activity feed displays. That body is by far the largest thing Bitelio stores per email, so after 90 days it is cleared.

Clearing the body does not delete the email. Everything you analyse or segment on is kept permanently:

  • Recipient, subject, sender, and send time
  • Delivery status, and the timestamps for delivery, opens, clicks, bounces, and complaints
  • Open and click counts
  • The campaign, workflow, or template the email came from

The only visible effect is that emails older than 90 days no longer offer a preview of their content in the dashboard. Segment filters built on email activity are unaffected, since they read the event timestamps rather than the body.

Clearing is irreversible. If you need a permanent archive of exact sent content, capture it on your side at send time, or reconstruct it from the template and the contact's data.

API request logs

Bitelio logs most API requests — public API calls, resource changes, authentication attempts, and any failed request — for debugging and audit purposes. These log entries are deleted after 30 days. This affects request-level troubleshooting only; the emails and events those requests created are unaffected.

Idempotency keys

A claimed Idempotency-Key is retained until it expires, 24 hours after it was claimed, and is then removed. Expiry is what makes a key reusable, so this cleanup is part of how idempotency works rather than a storage concern.

Self-hosting

Retention runs as scheduled jobs on the worker process, so a deployment that never runs the worker will grow without bound.

JobSchedule
Email body cleanupDaily, 04:00
API request log cleanupDaily, 03:00
Idempotency key cleanupHourly, on the hour

Daily jobs run in the worker container's local timezone. Set TZ on that container if you need them to land at a specific hour.

The 90-day and 30-day windows are compiled in rather than read from the environment. The idempotency key TTL is the exception and can be tuned with IDEMPOTENCY_KEY_TTL_HOURS.

The first run after upgrading clears the backlog of every email body older than 90 days at once. On a large database this takes a while. Postgres will reuse the freed space for new rows, but the table will not shrink on disk without a VACUUM FULL.