Solved

API notifications for email delivery

  • 7 June 2021
  • 4 replies
  • 231 views

Badge +2
  • Contributor I
  • 3 replies

I have a web app where I would like to show a list for each user of the emails they have received from Klaviyo. To track those emails, I was hoping to find webhook support in the API so my app could be notified when the emails are delivered, but I don’t see that. If I want to know which emails have been sent, do I need to poll one of the endpoints? I see that there are endpoints for metrics and that they can be treated as events, but it’s not clear what metrics are available or if they include email delivery. Maybe there is some way to track this through the email delivery mechanism? Thanks!

icon

Best answer by jallain 8 June 2021, 18:14

View original

4 replies

Userlevel 4
Badge +11

@aub We don’t currently have a way to send out a webhook request from a Flow although that is something which we may work on in the future.

You can export any particular metric from the API though with the ID of the metric. To get the ID you can click the analytics tab on the left:

 

Then click on “See all metrics” to go to the page with all of your metrics listed:

On that page, you can click any metric, for this it sounds like you want either “Received Email” or “Opened Email”. That will take you to the page for that individual metric. Then, on that page if you look in the URL you will see the ID for that metric which you are looking at:

This ID is for my test account but you should see a similar one in the URL for your metric.

Once you have the ID of the metric you can export a timeline of that specific metric: https://apidocs.klaviyo.com/reference/metrics#metric-export

Or you can export the timeline of a particular profile filtered by that specific metric: https://apidocs.klaviyo.com/reference/profiles#profile-metric-timeline

 

Let me know if this helps and keep an eye out for the ability to send a webhook request from a Flow in the future.

Badge +2

@jallain thanks for your answer. I think this probably doesn’t work for us because we would have to poll for the data and we would really need the updates to be timely, so I’ll look out for a webhook update. But also, the metrics page isn’t loading for me at all:

 

 

It’s been spinning like that for about 45 minutes. I’m having trouble finding something that looks like an account id, but my email is aubrey at withgrayce.com

Userlevel 4
Badge +11

@aub Did you try reloading the page or opening the page in an incognito browser/a different browser? This looks like just a temporary issue perhaps due to browser caching or something similar. You may also just try logging out and logging back in to see if that solves it for you.

Badge +2

@jallain cool, thanks again. It looks like it just doesn’t work in Brave… I should’ve checked that, but thanks for the tips!

Reply