Skip to main content

Hi,
I’m using the Klaviyo API for the first time. I’m populating our own database with daily data by campaign.
However, I’m struggling to find where I can retrieve list data per campaign?
This data is available in the UI reporting function but I’m struggling to replicate in the API.

Hey @oscarJames24 

Can you give me an example of ‘List data’ per campaign? or elaborate by what you mean by List data?

We can get the open rates or click rates data using API, maybe the process is similar for List data, but I am not sure what that is.

But here is how to do for Open rates or Click rates 

Get Campaign Information - Use the GET /v1/campaigns endpoint to list all campaigns and find the relevant campaign ID.

curl -X GET "https://a.klaviyo.com/api/v1/campaigns?api_key=YOUR_API_KEY"

Once you have the campaign ID, you can retrieve detailed information about a specific campaign using the GET /v1/campaign/:id endpoint.

curl -X GET "https://a.klaviyo.com/api/v1/campaign/YOUR_CAMPAIGN_ID?api_key=YOUR_API_KEY"

If you want to retrieve metrics data for a specific campaign (e.g., open rates, click rates), you can use the GET /v1/metric/:metric_id/timeline endpoint.

curl -X GET "https://a.klaviyo.com/api/v1/metrics?api_key=YOUR_API_KEY"

Once you have the metric ID, use it to get the data:

curl -X GET "https://a.klaviyo.com/api/v1/metric/YOUR_METRIC_ID/timeline?api_key=YOUR_API_KEY"

I am not sure if this will help, but I wanted to share this as that maybe on similar lines.

Cheers

Arpit Banjara


Reply