Solved

API - How to get a list of profiles (Email addresses) that were removed from a list

  • 12 April 2024
  • 1 reply
  • 18 views

Badge

Previously I was using the API endpoint https://a.klaviyo.com/api/v1/metric/MyListId/timeline and querying this with the since=timestamp and sort=asc and able to get a list of events that I could filter by "event_name": "Unsubscribed from List".

 

With the new API, the replacement endpoint seems to be https://a.klaviyo.com/api/events but I can’t figure out how to get the same list of events.

I tried something like this: https://a.klaviyo.com/api/events?sort=datetime&filter=equals(metric_id,%22MyListId%22)&filter=greater-or-equal(datetime,2024-04-12T02:33:00Z)

But I am getting a lot more events and not able to identify what the “unsubscribe from list” events are in this endpoint.

 

Is it possible with the /events endpoint? and if not, what other endpoint can I use to get a list of email addresses that had the "event_name": "Unsubscribed from List” since a specific timestamp?

icon

Best answer by saulblum 12 April 2024, 15:09

View original

1 reply

Userlevel 4
Badge +7

If you go to the metrics page you can filter by Klaviyo metrics, and you’ll see Unsubscribed from List.

Click the metric name and the URL will have the metric ID, e.g. https://www.klaviyo.com/metric/ABC123/unsubscribed-from-list?function=&dimension=&value=

This ID would be the metric_id value in the filter for the Get Events call.

Reply