Data discrepancy between API and dashboard

  • 29 June 2023
  • 1 reply

Userlevel 1
Badge +2

Hi, i’m using the latest stable version of Klaviyo API to fetch number of opened emails, here’s the API request config

method: 'POST',
baseURL: '',
headers: {
accept: 'application/json',
Authorization: `Klaviyo-API-Key ${apiKey}`,
revision: '2023-06-15',
'content-type': 'application/json',
data: JSON.stringify({
data: {
type: 'metric-aggregate',
attributes: {
measurements: ['unique'],
filter: [`greater-or-equal(datetime,${start_date})`, `less-than(datetime,${end_date})`],
by: ['$message'],
metric_id: metric_id,
interval: 'month',

i then sum the values based on campaign, but the data is not accurate when compared to the dashboard, in the dashboard no. of opened emails is higher than what i get from the API

Is this a bug or is there any explanation for these discrepancies? same is happening with other metrics as well like ‘Clicked Email’, ‘Active on Site’, etc


Best answer by Brian Turcotte 29 June 2023, 15:45

View original

1 reply

Userlevel 7
Badge +36

Hi @airboxr!

These discrepancies are due to the fact that dashboards in the UI are customizable and therefore sometimes use different attribution processes. This is definitely on our product team’s radar, and they’re considering ways to identify and match in-app dashboards - so if anything changes in the future, I will update the thread. In the meantime, here are some helpful resources and Community threads that might provide some more context/explanation:


Thanks for using the Community!

- Brian