Get detailed statistics of your account directly through our API.
Please send your request to the following URL:
https://gateway.sms77.io/api/analytics
Optional parameters
In addition to the data for authentication, the following parameters can be specified:
Parameters | description | Possible values |
---|---|---|
start |
Start date of the statistics in the format YYYY-MM-DD. By default, the date of 30 days ago is set. | 2020-01-01
|
end |
end date of the statistics. By default, the current day. | 2020-05-30
|
label |
Shows only data of a specific label. | all – Shows all data, default.customer_label1 customer_label2 |
subaccounts |
Receive the data only for the main account, all your (sub-)accounts or only for specific subaccounts | only_main – Only data of the main account, default.all – Data of all accounts9123456 – Subaccount ID |
group_by |
Defines the grouping of the data | date – defaultlabel subaccount country |
Return
The results are returned formatted as JSON.
Example 1
Query the statistics of the last 30 days.
Request
https://gateway.sms77.io/api/analytics?p=api-key
Response
[
{
"date": "2020-05-13"
"economy": 1,
"direct": 2,
"voice": 0,
"hlr": 0,
"mnp": 0,
"inbound": 72,
"usage_eur": 0.208
},
{
"date": "2020-05-14"
"economy": 1,
"direct": 6,
"voice": 0,
"hlr": 0,
"mnp": 0,
"inbound": 72,
"usage_eur": 0.508
},
{
"date": "2020-05-15"
"economy": 1,
"direct": 38,
"voice": 0,
"hlr": 0,
"mnp": 0,
"inbound": 72,
"usage_eur": 2,908
},
{
"date": "2020-05-16"
"economy": 1,
"direct": 2,
"voice": 0,
"hlr": 0,
"mnp": 0,
"inbound": 72,
"usage_eur": 0.208
},
...
]
Example 2
Query the statistics of 2019, grouped by destination country. You will receive as country
the ISO 3166-1 alpha-2 code of the respective country. If this code is empty, it is an unidentifiable country.
Request
https://gateway.sms77.io/api/analytics?p=api-key&start=2019-01-01&end=2019-12-31&group_by=country
Response
[
{
"country": "DE",
"economy": 374,
"direct": 149046,
"voice": 19,
"hlr": 333,
"mnp": 167,
"inbound": 43744,
"usage_eur": 11204.0564
},
{
"country": ""
"economy": 0,
"direct": 0,
"voice": 0,
"hlr": 572,
"mnp": 29,
"inbound": 0,
"usage_eur": 5,8725
},
{
"country": "LI",
"economy": 2,
"direct": 15,
"voice": 0,
"hlr": 6,
"mnp": 12,
"inbound": 0,
"usage_eur": 1,331
},
{
"country": "US",
"economy": 0,
"direct": 10,
"voice": 0,
"hlr": 2,
"mnp": 0,
"inbound": 4,
"usage_eur": 0.8
},
{
"country": "PL",
"economy": 0,
"direct": 8,
"voice": 0,
"hlr": 0,
"mnp": 0,
"inbound": 8,
"usage_eur": 0.6
}
]