Security & ComplianceData Handling & Security

Data Handling & Security

This page describes how FormaMail handles your data throughout its lifecycle - from collection to deletion.

Security Measures

Data in Transit

All connections to FormaMail are secured via TLS through CloudFlare:

ProtocolStatus
TLS 1.3Enabled (preferred)
TLS 1.2Enabled (fallback)
TLS 1.1Disabled
TLS 1.0Disabled
SSLDisabled

Additional protections:

  • HSTS (HTTP Strict Transport Security) enforced via CloudFlare
  • DDoS protection via CloudFlare
  • Certificate transparency logging enabled

Credential Security

All sensitive credentials are hashed before storage:

Credential TypeSecurity Measure
User passwordsbcrypt hashed (12 rounds)
API keysbcrypt hashed (never stored in plain text)
OAuth access tokensHashed before storage
OAuth refresh tokensHashed before storage

We never store passwords or API keys in plain text. Once created, you cannot retrieve the full API key - only the first and last 4 characters are displayed in the dashboard.

Infrastructure Security

FormaMail uses a multi-cloud infrastructure with managed security:

ComponentProviderSecurity
Database (PostgreSQL)RailwayEncrypted at rest (storage-level)
Cache (Redis)RailwayTLS connections
Email DeliveryAWS SESTLS, SPF/DKIM/DMARC
CDN/WAFCloudFlareTLS 1.3, DDoS protection

Database encryption at rest is provided by Railway’s infrastructure at the storage level. Application-level encryption is not implemented in the FormaMail codebase - we rely on infrastructure providers for encryption.

API Key Security

API keys are handled securely:

  • Keys are generated using cryptographically secure random number generators
  • Only the first and last 4 characters are displayed in the dashboard
  • Keys are hashed before storage (you cannot retrieve the full key after creation)
  • Keys can be scoped to specific permissions

Data Retention

FormaMail implements a three-tier data retention system designed to balance functionality with data minimization and GDPR compliance:

Retention Tiers

TierPeriodDescription
Full Logs30 daysComplete email/attachment logs with all details
Archived Data5 yearsBasic records without PII for compliance
Daily SummariesIndefiniteAggregated analytics per team/template

Full Log Retention (30 Days)

During the first 30 days, full data is available including:

  • Complete email metadata
  • Recipient email addresses (for unsubscribes and tracking)
  • Detailed engagement data (opens, clicks with timestamps)
  • Full attachment job details

Archived Data (5 Years)

After 30 days, data is archived with the following changes:

  • Recipient emails are removed - GDPR compliance, no PII stored
  • Basic metrics preserved (sent count, status, error category)
  • Engagement summary (was opened, was clicked, counts)
  • Template and batch references maintained

Archived records cannot be used for retry operations since recipient information is not preserved.

Daily Summaries (Indefinite)

Aggregated analytics are kept indefinitely:

  • Volume metrics (sent, delivered, bounced, etc.)
  • Engagement rates (open rate, click rate)
  • Error category breakdowns
  • Template performance comparisons

Retention Periods by Data Type

Data TypeFull DataArchived DataSummary Data
Email logs30 days5 yearsIndefinite
Attachment jobs30 days5 yearsIndefinite
Email opens/clicks30 daysSummarizedIndefinite
Webhook events30 days--
Generated PDFs/Excel7 days--
Audit logs2 years--
Soft-deleted records30 days--

Archive Process

The archiving process runs daily at 2:30 AM UTC:

  1. Summary Update: Daily summaries are updated from live data
  2. Data Archive: Records older than 30 days are moved to archive tables
  3. PII Removal: Recipient emails and detailed tracking data are removed
  4. Cleanup: Original full records are deleted

What Happens at Expiration

When data reaches its retention limit:

  1. Archive First: Data is archived with PII removed (email/attachment logs)
  2. Soft Delete: Data is marked as deleted but retained for 30 days
  3. Hard Delete: Data is permanently removed from primary storage
  4. Backup Purge: Backups containing the data expire per backup schedule

Data Deletion

GDPR Data Removal Request

If you received emails from a FormaMail customer and want your data removed, you can submit a data removal request:

  1. Visit app.formamail.com/data-removal
  2. Enter the email address you want removed
  3. Choose your removal type:
    • Delete All: Permanently delete all associated data
    • Anonymize: Replace PII with anonymous data
    • Export & Delete: Get a copy before deletion
  4. Verify your email by clicking the link we send
  5. Our team processes requests within 30 days

Data removal requests are processed for email recipients. If you’re a FormaMail customer wanting to delete your account, see the Account Deletion section below.

What Gets Removed

When a data removal request is processed:

Data TypeAction
Suppression list entriesDeleted
Unsubscribe recordsDeleted
Email open/click trackingAnonymized
Email log referencesAlready anonymized after 30 days

Status Tracking

You can check your request status at app.formamail.com/data-removal/status

StatusMeaning
PendingAwaiting email verification
VerifiedIn queue for processing
ProcessingCurrently being processed
CompletedAll data has been removed
RejectedRequest could not be fulfilled
ExpiredVerification link expired (24 hours)

Automatic Deletion

FormaMail automatically deletes:

  • Generated attachments after 7 days
  • Soft-deleted records after 30 days
  • Email logs (archived after 30 days, deleted after 5 years)
  • Expired OAuth tokens and authorization codes

Manual Deletion

You can manually delete data via:

API:

# Delete a specific email log
DELETE /api/emails/:id
 
# Bulk delete email logs
DELETE /api/emails/bulk

Dashboard:

  • Go to Email Logs → Select emails → Delete
  • Go to Templates → Select template → Delete

Account Deletion

To delete your entire account and all associated data:

  1. Go to Settings → Account → Delete Account
  2. Confirm your identity
  3. Enter “DELETE” to confirm
  4. All data is scheduled for deletion within 30 days
⚠️

Account deletion is irreversible. All templates, logs, and data will be permanently deleted.

Access Controls

Role-Based Access Control (RBAC)

FormaMail implements RBAC at the team level:

RolePermissions
OwnerFull access, billing, team deletion
AdminManage members, API keys, templates
MemberCreate/edit templates, send emails
ViewerRead-only access to logs and analytics

API Key Permissions

API keys can be scoped to specific permissions:

  • emails:send - Send emails
  • emails:read - Read email logs
  • templates:read - Read templates
  • templates:write - Create/edit templates
  • analytics:read - Access analytics
  • webhooks:manage - Manage webhook subscriptions

OAuth Scopes

Third-party applications access your data through OAuth with explicit scopes:

ScopeAccess Granted
emails:sendSend emails on your behalf
emails:readRead your email logs
templates:readRead your templates
templates:writeCreate and modify templates
webhooks:readRead webhook configurations
webhooks:writeManage webhook subscriptions
analytics:readRead analytics data
profile:readRead basic profile information

Audit Logging

FormaMail maintains audit logs for security-sensitive operations:

Logged Events

Event CategoryExamples
AuthenticationLogin, logout, password change, 2FA enable/disable
API KeysCreate, revoke, update permissions
Team ManagementMember invite, role change, removal
Data AccessTemplate export, email log export
OAuthApp authorization, token revocation
SettingsRetention changes, billing updates

Accessing Audit Logs

Audit logs are available to team Owners and Admins:

  • Dashboard: Settings → Activity Log
  • API: GET /api/teams/:teamId/activity

Log Retention

Audit logs are retained for 2 years and cannot be deleted manually. This ensures accountability and supports incident investigation.

Data Processing

Where Data is Processed

ProcessProviderRegion
API requestsRailwayUS
DatabaseRailwayUS
Email sendingAWS SESeu-north-1 (Stockholm)
PDF generationRailwayUS

Data Flow

  1. API Request: Your request arrives via HTTPS at our API servers
  2. Validation: Input is validated and sanitized
  3. Processing: Email is queued, attachments generated
  4. Delivery: Email sent via AWS SES
  5. Logging: Delivery status logged for tracking
  6. Cleanup: Temporary files deleted after delivery

Backups & Recovery

Backup Schedule

Backup TypeFrequencyRetention
Database snapshotsDaily30 days
Point-in-time recoveryContinuous35 days
Configuration backupsWeekly90 days

Disaster Recovery

  • RTO (Recovery Time Objective): < 4 hours
  • RPO (Recovery Point Objective): < 1 hour
  • Infrastructure: Railway managed PostgreSQL with automated backups

Data Recovery Requests

If you accidentally delete data, contact support@formamail.com within the retention period. Recovery may be possible from backups depending on timing.

Third-Party Data Sharing

We Do Not Sell Data

FormaMail does not sell, rent, or trade your data to third parties.

Service Providers

We share data with service providers only as necessary to operate the service:

ProviderPurposeData Shared
RailwayInfrastructure (DB, API)All data (encrypted at rest)
AWS SESEmail deliveryEmail content, recipients
CloudFlareCDN, WAF, DNSRequest metadata
CashfreePaymentsBilling info (not stored by us)

We may disclose data if required by law, court order, or to protect our rights. We will notify you unless legally prohibited.

Security Best Practices for Users

  1. Rotate API keys regularly (at least every 90 days)
  2. Use scoped API keys with minimum required permissions
  3. Enable 2FA for dashboard access
  4. Review connected OAuth apps periodically
  5. Monitor your email logs for unusual activity
  6. Use strong passwords (16+ characters, unique)

What to Do If Compromised

If you suspect your account or API key is compromised:

  1. Immediately revoke the compromised API key
  2. Change your password
  3. Revoke all OAuth authorizations
  4. Review recent activity in audit logs
  5. Contact support at security@formamail.com