Skip to main content
Contributor I
February 4, 2022
Solved

Fire custom webhook when user unsubscribes?

  • February 4, 2022
  • 26 replies
  • 2677 views

How do I add a custom webhook endpoint for Klaviyo to call when a user unsubscribes for a list? Does this exists? It’s a must have feature of an email provider. If this isnt available how else can I keep subscription statuses synced with my application database?

    Best answer by Taylor Tarpley

    Hi @sylvie

     

    Welcome to the Community! Happy to help out with this! 

     

    Yes, you can use achieve what you’re looking to do by using the  GET api/v1/people/exclusions endpoint to retrieve global suppressions. You will then know who is unsubscribed and anyone who’s not included in that call would be subscribed. I would recommend checking out this very helpful topic posted by a peer in the Community about the same topic! 

     

    Thanks for your participation in the Community!

    -Taylor 

    26 replies

    Taylor Tarpley
    Community Manager
    Community Manager
    February 4, 2022

    Hi @sylvie

     

    Welcome to the Community! Happy to help out with this! 

     

    Yes, you can use achieve what you’re looking to do by using the  GET api/v1/people/exclusions endpoint to retrieve global suppressions. You will then know who is unsubscribed and anyone who’s not included in that call would be subscribed. I would recommend checking out this very helpful topic posted by a peer in the Community about the same topic! 

     

    Thanks for your participation in the Community!

    -Taylor 

    Problem Solver III
    July 15, 2022

    This is a solution but requires a regular cron job and a fair amount of processing on our own servers to iterate through the returned data, executing an unsubscribe action on each result.

    Please could I raise a feature request for a more traditional webhook solution that just calls a URL when someone either a) unsubscribes or b) subscribes? That way I will know that my own systems are *always* in sync with Klaviyo.

    It’s important because people who are subscribed to our mailing list get a reduced shipping rate and some other benefits when they purchase. If they’ve subbed via klaviyo and then order before a sync has occurred, we’ll end up billing them wrongly.

    Problem Solver I
    August 24, 2022

    I would echo @dartacus - I’m really surprised this isn’t a thing, don’t really want to have to hit that end point continually.

    Contributor I
    July 19, 2023

    Has there been any progress on this feature request @Taylor Tarpley?

    Thanks, Stuart.

    Brian Turcotte
    Klaviyo Alum
    July 20, 2023

    Hi @dartacus, @1stevengrant and @Stuart Heggie!

    We do now have webhook functionality that can be triggered when someone subscribes, but at this time, webhooks are limited to events that can trigger a flow - so unsubscribes are not eligible:

     

    However, our Product team is aware of this feature request, so I’ll update the thread if anything changes in the future.

     

    Best,

    Brian

    Contributor I
    July 20, 2023

    @Brian Turcotte thanks for clarifying, that is extremely disappointing. Can you please provide some indication to the priority of this feature request?

    thanks Stuart!

    Brian Turcotte
    Klaviyo Alum
    July 24, 2023

    Hi @Stuart Heggie

     

    I don’t have an exact timeline for this feature, but I can assure you that the team is actively evaluating this functionality, and I have forwarded your feedback to supplement the request!

     

    Best,

    Brian

    Contributor I
    September 5, 2023

    Just started using Klaviyo and kind of shocked this is not implemented yet. This is crucial, as you always need to keep various lists in different external databases in synch with Klaviyo. Please implement this. Going to hold off on sending emails thru Klaviyo until this is implemented as otherwise it will become a massive pain to keep lists in synch across various databases. Every major email providers offers this type of webhook, btw.

    Contributor I
    September 6, 2023

    I managed to figure this out through some trial and error, but it is possible to have a webhook fire on unsubscribes.

    1. Make a new Segment, and add these rules:
       
    2. Create a new Flow, based on the Segment you just made. The idea is that when a user clicks unsubscribe, OR if you unsubscribe (or suppress) them, they will then ‘join’ this segment which can fire your webhook.
       

     

     

    Make sure you make the flow “Live” because the “Manual” option won’t work for triggers that rely on list/segment entry. Also, I found that the segment took between about 5 and 15 minutes to actually get updated when the user unsubscribes, so the webhook doesn’t fire til they are in the segment, but it did fire and my webservice did catch and process it so proof of concept works!

     

    I don’t know if this is something new but hope that helps everyone!

     

     

    Contributor II
    November 23, 2023

    Webhook should have unsubscribe option as database of unsubscribers are relatively big and if you have to read this data all the time we all know that this is far from optimal and it affects all systems big time!!

    We have all of our customer data (lots of them) in our ERP/CRM as we do not target our customers only from Klaviyo. Because of that we need to have this information, who unsubscribed through Klaviyo, in real-time not with some postponed calls to your api, webhook with fake lists, etc.

     

    This is a huge drawback for companies like ours!