Integrations
Preferences
Subscriber preference management
Overview
Let subscribers manage their email preferences with a self-service page. The preferences system supports double opt-in confirmation, frequency controls, category-based subscriptions, and one-click unsubscribe — helping you stay compliant with email regulations and keep your audience engaged.
Double Opt-in
Initiate the double opt-in flow by submitting a subscriber's email address. The system sends a confirmation email containing a unique token link. The subscriber must click the link to verify their subscription.
/api/optinSend a double opt-in confirmation email to the given address. Returns a pending status until the subscriber confirms.
Parameters
| Name | Type | Description |
|---|---|---|
email* | string | Subscriber email address |
name | string | Subscriber display name |
Request
{
"email": "subscriber@example.com",
"name": "Jane Doe"
}Response
{
"success": true,
"message": "Confirmation email sent",
"status": "pending"
}Confirm Opt-in
When a subscriber clicks the confirmation link in their email, this endpoint validates the token and activates their subscription. The token is single-use and expires after 24 hours.
/api/optin/confirm?token=...Confirm a subscriber's opt-in using the token from the confirmation email. Activates the subscription on success.
Parameters
| Name | Type | Description |
|---|---|---|
token* | string | Unique confirmation token from the opt-in email |
Response
{
"success": true,
"message": "Subscription confirmed",
"email": "subscriber@example.com"
}Get Preferences
Retrieve a subscriber's current preferences including email frequency and category subscriptions. The token authenticates the subscriber without requiring a password.
/api/preferences?token=...Fetch the subscriber's current email preferences including frequency settings and subscribed categories.
Parameters
| Name | Type | Description |
|---|---|---|
token* | string | Subscriber preference token |
Response
{
"email": "subscriber@example.com",
"name": "Jane Doe",
"frequency": "weekly",
"categories": ["product-updates", "newsletters"],
"subscribed": true
}Unsubscribe
Unsubscribe a user from all emails. Accepts either an email address or a subscriber token. This immediately stops all future emails to the address.
/api/unsubscribeUnsubscribe a user from all emails. Provide either an email address or a subscriber token.
Parameters
| Name | Type | Description |
|---|---|---|
email | string | Subscriber email address (provide email or token) |
token | string | Subscriber preference token (provide email or token) |
Request
{
"email": "subscriber@example.com"
}Response
{
"success": true,
"message": "Successfully unsubscribed"
}Preference Page
Each subscriber gets a unique preferences page accessible at /preferences?token=.... This page provides a self-service interface where subscribers can:
- Choose their preferred email frequency (daily, weekly, monthly)
- Subscribe or unsubscribe from specific email categories
- Fully unsubscribe from all communications
- View their current subscription status
The preference token is automatically included in the footer of every email sent through the platform. No password is required — the token serves as a secure, unique identifier for each subscriber.