View and 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 will help you to comply with regulations relating to email communications (like GDPR) and maintain a positive user experience.

Here’s what you should do to manage site visitor subscriptions correctly:

Check the user's subscription status

Before you send any emails, you should 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

Update the user's subscription status

When a user unsubscribes, you'll 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'll automatically unsubscribe 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.

Important: Staying on top of user email subscriptions is just one way you can stay compliant with GDPR – to learn more, check out this article.

Was this helpful?