Skip to main content

Get Campaign Statistics

Retrieve detailed delivery and engagement statistics for a campaign.


Endpoint​

GET https://api.campaignlark.com/v1/campaigns/:id/statistics

Path Parameters​

ParameterTypeRequiredDescription
idstringrequiredThe campaign ID.

Sample Request​

GET https://api.campaignlark.com/v1/campaigns/64f1a2b3c4d5e6f7a8b9c0d1/statistics

Response​

Success — 200 OK​

{
"error": null,
"data": {
"aggregate": {
"delivered": 4820,
"opened": 1530,
"clicked": 412,
"bounced": 23,
"unsubscribed": 8,
"complained": 1
},
"clicks_by_country": [
{ "country": "US", "click_count": 210 },
{ "country": "GB", "click_count": 85 }
],
"clicks_by_device_type": [
{ "device_type": "Mobile", "click_count": 280 },
{ "device_type": "Desktop", "click_count": 132 }
],
"clicks_by_os": [
{ "operating_system": "iOS", "click_count": 190 },
{ "operating_system": "Windows", "click_count": 95 }
],
"esp_breakdown": [
{
"service_provider": "Google",
"sent": 2130,
"delivered": 2120,
"bounced": 10,
"opened": 690,
"clicked": 180
},
{
"service_provider": "Microsoft",
"sent": 1515,
"delivered": 1508,
"bounced": 7,
"opened": 455,
"clicked": 121
}
],
"link_activity": [
{
"url": "https://example.com/sale",
"total_clicks": 350,
"unique_clicks": 290
}
],
"variant_stats": [
{
"variant_id": "64f1a2b3c4d5e6f7a8b9c0d2",
"delivered": 4820,
"opened": 1530,
"clicked": 412,
"bounced": 23,
"unsubscribed": 8,
"complained": 1
}
]
}
}

The clicks_by_country, clicks_by_device_type, and clicks_by_os arrays are sorted by count descending and capped at 10 entries each.

esp_breakdown has one entry per email service provider (for example Google or Microsoft), worked out from each recipient's domain and MX records, sorted by sent descending. Each entry counts recipients: sent, delivered, bounced, opened (opened at least once), and clicked (clicked at least once).


Errors​

StatusMessageCause
400Please provide a campaign ID.id path param is missing.
400We could not find the campaign you are looking for.Campaign not found.