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 }
],
"delivered_by_provider": [
{ "service_provider": "Gmail", "delivery_count": 2100 },
{ "service_provider": "Outlook", "delivery_count": 1500 }
],
"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, clicks_by_os, and delivered_by_provider arrays are sorted by count descending and capped at 10 entries each.


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.