Get SMS Campaign History
Retrieve paginated per-recipient SMS delivery history, including phone number, delivery status, sender, charge, and click events.
Endpoint
GET https://api.campaignlark.com/v1/sms-campaigns/:id/sms-history
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | required | Campaign ID as a MongoDB ObjectID hex string. |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | integer | optional | 1 | Page number. |
limit | integer | optional | 50 | Items per page. Values are sanitised and capped at 100 by the public API. |
Sample Request
GET https://api.campaignlark.com/v1/sms-campaigns/64f1a2b3c4d5e6f7a8b9c0d1/sms-history?page=1&limit=20
Response
Success — 200 OK
{
"error": null,
"data": {
"sms_history": [
{
"contact_id": "64f1a2b3c4d5e6f7a8b9c0e1",
"first_name": "Jane",
"last_name": "Doe",
"phone_number": "+14155550123",
"first_clicked": "2025-07-01T09:16:00Z",
"last_clicked": "2025-07-01T09:16:00Z",
"failure_reason": null,
"sender": "MyStore",
"charge": "0.0025",
"click_events": [
{
"timestamp": "2025-07-01T09:16:00Z",
"ip": "203.0.113.42",
"user_agent": "Mozilla/5.0...",
"country": "AU",
"device_type": "Mobile",
"os": "iOS",
"link_url": "https://example.com/sale"
}
],
"status": "DELIVERED"
}
],
"pagination": {
"current_page": 1,
"per_page": 20,
"total_pages": 5,
"total_count": 98
}
}
}
SMS History Item
| Field | Type | Description |
|---|---|---|
contact_id | string | Contact ID as a MongoDB ObjectID hex string. |
first_name | string | null | Contact's first name. |
last_name | string | null | Contact's last name. |
phone_number | string | Recipient phone number. |
first_clicked | string | null | RFC3339 timestamp of the first click. |
last_clicked | string | null | RFC3339 timestamp of the most recent click. |
failure_reason | string | null | Failure reason, when applicable. |
sender | string | SMS sender. |
charge | string | Amount charged for this recipient. |
click_events | array | Individual click events. |
status | string | SMS delivery status. |
Click Event Object
| Field | Type | Description |
|---|---|---|
timestamp | string | RFC3339 event timestamp. |
ip | string | IP address recorded for the click. |
user_agent | string | User agent recorded for the click. |
country | string | Detected country code, when available. |
device_type | string | Detected device type, when available. |
os | string | Detected operating system, when available. |
link_url | string | URL that was clicked. |
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. |