Reports
Get clicks
https://api.smsedge.com/v1/reports/clicks/Returns every click on the short links of your SMS (real clicks, bot clicks and link previews), one row per click, newest first.
Filter by campaign, period and country. The report covers campaign messages and messages sent with Send a single SMS and Send SMS to a list. Bot clicks are listed even though they are not counted in your click statistics.
type sets which clicks are returned: real (a person opened the link), bot (automated traffic) and preview (the messaging app fetched the link to show a preview). Send several as a comma list (type=real,bot) or an array (type[]=real&type[]=bot). The default is real,bot.
Dates are click times and accept YYYY-MM-DD or YYYY-MM-DD HH:MM:SS. A bare date_to includes the whole day. The period is 31 days max. Without date_from, the report starts when the campaign was created (with campaign_id) or 24 hours before date_to.
Use limit and offset to page through the results. limit is 10,000 max. pagination.total is the number of matching clicks; pagination also returns the filters that were applied.
number is null unless it is enabled for your account. Contact your account manager to enable it. message_key is the value your offer URL received as {{{dynamic}}}, so you can match clicks with your postbacks.
With an agency API key, the report includes the clicks of the agency's customer accounts; account_id says which one.
Query params
campaign_idintegeroptionalReturns only clicks on this campaign's messages. See List campaigns.
date_fromstringoptionalReturns only clicks on or after this time.
date_tostringoptionalReturns only clicks on or before this time. 31 days max after date_from.
country_idintegeroptionalReturns only clicks on numbers of this country (the country of the phone number, not of the clicking IP). See List countries.
typestringoptionalWhich clicks to return: real, bot, preview. Comma list or array.
Default:
real,botlimitintegeroptionalNumber of clicks to return. 10,000 max.
Default:
1000offsetintegeroptionalNumber of clicks to skip.
Default:
0
Responses
- 200Clicks
- 400A parameter is invalid. Other messages: "Invalid type [x] requested. Use one or more of: real, bot, preview", "Invalid Dates requested (date_from is after date_to)", "Invalid campaign_id requested" (not one of your campaigns), "Invalid country_id requested", "Invalid date_from requested", "Invalid date_to requested".
- 401The API key is missing, wrong or the account is blocked
- 404No click matches the filters. The pagination block is still returned.
curl -X GET "https://api.smsedge.com/v1/reports/clicks/?campaign_id=123456&date_from=2026-11-01" \
-H "X-API-KEY: YOUR_API_KEY"[
{
"success": true,
"data": [
{
"click_id": 1002,
"clicked_at": "2026-11-06 18:42:10",
"type": "bot",
"account_id": 736,
"number": null,
"country_id": 225,
"country_name": "United Kingdom",
"country_iso": "GB",
"campaign_id": 123456,
"sms_id": null,
"list_id": 54321,
"sent_at": "2026-11-06 18:40:02",
"short_url": "https://exmpl.link/aB3dE",
"message_key": "123456-1106-00000000002",
"ip": "203.0.113.20",
"ip_country": "US",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36",
"language": null
},
{
"click_id": 1001,
"clicked_at": "2026-11-06 18:41:55",
"type": "real",
"account_id": 736,
"number": null,
"country_id": 225,
"country_name": "United Kingdom",
"country_iso": "GB",
"campaign_id": 123456,
"sms_id": null,
"list_id": 54321,
"sent_at": "2026-11-06 18:40:01",
"short_url": "https://exmpl.link/Xy7Qz",
"message_key": "123456-1106-00000000001",
"ip": "203.0.113.10",
"ip_country": "GB",
"user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1",
"language": "en-GB,en;q=0.9"
}
],
"errors": [],
"pagination": {
"limit": 1000,
"offset": 0,
"total": 2,
"date_from": "2026-11-01 00:00:00",
"date_to": "2026-11-07 23:59:59",
"type": [
"real",
"bot"
],
"campaign_id": 123456,
"country_id": null
},
"response": {
"code": 200,
"description": "OK",
"date": "2026-11-16 14:01:05"
},
"api": {
"version": "v1",
"module": "reports",
"function": "clicks"
},
"user": {
"id": 736
}
}
]All requests need your API key in the X-API-KEY header. See Authentication.