How to Manage Unsubscribe Status for Email Marketing

If you want to centralize your marketing consensus the right way, these are the possible implementation strategies.

Written by ElenaLast update 10 months ago

Email marketing is a powerful tool for businesses, but it's important to respect the preferences of your customers. If a customer chooses to unsubscribe from your emails, it's crucial to update their status promptly to avoid sending unwanted messages.

This guide will walk you through the process of managing the unsubscribe status for email marketing using Customerly's webhook and REST API.

What You'll Need

Before we begin, make sure you have the following:

  1. Access to your Customerly account.

  2. Basic understanding of webhooks and REST APIs.

Step 1: Understanding Customerly's Unsubscribe Webhook

Customerly provides a webhook that notifies you when a user unsubscribes from your newsletter. This webhook sends a POST request to your specified URL with the user's email and unsubscribe status.

Step 2: Setting Up the Unsubscribe Webhook

To set up the unsubscribe webhook:

  1. Log into your Customerly account.

  2. Navigate to the webhooks section.

  3. Add a new webhook and specify the URL where you want to receive the POST requests.

  4. Select the "newsletter unsubscribe" event.

  5. Save your changes.

Once set up, you'll receive a POST request whenever a user unsubscribes from your newsletter.

Step 3: Using the REST API to Update Unsubscribe Status

Customerly also provides a REST API that allows you to set a user's unsubscribe status.

The endpoint for this is:

To use this API:

  1. Make a POST request to the above endpoint.

  2. Include the user's email and unsubscribe status in the request body.

  3. Make sure to include your API key in the request header for authentication.

Here's an example of what your request might look like:

POST /v1/user/unsubscribe HTTP/1.1
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{ "email": "", "unsubscribe": true}

Replace "YOUR_API_KEY" with your actual API key, and "" with the email of the user you want to update.

Remember to get a Customerly API Key from your Project settings as well.


Managing the unsubscribe status for email marketing with Customerly involves setting up a webhook to receive unsubscribe notifications and using the REST API to update the unsubscribe status.

By following these steps, you can ensure that your email marketing respects your customers' preferences and complies with email marketing regulations.

Did this answer your question?