Skip to main content

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

ParameterTypeRequiredDescription
idstringrequiredCampaign ID as a MongoDB ObjectID hex string.

Query Parameters

ParameterTypeRequiredDefaultDescription
pageintegeroptional1Page number.
limitintegeroptional50Items 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

FieldTypeDescription
contact_idstringContact ID as a MongoDB ObjectID hex string.
first_namestring | nullContact's first name.
last_namestring | nullContact's last name.
phone_numberstringRecipient phone number.
first_clickedstring | nullRFC3339 timestamp of the first click.
last_clickedstring | nullRFC3339 timestamp of the most recent click.
failure_reasonstring | nullFailure reason, when applicable.
senderstringSMS sender.
chargestringAmount charged for this recipient.
click_eventsarrayIndividual click events.
statusstringSMS delivery status.

Click Event Object

FieldTypeDescription
timestampstringRFC3339 event timestamp.
ipstringIP address recorded for the click.
user_agentstringUser agent recorded for the click.
countrystringDetected country code, when available.
device_typestringDetected device type, when available.
osstringDetected operating system, when available.
link_urlstringURL that was clicked.

Errors

StatusMessageCause
400Please provide a campaign ID.id is missing.
400We could not find the campaign you are looking for.The ID is malformed or the campaign does not exist in the workspace.