Skip to main content
Solved

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

  • April 12, 2024
  • 1 reply
  • 65 views

Forum|alt.badge.img

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?

Best answer by saulblum

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.

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

Forum|alt.badge.img+7
  • Klaviyo Employee
  • 168 replies
  • Answer
  • April 12, 2024

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.