I am trying to figure out how to pull the number of sent emails from flows endpoint - https://a.klaviyo.com/api/v1/flows
For campaigns endpoint , api returns it as num_recipients but couldn't find it in flows.
Can you help please?
Number of Email Sent Flows API
Best answer by Dov
Hi
Thanks for sharing this question with us.
You could use the https://a.klaviyo.com/api/v1/metric/{metric_id}/export API to get the count of how many times a particular event happened, e.g. "Received Email". This also supports a "by" clause, so you could include a request that asks for results grouped by "$attributed_flow" and then sum these up to get the value across all flows. Here is our guide on querying event data.
Here's an example API call using the Received Email metric: https://a.klaviyo.com/api/v1/metric/(metric_id)/export?api_key=[private key]&measurement=count&by=$flow&start_date=2022-06-28&end_date=2022-07-01
And here's a snippet of the response:
"results": [
{
"segment": "Abandoned Cart Reminder - Standard (XXXXXX)",
"data": [
{
"date": "2022-06-28 00:00:00",
"values": [
2.0
]
}It shows that on 6/28, two emails were received from the Abandoned Cart Reminder - Standard flow. You could also make calls for the other email-related metrics, e.g.

I hope that’s helpful.
Log in to the Community
Use your Klaviyo credentials
Log in with Klaviyo
Use your Klaviyo credentials
Log in with KlaviyoEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.


