Manage Site Visitor Email Subscriptions

If your app sends emails to a site’s users, it’s really important to make sure you don’t send emails to anyone that’s unsubscribed from that site’s mailing list. This helps you to comply with regulations relating to email communications (like GDPR) and maintain a positive user experience.

Here’s how to manage site visitor subscriptions correctly:

Step 1 | Check the user's subscription status

Before you send any emails, check whether or not a user is subscribed.

There are two ways to do this:

  1. Use our Email Subscriptions API to query the email address and check a user’s subscription status.
  2. Listen to the Email Subscription Changed Webhook to see whenever an email subscription changes.

Step 2 | Update the user's subscription status

When a user unsubscribes, you need to make sure that you update the email subscription status.

You can either:

  1. Generate an unsubscribe link using our API: Add this to all of the emails you send to that specific email address and it automatically unsubscribes the user when they click the link
  2. Use your own unsubscribe link / method if you have one: If a user does unsubscribe, you can make an API request to update that info.

See also

Was this helpful?
Yes
No