AhaSend retains message data and metadata for 30 days by default to support email delivery tracking, auditing, and troubleshooting. You can customize these retention periods to comply with legal requirements or privacy policies, especially when handling sensitive information like financial, health, or legal data.
Compliance Ready: Customize retention periods to meet regulatory requirements for your industry.

Message Data vs Metadata

Understanding the difference between data and metadata helps you set appropriate retention policies:

Account-Wide Settings

Configure default retention periods for your entire account:

Access Retention Settings

  1. Log in to your AhaSend Dashboard
  2. Navigate to Account Settings
  3. Find the Retention Policy section

Set Default Periods

Configure retention periods:
  • Message Metadata: 1-30 days (default: 30 days)
  • Message Data: 0-30 days (default: 30 days)
Minimum Requirements: Message metadata requires at least 1 day retention for delivery tracking. Message data can be set to 0 days for immediate deletion.

Save Changes

Apply settings to all future emails sent through your account.
Existing Data: Changes only affect new emails. Previously sent emails retain their original retention settings.

Per-Message Overrides

Override account defaults for specific emails using special headers:

SMTP Headers

When sending via SMTP, add these headers to individual emails:
ahasend-metadata-retention: 7
ahasend-data-retention: 0

API v1 Implementation

For API v1, include retention headers in your message payload:
{
  "from": {
    "email": "[email protected]",
    "name": "Your Company"
  },
  "recipients": [
    {
      "email": "[email protected]",
      "name": "John Doe"
    }
  ],
  "content": {
    "subject": "Sensitive Information",
    "text_body": "This email contains sensitive data.",
    "headers": {
      "ahasend-metadata-retention": "1",
      "ahasend-data-retention": "0"
    }
  }
}

API v2 Implementation

For API v2, use the dedicated retention fields:
{
  "from": {
    "email": "[email protected]",
    "name": "Your Company"
  },
  "recipients": [
    {
      "email": "[email protected]",
      "name": "John Doe"
    }
  ],
  "subject": "Sensitive Information",
  "text_content": "This email contains sensitive data.",
  "retention": {
    "metadata": 1,
    "data": 0
  }
}
Full API v2 Documentation: See the Create Message API reference for complete documentation on all available fields and options.
Header Removal: Retention headers are automatically removed before email delivery and never visible to recipients.

Common Use Cases

Best Practices