Solved

Webhook unsubscribe email from klaviyo to magento 2

  • 8 November 2022
  • 1 reply
  • 267 views

Badge +1
  • Contributor I
  • 0 replies

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.

icon

Best answer by Brian Turcotte 8 November 2022, 20:06

View original

1 reply

Userlevel 7
Badge +36

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