How to View and Validate Your Suppression Lists

Benjamin Dean
Apr. 8, 2015 by Benjamin Dean

suppressionlistsIn this post I’m going to show you some details on our new SparkPost Suppression List API and how to test it in conjunction with our Webhooks feature to validate that recipients are being automatically added to the account’s Suppression List for the appropriate events.

What causes SparkPost to add a Recipient to your account’s Suppression List?

  • Hard Bounces
  • SPAM Complaints
  • Link Unsubscribes
  • List-Unsubscribes

Step 1: View your account’s current Suppression List state

cURL Example to GET all the recipients on your SparkPost Suppression List

Step 2: Generate a Hard Bounce using Transmissions

The /transmission response should show the recipient was accepted by SparkPost’s API.

Step 3: Verify that the recipient is now on your SparkPost account’s Suppression List

The response should now contain the replacement value you used in the /transmission body.recipients.email property. Here is what a GET response from the Suppression List service looks like (just for reference):

Troubleshooting

If you follow the steps above and you do not see the new email added to your Suppression List, here are some steps to troubleshoot.

Webhooks to the Rescue!

I have a running Webhook consumer configured so I hopped over and started watching what was happening in my SparkPost events.

If you do not have a SparkPost webhook created and SparkPost webhook event consumer running, read our User Guide: Creating Webhooks. Make sure to configure your webhook with the bounce, spam_complaint, injection, and rejected message_event types.

Observe the Webhook events

Example of a valid hard-bounce Webhook event that triggers SparkPost to add the specific recipient to your Suppression list

Note: that if you did not generate a hard bounce, spam complaint, link unsubscribe, or list unsubscribe event type…you are NOT testing properly. Notice the type (delay) property and the bounce_class property in these two webhook events. If you don’t use one of the appropriate events to trigger an addition to the Suppression List you may start looking at webhooks like you see below and asking…“Wait a minute, that domain is totally invalid as is the user…what gives???”.

Why don’t we add these types of soft-bounces to Suppression Lists?

  • Because lack of DNS returning a valid MX record for a domain may in fact be a temporary error – so SparkPost will automatically retry sending that message again.

Hopefully this gives you a good initial overview of the power of SparkPost’s suppression lists!

Happy coding!

~ Benjamin

 

Related Content

Burnout: What Happens When You Take On Too Much

Burnout has become a very relevant topic in the tech industry. Our community manager offers several tips on how to avoid being overworked and stressed.

read more

Creating the Next Generation of Interactive Emails with Rebel Mail

Meet our partner, RebelMail! Today they're demonstrating how to use their interactive email API to keep customers engaged with the inbox.

read more

Using the SparkPost Metrics API with C#

Learn how to query the SparkPost API for information and metrics on the emails you’re sending using the C# wrapper and gain valuable insights.

read more

Start sending email in minutes!

The world’s most powerful email delivery solution is now yours in a developer-friendly, quick to set up cloud service. Open a SparkPost account today and get started for free.

Get Started

Send this to a friend