Skip to main content

List Transactional SMS

Retrieve transactional messages in the API key's workspace, newest queued first. Logs are kept for 90 days; campaign and automation SMS are not included.


Endpoint​

GET https://api.campaignlark.com/v1/sms

Query Parameters​

ParameterTypeRequiredDefaultDescription
pageintegeroptional1Page number. Values below 1 become 1.
limitintegeroptional50Items per page. Values below 1 become 50; values above 100 are capped at 100.
statusstringoptional—One status: QUEUED, SENT, DELIVERED, or FAILED. Case-insensitive; surrounding whitespace is ignored.
searchstringoptional—Case-insensitive literal substring search of the phone number or caller-supplied reference. Not a regular expression; surrounding whitespace is ignored.
fromstringoptional—Inclusive lower bound on queued_at, as YYYY-MM-DD or RFC3339. A date without a time starts at midnight UTC.
tostringoptional—Inclusive upper bound on queued_at, as YYYY-MM-DD or RFC3339. A date without a time includes that entire UTC day.

Omitted date bounds do not constrain the corresponding end of the retained log range. Unlike the statistics endpoint, omitting both dates does not apply a last-30-days default. from must not be after to.


Sample Request​

GET https://api.campaignlark.com/v1/sms?page=1&limit=10&status=DELIVERED&search=lead-123&from=2026-03-01&to=2026-03-31
Authorization: Bearer YOUR_API_KEY

Response​

Success — 200 OK​

{
"data": {
"messages": [
{
"id": "69b27e24be03b743d4b9b7b3",
"status": "DELIVERED",
"to": "+14155552671",
"parts": 1,
"charge": "0.01250",
"reference": "lead-123",
"created_at": "2026-03-12T08:49:00Z"
}
],
"pagination": {
"current_page": 1,
"per_page": 10,
"total_pages": 1,
"total_count": 1
}
}
}

Message Object​

FieldTypeDescription
idstringTracking ID returned by the send endpoint.
statusstringQUEUED, SENT, DELIVERED, or FAILED.
tostringDestination phone number.
partsintegerSMS segment count; initially estimated.
chargestringMonetary charge as a decimal string, not a JSON number.
referencestringCaller-supplied reference, or "" if omitted.
created_atstring | nullRFC3339 queuing timestamp.

The list omits message content and delivery timestamps. Use Get Transactional SMS for the full record. An empty result has messages: [], total_count: 0, and total_pages: 0.


Errors​

StatusMessageCause
400Please choose a valid SMS status: QUEUED, SENT, DELIVERED or FAILED.Unsupported status, including a comma-separated list of statuses.
400Please provide from/to dates as YYYY-MM-DD or RFC3339 timestamps.A date cannot be parsed.
400The from date must be before the to date. Adjust the date range and try again.from is later than to.
400We couldn't load your SMS messages. Please try again shortly.Counting or listing messages failed.

The authentication, rate-limit, and error-envelope rules also apply.