Skip to main content

Hi everyone

I want to create a webhook to unsubscribe the email from klaviyo. This webhook will call  api to magento2 with parram is the mail has unsubscribed. And then the email will update in magento with status : unsubscribe like klaviyo.

So please help. Thanks.

Hi @hung and welcome to the Community!

 

Just so I understand your use case correctly, are you looking to fire a webhook when someone unsubscribes, or a webhook that will unsubscribe a profile?

 

For webhook that will fire when users unsubscribe, I would suggest 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. This is also discussed in this Community thread:

 

For the latter option, you can use the DELETE /api/v2/list/{LIST_ID}/members endpoint to unsubscribe a profile from a list, as discussed in this thread:

 

I hope this helps, and thank you for using the Community!

 

-Brian


Reply