Skip to content

Three endpoints cover reporting: totals, time series and country breakdown. All require the sms.read permission and accept the same period filters.

Parameter Default Description
period 7d today, yesterday, 7d, 30d, this_month, last_month
from / to — Custom range YYYY-MM-DD. Use only when period is omitted; the to day is included
source api api, broadcasts, all
country — ISO code filter: US, GB, …
sender — Filter by sender ID
phone — Search by phone number (substring)
status — delivered, undelivered, pending, expired, not_billed, sent, failed, unknown, clicked, converted

GET /api/v1/sms/stats · Permission: sms.read

Terminal window
curl "https://restlink23telecom.com/api/v1/sms/stats?period=30d" \
-H "X-API-Key: $API_KEY"
200 OK
{
"status": true,
"stats": {
"total_sent": 1250,
"sent": 1200,
"delivered": 1150,
"undelivered": 30,
"pending": 15,
"expired": 5,
"not_billed": 50,
"failed": 35,
"click_count": 42,
"unique_click_count": 38,
"human_click_events": 45,
"bot_click_events": 2,
"action_count": 12,
"sent_rate": 96.00,
"delivery_rate": 95.83,
"total_cost": 10.63,
"avg_cost_per_msg": 0.0085,
"total_segments": 1250,
"sent_segments": 1200,
"delivered_segments": 1150,
"pending_segments": 15,
"undelivered_segments": 30,
"expired_segments": 5,
"not_billed_segments": 50
},
"currency": "EUR",
"period": {"from": "2026-01-15", "to": "2026-02-14"}
}

period.to in responses is exclusive (the day after the last day counted).

How the numbers relate:

Sent = Delivered + Undelivered + Pending + Expired
TotalSent = Sent + NotBilled
Field Description
total_sent All messages attempted
sent Accepted by carrier (total_sent − not_billed)
delivered Delivered to handset (DELIVRD)
undelivered Failed: UNDELIV, REJECTD, DELETED, UNKNOWN
pending Still in transit
expired Delivery timed out — counted separately from undelivered
not_billed Never submitted to a carrier and never charged: gateway rejections (no route available) and pre-send balance rejections
failed Deprecated: undelivered + expired
click_count / unique_click_count Messages with at least one human link click / unique recipients who clicked. API and campaign messages; with source=all a recipient is counted once across both
human_click_events / bot_click_events API messages only: every human / bot link redirect, including repeats; campaign clicks are not counted here
action_count Recorded conversions
sent_rate (sent / total_sent) × 100
delivery_rate (delivered / sent) × 100
total_cost / avg_cost_per_msg Cost in account currency
currency ISO 4217 account currency for the request workspace; empty when not yet known
*_segments Segment counts for total, sent, delivered, pending, undelivered, expired and not-billed messages

GET /api/v1/sms/stats/daily · Permission: sms.read

Day-by-day breakdown for charts, sorted by date ascending.

Terminal window
curl "https://restlink23telecom.com/api/v1/sms/stats/daily?period=7d&granularity=auto" \
-H "X-API-Key: $API_KEY"

Extra parameters:

Parameter Description
granularity auto switches to hourly buckets on a single-day range (dates become 2026-02-13T09:00); the top-level granularity key appears only when granularity=auto was sent
countries Comma-separated ISO codes US,GB,DE; results stay sorted by date ascending
200 OK (one day shown)
{
"status": true,
"daily_stats": [
{
"date": "2026-02-13",
"sent": 195,
"delivered": 188,
"undelivered": 4,
"pending": 1,
"expired": 2,
"not_billed": 3,
"failed": 6,
"click_count": 3,
"human_click_events": 4,
"bot_click_events": 1,
"cost": 1.66,
"sent_segments": 195,
"delivered_segments": 188,
"pending_segments": 1,
"undelivered_segments": 4,
"expired_segments": 2,
"not_billed_segments": 3
}
],
"granularity": "daily",
"period": {"from": "2026-02-07", "to": "2026-02-14"}
}

Daily failed is deprecated (undelivered + expired) and omitted when 0. click_count, human_click_events and bot_click_events count API messages only (campaign clicks are not included, even with source=broadcasts or source=all); each key is omitted when its value is 0.

Daily entries include sent_segments, delivered_segments, pending_segments, undelivered_segments, expired_segments, and not_billed_segments. Country statistics are message-count based and do not currently include segment totals.

GET /api/v1/sms/stats/by-country · Permission: sms.read

Grouped by destination country, sorted by total_sent descending. The country filter is ignored; unknown numbers give XX / Unknown. sent_rate and delivery_rate are rounded to one decimal place. click_count counts API messages only with at least one human click; campaign messages are included in the delivery counts but add 0 clicks.

Terminal window
curl "https://restlink23telecom.com/api/v1/sms/stats/by-country?period=30d" \
-H "X-API-Key: $API_KEY"
200 OK (one country shown)
{
"status": true,
"countries": [
{
"country": "United States",
"country_code": "US",
"country_flag": "🇺🇸",
"total_sent": 520,
"sent": 500,
"delivered": 485,
"undelivered": 10,
"pending": 3,
"expired": 2,
"not_billed": 20,
"sent_rate": 96.2,
"click_count": 12,
"delivery_rate": 97.0,
"cost": 4.25
}
],
"period": {"from": "2026-01-15", "to": "2026-02-14"}
}