Unsubscribe an email subscription when using your own custom email unsubscribe landing page.

Overview

This API is designed to be used in conjunction with your own custom email unsubscribe page. See Create a Custom Unsubscribe Page for setup details.

When used, this API will set the user's email subscription's enabled property to false which unsubscribes that email address from further email messages unless overridden.

This API allows you to track which email message lead to the unsubscribe event.


How to use this API

Follow Create a Custom Unsubscribe Page to get the initial setup of the unsubscribe page and the unsubscribe URL.

Add the path and query parameters to the unsubscribe URL

The app_id, notification_id, and token are generated by OneSignal and are passed into the email sent to the user via the liquid syntax in your Custom unsubscribe URL.

Get the path and query parameters

When users click the unsubscribe URL and go to your custom unsubscribe page. If they then select a button to unsubscribed, you can extract the app_id, notification_id, and token to pass into this API.

See Call the OneSignal API to unsubscribe the email for details and example code.


Language