This feature automatically manages unsubscribe requests to help you stay compliant with email regulations like CAN-SPAM and GDPR.
Overview
Simple Email API provides a complete unsubscribe system with:- Automatic unsubscribe links via
{{unsubscribe_link}}placeholder - RFC 8058 one-click unsubscribe headers for email clients
- Per-recipient tracking with secure, signed tokens
- Automatic filtering of unsubscribed recipients before sending
Adding Unsubscribe Links
Using the Placeholder
Add{{unsubscribe_link}} anywhere in your email body or HTML:
Placeholder Behavior
Synchronous Single-Recipient Emails
Synchronous Single-Recipient Emails
For sync requests (
async: false) with exactly one recipient, the
placeholder is replaced with a unique unsubscribe link before sending.Asynchronous Multi-Recipient Emails
Asynchronous Multi-Recipient Emails
For async requests with multiple recipients, the email is automatically
split into individual sends. Each recipient receives their own unique
unsubscribe link for proper tracking.
Synchronous Multi-Recipient Emails
Synchronous Multi-Recipient Emails
For sync requests with multiple recipients, the placeholder is not replaced.
Use
async: true to enable automatic splitting with per-recipient links.List-Unsubscribe Headers
All emails sent through the async path include RFC-compliant headers:Filtering Unsubscribed Recipients
Before sending any email, the API automatically checks the unsubscribe list:- All recipients (To, Cc, Bcc) are checked against the unsubscribe list
- Unsubscribed recipients are silently removed
- If all recipients are unsubscribed, the API returns success with a message
Best Practices
Use async for bulk sends
Set
async: true when sending to multiple recipients with unsubscribe
links to ensure proper per-recipient tracking.Always include unsubscribe
CAN-SPAM and GDPR require clear unsubscribe options in marketing emails.
Check response messages
The API returns informative messages when recipients are filtered out.
Test before production
Use dry-run mode to verify unsubscribe link handling without sending.
Example Request
Technical Details
| Feature | Single Recipient | Multiple Recipients (sync) | Multiple Recipients (async) |
|---|---|---|---|
| Placeholder replaced | ✅ Yes | ❌ Skipped | ✅ Yes (split) |
| List-Unsubscribe header | ✅ Yes | ✅ Yes | ✅ Yes |
| Recipient filtering | ✅ Yes | ✅ Yes | ✅ Yes |
| Individual tracking | ✅ Yes | ❌ No | ✅ Yes |
| Email count | 1 | 1 | N (one per recipient) |