All API resources
Reports
Traffic summaries by period, and the detail records for IoT (MQTT) messages.
List IoT (MQTT) message records
POST/buyers/iothistory
Lists the MQTT messages published or received by your IoT accounts between two times, newest first: account, topic, payload, direction, whether the message was authorised, and the amount charged. Free.
topic in your own code after fetching.Parameters
date_fromstringform fieldOptionalStart of the period, as YYYY-MM-DD HH:MM:SS. Defaults to 24 hours ago.
date_tostringform fieldOptionalEnd of the period, as YYYY-MM-DD HH:MM:SS. Defaults to now.
showstringform fieldOptionalgood returns only authorised messages, bad only rejected ones. Leave empty for both.
pagerintegerform fieldOptionalMaximum number of records to return.
offintegerform fieldOptionalNumber of records to skip, for paging.
downloadintegerform fieldOptional1 returns all matching records as a CSV file (mqtt_messages.csv) instead of JSON.
curl --digest -u "$TCXC_USERNAME:$TCXC_API_KEY" -X POST \
"https://apiv2.telecomsxchange.com/buyers/iothistory" \
-d date_from='2026-10-01 00:00:00' \
-d date_to='2026-10-22 00:00:00'import os
import requests
from requests.auth import HTTPDigestAuth
resp = requests.post(
"https://apiv2.telecomsxchange.com/buyers/iothistory",
auth=HTTPDigestAuth(os.environ["TCXC_USERNAME"], os.environ["TCXC_API_KEY"]),
data={"date_from": "2026-10-01 00:00:00", "date_to": "2026-10-22 00:00:00"},
)
print(resp.json())$ch = curl_init("https://apiv2.telecomsxchange.com/buyers/iothistory");
curl_setopt_array($ch, [
CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
CURLOPT_USERPWD => getenv('TCXC_USERNAME') . ':' . getenv('TCXC_API_KEY'),
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query(['date_from' => "2026-10-01 00:00:00", 'date_to' => "2026-10-22 00:00:00"]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);{
"status": "success",
"mqtt_messages": [
{
"i_mqtt_message": "192",
"i_account": "2203",
"i_customer": "1014",
"topic": "sensors/warehouse-3/temperature",
"payload": "21.4",
"direction": "1",
"authorized": "1",
"charged_amount": "0.0001",
"ts": "2026-10-21 16:11:05",
"account_name": "mqtt-warehouse"
}
]
}Voice summary report
POST/buyers/voice/summary
Totals your voice traffic per day or per month: spend, billed minutes and number of calls, optionally narrowed to some of your accounts, purchased routes and destinations. Returns JSON, or a CSV file when download=1. Free.
Parameters
date_fromstringform fieldOptionalStart of the range, inclusive, as YYYY-MM-DD HH:MM:SS. Send both dates, or neither for the last 12 days.
date_tostringform fieldOptionalEnd of the range, inclusive, as YYYY-MM-DD HH:MM:SS. Use 23:59:59 to include the whole final day.
time_formatstringform fieldOptionaldaily returns one row per day; any other value, such as monthly, returns one row per calendar month.
statusstringform fieldOptionalgood counts answered calls, bad counts failed calls, any other value (such as all) counts both. With all, spend and minutes come from answered calls and the call count includes failed calls.
accounts[]integerform fieldOptionalOne of your voice account IDs; repeat the field for several. Omit to include all your voice accounts.
connections[]integerform fieldOptionali_connectionof a purchased voice route; repeat the field for several. Omit to include all your purchased voice routes.destination_descriptions[]stringform fieldOptionalA destination as the country and the description joined by a single hyphen with no spaces around it, for example EGYPT-Mobile - Vodafone; repeat for several. % works as a wildcard, so EGYPT-% covers the whole country. Omit for all destinations.
downloadintegerform fieldOptional1 returns a CSV attachment (voice_summary.csv) instead of JSON.
curl --digest -u "$TCXC_USERNAME:$TCXC_API_KEY" -X POST \
"https://apiv2.telecomsxchange.com/buyers/voice/summary" \
-d date_from='2026-08-01 00:00:00' \
-d date_to='2026-10-31 23:59:59' \
-d time_format=monthly \
-d status=all \
-d accounts[]=1022 \
-d connections[]=653 \
-d destination_descriptions[]='EGYPT-Mobile - Vodafone' \
-d download=0import os
import requests
from requests.auth import HTTPDigestAuth
resp = requests.post(
"https://apiv2.telecomsxchange.com/buyers/voice/summary",
auth=HTTPDigestAuth(os.environ["TCXC_USERNAME"], os.environ["TCXC_API_KEY"]),
data={"date_from": "2026-08-01 00:00:00", "date_to": "2026-10-31 23:59:59", "time_format": "monthly", "status": "all", "accounts[]": 1022, "connections[]": 653, "destination_descriptions[]": "EGYPT-Mobile - Vodafone", "download": 0},
)
print(resp.json())$ch = curl_init("https://apiv2.telecomsxchange.com/buyers/voice/summary");
curl_setopt_array($ch, [
CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
CURLOPT_USERPWD => getenv('TCXC_USERNAME') . ':' . getenv('TCXC_API_KEY'),
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query(['date_from' => "2026-08-01 00:00:00", 'date_to' => "2026-10-31 23:59:59", 'time_format' => "monthly", 'status' => "all", 'accounts[]' => 1022, 'connections[]' => 653, 'destination_descriptions[]' => "EGYPT-Mobile - Vodafone", 'download' => 0]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);{
"status": "success",
"summary": [
{
"date_from": "2026-08-01 00:00:00",
"date_to": "2026-08-31 23:59:59",
"date_text": "2026 Aug",
"total_amt": 67.245,
"total_minutes": 619.3167,
"total_calls": 1034
},
{
"date_from": "2026-09-01 00:00:00",
"date_to": "2026-09-30 23:59:59",
"date_text": "2026 Sep",
"total_amt": 327.73,
"total_minutes": 2982.7667,
"total_calls": 5299
},
{
"date_from": "2026-10-01 00:00:00",
"date_to": "2026-10-31 23:59:59",
"date_text": "2026 Oct",
"total_amt": 0,
"total_minutes": 0,
"total_calls": 0
}
]
}SMS summary report
POST/buyers/sms/summary
Totals your SMS traffic per day or per month: spend and number of messages, optionally narrowed to some of your SMS accounts, purchased SMS routes and destinations. Returns JSON, or a CSV file broken down by sender ID when download=1. Free.
Parameters
date_fromstringform fieldOptionalStart of the range, inclusive, as YYYY-MM-DD HH:MM:SS. Send both dates, or neither for the last 12 days.
date_tostringform fieldOptionalEnd of the range, inclusive, as YYYY-MM-DD HH:MM:SS. Use 23:59:59 to include the whole final day.
time_formatstringform fieldOptionaldaily returns one row per day; any other value, such as monthly, returns one row per calendar month.
statusstringform fieldOptionalgood counts messages accepted by the route, bad counts messages that failed, any other value (such as all) counts both.
accounts[]integerform fieldOptionalOne of your SMPP or IoT account IDs; repeat the field for several. Omit to include all of them.
connections[]integerform fieldOptionali_connectionof a purchased SMS route; repeat the field for several. Omit to include all your purchased SMS routes.destination_descriptions[]stringform fieldOptionalA destination as the country and the description joined by a single hyphen with no spaces around it, for example OMAN-Mobile - Omantel; repeat for several. % works as a wildcard, so OMAN-% covers the whole country. Omit for all destinations.
downloadintegerform fieldOptional1 returns a CSV attachment (sms_summary.csv) with one row per period and sender ID instead of JSON.
curl --digest -u "$TCXC_USERNAME:$TCXC_API_KEY" -X POST \
"https://apiv2.telecomsxchange.com/buyers/sms/summary" \
-d date_from='2026-08-01 00:00:00' \
-d date_to='2026-09-30 23:59:59' \
-d time_format=monthly \
-d status=all \
-d accounts[]=1855 \
-d connections[]=1160 \
-d destination_descriptions[]='OMAN-%' \
-d download=0import os
import requests
from requests.auth import HTTPDigestAuth
resp = requests.post(
"https://apiv2.telecomsxchange.com/buyers/sms/summary",
auth=HTTPDigestAuth(os.environ["TCXC_USERNAME"], os.environ["TCXC_API_KEY"]),
data={"date_from": "2026-08-01 00:00:00", "date_to": "2026-09-30 23:59:59", "time_format": "monthly", "status": "all", "accounts[]": 1855, "connections[]": 1160, "destination_descriptions[]": "OMAN-%", "download": 0},
)
print(resp.json())$ch = curl_init("https://apiv2.telecomsxchange.com/buyers/sms/summary");
curl_setopt_array($ch, [
CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
CURLOPT_USERPWD => getenv('TCXC_USERNAME') . ':' . getenv('TCXC_API_KEY'),
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query(['date_from' => "2026-08-01 00:00:00", 'date_to' => "2026-09-30 23:59:59", 'time_format' => "monthly", 'status' => "all", 'accounts[]' => 1855, 'connections[]' => 1160, 'destination_descriptions[]' => "OMAN-%", 'download' => 0]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);{
"status": "success",
"summary": [
{
"date_from": "2026-08-01 00:00:00",
"date_to": "2026-08-31 23:59:59",
"date_text": "2026 Aug",
"total_amt": 3.3606,
"total_sms": 28
},
{
"date_from": "2026-09-01 00:00:00",
"date_to": "2026-09-30 23:59:59",
"date_text": "2026 Sep",
"total_amt": 1.8883,
"total_sms": 85
}
]
}