Skip to main content

I need the list of bounced emails with the bounce reason, the full list, every day at least once. I have 3,500 suppressed profiles (ATM) where I have to query a separate event search to find out the reason for the bounce. It is very slow. Your competitors have an API that can provide this very quickly in one query without pagination in just seconds. With Klaviyo, it takes an hour.

Hi there, 

Which API endpoint are you using? It should be pretty quick and easy to pull all the Bounced Email events using the Get Events API and filtering by metric ID:

https://a.klaviyo.com/api/events?filter=equals('metric_id','BOUNCED_EVENT_ID)'

This also allows sorting and filtering by timestamp, so you only need to fetch the most recent bounces.

I hope this helps - please let me know if you have any additional questions.

Michaela


what is ‘BOUNCED_EVENT_ID’ ?


This is the ID of the Bounced Email metric. You can find this by clicking Metrics on the left hand side of your Klaviyo account, then click on the Bounced Email metric. The 6-digit alphanumeric ID in the URL is the Bounced Email ID. For example, this is my Bounced Email ID:

Hope that helps!


I can't catch up with you, we are talking about an API and about 3,500 profiles, and you suggest I click on them one by one and copy them into a URL? What are you trying to tell me? Did you read my initial question?


Hi there, I apologize for any confusion.

You will only need to find the Bounced Email metric ID once.

Then, you can make an API call to the Get Events endpoint, filtering by this metric ID. You can run this daily to retrieve all bounces in the past 24 hours.

I hope that helps clarify!


 

Okay, now I understand what you mean, I see that I can get the ID with the /metrics endpoint.

I’ll test this because I’m not sure yet and will get back to you.

Thank you, Michaela! Looks pretty promising!


OK, it’s a bit strange that I need a metrics endpoint for this kind of data, but fine, I’ve implemented it now. However, I still have questions. While the bounced list is a concrete list representing the current state, I have no idea how this metrics list will evolve over time. Will it grow indefinitely? Will it still include entries for profiles I no longer have?

Can I use the ‘Unsubscribed from Email Marketing’ metric to retrieve a list of all unsubscribed profiles?

The same questions apply here as well: will this list grow indefinitely?

Finally, how can I query the count of rows returned by these queries without having to download the entire dataset?

 


@Atys

Since the metric is a point in time event (not the current state), I want to recommend https://developers.klaviyo.com/en/reference/get_profiles and to filter on subscriptions.email.marketing.list_suppressions.reason as documented, since that will give you the current state of your profiles - hope that helps!

~Chloe


@chloe.strange 

That was how I did it originally, but

a)

Allowed field(s)/operator(s):
subscriptions.email.marketing.list_suppressions.reason  = equals

So this filter is useless, because you can’t use “!= null”. (You could forward it to the developers.)
Instead: “filter=greater-or-equal(subscriptions.email.marketing.suppression.timestamp,<DATE>)”

but!

b)

the returned “reason” field is not as verbose as in the “/events” endpoint, so I fetched the last event for every profile, which was very slow. With over 3000 suppressed profiles, it took too long.

 

 


While the bounced list is a concrete list representing the current state, I have no idea how this metrics list will evolve over time. Will it grow indefinitely?

It will likely grow as generally once an email bounces it will continue to bounce.

Another option is to create a segment with the following filters:

  • person (cannot receive) (email marketing)
  • because person (hard bounced) (anytime)

This will give you a count of all of the profiles that are currently hard bounced at a given point in time.

~Chloe


Reply