Telegram Analytics REST API
Telegram Analytics REST API for SMSGatewayCenter APIs
Telegram Analytics REST API
Use the Analytics REST API to fetch Telegram dashboard metrics over HTTP, including today's message totals, message status breakdown, subscriber counts, and daily subscriber trends. This endpoint accepts GET requests and returns JSON.
API Endpoint
https://unify.smsgateway.center/rest/tg/v1/analyticsLegacy alias without v1 in the path is also supported: /rest/tg/analytics
Authentication
Send your account userid and password as parameters, or send your account API key in the apikey request header. Telegram Chat API access must be enabled on your account.
Actions
| Action | Description | Default date range |
|---|---|---|
overview | Returns today's messages, subscriber stats, message breakdown, and subscriber trend in one response. | Last 7 days for breakdown and trend |
today | Returns submitted, delivered, failed, and pending counts for today only. | Today |
messagebreakdown | Returns submitted, delivered, failed, and pending totals for the selected date range. | Last 7 days |
subscriberstats | Returns unique subscriber gains for today, last 7 days, last 15 days, and current month. | Not date filtered |
subscribertrend | Returns daily unique subscriber gains for the selected date range. | Current month to today |
| Parameter | Required | Description | Example/Value |
|---|---|---|---|
| Authentication | |||
| userid | Yes | Your SMSGatewayCenter account username. | YourUsername |
| password | Yes* | Your account password. Not required when apikey header is used. | ********** |
| output | Yes | Response format. Must be json. | json |
| Optional Parameters | |||
| action | Optional | Defaults to overview. Allowed: overview, today, messagebreakdown, subscriberstats, subscribertrend. | overview |
| fromDate | Optional | Start date for range-based actions. Format YYYY-MM-DD. Alias: from. Maximum range is 31 days. | 2026-07-01 |
| toDate | Optional | End date for range-based actions. Format YYYY-MM-DD. Alias: to. | 2026-07-07 |
curl --location 'https://unify.smsgateway.center/rest/tg/v1/analytics?userid=YourUsername&password=xxxxx&output=json&action=overview&fromDate=2026-07-01&toDate=2026-07-07'
curl --location 'https://unify.smsgateway.center/rest/tg/v1/analytics?userid=YourUsername&password=xxxxx&output=json&action=subscribertrend&fromDate=2026-07-01&toDate=2026-07-07'
{
"status": "success",
"analytics": {
"todayMessages": {
"total": 120,
"success": 115,
"failed": 3,
"pending": 2
},
"subscriberStats": {
"today": 3,
"week": 12,
"fifteenDays": 25,
"month": 40
},
"messageBreakdown": [
{ "label": "Submitted", "value": 120, "labelColor": "#0B62A4" },
{ "label": "Delivered", "value": 115, "labelColor": "#01c0c8" },
{ "label": "Failed", "value": 3, "labelColor": "#DE1F95" },
{ "label": "Pending", "value": 2, "labelColor": "#fb9678" }
],
"subscriberTrend": {
"total": 15,
"labels": ["01 Jul", "02 Jul"],
"counts": [2, 5],
"series": [
{ "date": "2026-07-01", "label": "01 Jul", "count": 2 },
{ "date": "2026-07-02", "label": "02 Jul", "count": 5 }
]
}
},
"fromDate": "2026-07-01",
"toDate": "2026-07-07",
"statusCode": "200",
"reason": "success"
}
{
"status": "error",
"analytics": [],
"statusCode": "403",
"reason": "Telegram API access is not enabled for this account."
}
Notes
totalis submitted messages,successis delivered,failedis failed, andpendingis pending.- Subscriber counts are based on unique new Telegram customer mappings by creation date.
- Date ranges cannot exceed 31 days.
Testimonials
Why do Great Businesses Trust SMS Gateway Center?

