Get SMS Campaign Statistics
Retrieve aggregate SMS delivery and engagement statistics, click breakdowns, link activity, and total charged cost.
Endpoint
GET https://api.campaignlark.com/v1/sms-campaigns/:id/statistics
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | required | Campaign ID as a MongoDB ObjectID hex string. |
Sample Request
GET https://api.campaignlark.com/v1/sms-campaigns/64f1a2b3c4d5e6f7a8b9c0d1/statistics
Response
Success — 200 OK
{
"error": null,
"data": {
"aggregate": {
"sent": 4820,
"delivered": 4600,
"clicked": 412,
"failed": 23,
"unsubscribed": 8,
"suppressed": 189
},
"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 }
],
"link_activity": [
{
"url": "https://example.com/sale",
"total_clicks": 350,
"unique_clicks": 290
}
],
"total_cost": "12.3456"
}
}
The breakdown arrays count each recipient's first click, matching email campaign statistics. total_cost is the real charged amount derived from the SMS billing ledger.
Statistics Fields
| Field | Type | Description |
|---|---|---|
aggregate.sent | integer | Number of SMS messages sent. |
aggregate.delivered | integer | Number of delivered SMS messages. |
aggregate.clicked | integer | Number of recipients who clicked. |
aggregate.failed | integer | Number of failed SMS messages. |
aggregate.unsubscribed | integer | Number of unsubscribed recipients. |
aggregate.suppressed | integer | Number of suppressed recipients. |
clicks_by_country | array | Click counts grouped by country. |
clicks_by_device_type | array | Click counts grouped by device type. |
clicks_by_os | array | Click counts grouped by operating system. |
link_activity | array | Total and unique clicks grouped by link URL. |
total_cost | string | Real amount charged according to the billing ledger. |
Errors
| Status | Message | Cause |
|---|---|---|
400 | Please provide a campaign ID. | id is missing. |
400 | We could not find the campaign you are looking for. | The ID is malformed or the campaign does not exist in the workspace. |