Skip to main content

Platform Settings

Administrators can configure platform-wide settings that affect all users via the dashboard or GET/PUT /api/v1/admin/settings.

tip

For the full request/response schema, see the interactive API Reference at /docs on your Posta instance.

Get Settings

GET /api/v1/admin/settings

Returns all platform settings as a list of key-value entries.

Update Settings

Settings are updated in bulk by supplying an array of key-value pairs:

PUT /api/v1/admin/settings
{
"settings": [
{ "key": "registration_enabled", "value": "true", "type": "bool" },
{ "key": "retention_days", "value": "60", "type": "int" }
]
}

Keys prefixed with app. are reserved and cannot be modified.

Available Settings

KeyTypeDefaultDescription
registration_enabledboolfalseAllow new user self-registration
require_email_verificationbooltrueRequire email verification on sign-up
require_domain_verificationbooltrueRequire domain ownership verification before sending
default_rate_limit_hourlyint100Default hourly send limit for new workspaces
default_rate_limit_dailyint1000Default daily send limit for new workspaces
max_batch_sizeint100Default max recipients per batch send
max_attachment_size_mbint10Default max attachment size in MB
retention_daysint30Days to retain email records (metadata). Upper bound for the content windows below
email_body_retention_daysintretention_daysDays to retain email body content (HTML/text). Capped at retention_days
email_attachment_retention_daysintretention_daysDays to retain attachments and raw inbound messages. Capped at retention_days
audit_log_retention_daysint90Days to retain audit log entries
webhook_delivery_retention_daysint30Days to retain webhook delivery history
global_bounce_thresholdint5Platform-wide bounce rate threshold (percent)
smtp_timeout_secondsint30SMTP connection timeout in seconds
maintenance_modeboolfalsePut the platform in maintenance mode
allowed_signup_domainsstring""Comma-separated list of allowed sign-up email domains (empty = all)
two_factor_requiredboolfalseRequire 2FA for all users
login_rate_limit_countint10Max login attempts per window
login_rate_limit_window_minutesint15Rate limit window duration in minutes
email_content_visibilityboolfalseShow full email content (body/HTML) in logs and detail views
custom_headers_enabledboolfalseAllow workspaces to add custom email headers

Email retention layers

Email data has two very different cost profiles. The record — subject, sender, recipients, status, timestamps — is tiny and worth keeping around for a searchable history. The content — HTML/text bodies, attachments, and (for inbound mail) the raw .eml — is what actually fills the disk. Posta retains them on independent schedules, so you can keep a long, lightweight log while purging bulk content much sooner.

Three windows apply to every email, all measured from its creation time:

LayerSettingWhat it removesWhat survives
Recordretention_daysthe whole row — metadata and contentnothing
Bodyemail_body_retention_daysHTML + text bodythe record (metadata)
Attachmentsemail_attachment_retention_daysattachments + their stored bytesthe record (metadata)

The body and attachment layers scrub content in place: the row stays, so the email still appears in dashboard lists and detail views with its metadata intact — only the body/attachment fields come back empty. Only the record layer removes the row entirely.

Example

With retention_days = 180, email_body_retention_days = 30, and email_attachment_retention_days = 30:

  • Day 0–30 — full email: metadata, body, and attachments.
  • Day 31–180 — metadata only: body and attachments are gone, but the email still shows up in the log with its subject, sender, and status.
  • Day 181+ — the record itself is deleted.

Rules

  • Defaults & upgrades. Both content windows default to the current value of retention_days, so a fresh install — and any upgrade of an existing one — behaves exactly as before (everything purged together) until an admin deliberately shortens a content window.
  • Upper bound. Content windows are capped at retention_days: a larger value has no effect, because the row and all its content are deleted first. The dashboard clamps the inputs to retention_days, and the cleanup job enforces the same cap server-side.
  • Body and attachments are independent. Either may be kept longer or shorter than the other. The one coupling is the inbound raw .eml, which contains both: it is purged at the shorter of the two windows, so it can never preserve content past either type's own retention.
  • Not the same as redaction. email_content_visibility only hides body content from the dashboard and API responses — the data is still stored at rest. The retention windows above actually delete it from the database and blob storage. Use visibility for day-to-day privacy in the UI, and the content windows to reduce what is stored on disk.

The retention cleanup job runs once daily at 03:00 UTC, so content is purged within roughly 24 hours of crossing a window.