- Branded visuals (logos, colors, fonts)
- Multi-language support
- Preference management using Tags (opt out of specific email categories instead of all)
- Additional components like surveys to gather feedback
Prerequisites
Before you build your custom page, make sure you have:- Familiarity with Liquid for personalization.
- OneSignal API access – Depending on your needs, you may use:
- Update Subscription by Token – Update or unsubscribe by email address.
- Unsubscribe Email with Token – Track unsubscribes for a specific email message ID.
- Update User – Update profile, tags, and preferences.
- Web & Mobile SDKs – Manage preferences in real time.
Remove OneSignal’s default unsubscribe link
OneSignal automatically inserts[unsubscribe_url]
in your email templates. This URL unsubscribes the user from all emails in OneSignal.
To use your own page:
1
Remove OneSignal's default unsubscribe link
OneSignal automatically inserts In the block editor, the default link may appear nested like:
[unsubscribe_url]
in your email templates. This URL unsubscribes the user’s email Subscription from further emails in OneSignal. See Email Unsubscribe Links for details.To use your own page, locate and remove the default link in your template.
Block editor unsubscribe link
2
Add your custom unsubscribe link
Replace the default link with your own URL. Use Liquid variables to pass OneSignal data to your page.Common parameters:
Example HTML block:
Parameter | Description |
---|---|
app.id | OneSignal App ID |
message.id | ID of the email notification |
subscription.email | Subscriber’s email address |
subscription.external_id | User’s external ID |
subscription.language | Preferred language (for localization) |
subscription.unsubscribe_token | Security token for API verification |
HTML

Add custom unsubscribe link
Disable click tracking
Unsubscribe clicks should not be used for engagement metrics. Add the appropriate no-tracking attribute for your sending service:HTML
Provider | Attribute |
---|---|
OneSignal | data-disable-tracking="true" |
Mailgun | disable-tracking=true |
SendGrid | clicktracking=off |
Mandrill | mc:disable-tracking |
Host your custom unsubscribe page
Deploy a web page that:- Reads query parameters from the unsubscribe link.
- Displays user-friendly opt-out or preference options.
- Sends the unsubscribe or update request to OneSignal via API.
We provide a working GitHub sample project you can fork and deploy.

Sample unsubscribe page UI
Call the OneSignal API
Depending on your use case, you can use the following APIs to unsubscribe or update user preferences:This API is most commonly used when you have the user’s email address and just want to subscribe or unsubscribe them from all emails.Required query parameters:
app_id
token
- Call this API from your server.
You should now be equipped with everything you need to know about creating a custom unsubscribe page.