SMS analytics
Totals and per-campaign results for a period.
Scope: sms:read.
GET
/
sms
/
analytics
SMS analytics
curl --request GET \
--url https://app.telaven.com/api/v1/sms/analytics \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.telaven.com/api/v1/sms/analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.telaven.com/api/v1/sms/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.telaven.com/api/v1/sms/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://app.telaven.com/api/v1/sms/analytics");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"success": true,
"data": {
"summary": {
"totalCampaigns": 14,
"completedCampaigns": 13,
"totalSent": 1240,
"totalDelivered": 1188,
"totalFailed": 12,
"totalQueued": 0,
"deliveryRate": 96,
"totalCost": 1116,
"avgCostPerSms": 0.9,
"totalContacts": 2400,
"totalLists": 3
},
"dailyVolume": [],
"statusDistribution": [],
"campaignBreakdown": [],
"pagination": {
"page": 1,
"limit": 10,
"total": 14,
"totalPages": 2
}
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Query Parameters
Response
Success
⌘I
SMS analytics
curl --request GET \
--url https://app.telaven.com/api/v1/sms/analytics \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.telaven.com/api/v1/sms/analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.telaven.com/api/v1/sms/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.telaven.com/api/v1/sms/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://app.telaven.com/api/v1/sms/analytics");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"success": true,
"data": {
"summary": {
"totalCampaigns": 14,
"completedCampaigns": 13,
"totalSent": 1240,
"totalDelivered": 1188,
"totalFailed": 12,
"totalQueued": 0,
"deliveryRate": 96,
"totalCost": 1116,
"avgCostPerSms": 0.9,
"totalContacts": 2400,
"totalLists": 3
},
"dailyVolume": [],
"statusDistribution": [],
"campaignBreakdown": [],
"pagination": {
"page": 1,
"limit": 10,
"total": 14,
"totalPages": 2
}
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}