Help Center
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.

Results can't be filtered by topic: filter on topic in your own code after fetching.

Parameters

  • date_fromstringform fieldOptional

    Start of the period, as YYYY-MM-DD HH:MM:SS. Defaults to 24 hours ago.

    Example2026-10-01 00:00:00
  • date_tostringform fieldOptional

    End of the period, as YYYY-MM-DD HH:MM:SS. Defaults to now.

    Example2026-10-22 00:00:00
  • showstringform fieldOptional

    good returns only authorised messages, bad only rejected ones. Leave empty for both.

    One ofgoodbad
  • pagerintegerform fieldOptional

    Maximum number of records to return.

    Default50
  • offintegerform fieldOptional

    Number of records to skip, for paging.

    Default0
  • downloadintegerform fieldOptional

    1 returns all matching records as a CSV file (mqtt_messages.csv) instead of JSON.

    One of01
    Default0
POST/buyers/iothistory
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'
Response
{
  "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.

A destination that matches nothing returns zero totals rather than an error. Write destinations without spaces around the first hyphen: EGYPT-Mobile - Vodafone, not EGYPT - Mobile - Vodafone.

Parameters

  • date_fromstringform fieldOptional

    Start of the range, inclusive, as YYYY-MM-DD HH:MM:SS. Send both dates, or neither for the last 12 days.

    Example2026-08-01 00:00:00
  • date_tostringform fieldOptional

    End of the range, inclusive, as YYYY-MM-DD HH:MM:SS. Use 23:59:59 to include the whole final day.

    Example2026-10-31 23:59:59
  • time_formatstringform fieldOptional

    daily returns one row per day; any other value, such as monthly, returns one row per calendar month.

    Defaultdaily
    Examplemonthly
  • statusstringform fieldOptional

    good 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.

    Defaultgood
    Exampleall
  • accounts[]integerform fieldOptional

    One of your voice account IDs; repeat the field for several. Omit to include all your voice accounts.

    Example1022
  • connections[]integerform fieldOptional

    i_connection of a purchased voice route; repeat the field for several. Omit to include all your purchased voice routes.

    Example653
  • destination_descriptions[]stringform fieldOptional

    A 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.

    ExampleEGYPT-Mobile - Vodafone
  • downloadintegerform fieldOptional

    1 returns a CSV attachment (voice_summary.csv) instead of JSON.

    One of01
    Default0
POST/buyers/voice/summary
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=0
Response
{
  "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.

A destination that matches nothing returns zero totals rather than an error. To cover a whole country, send the country followed by -%, for example OMAN-%.

Parameters

  • date_fromstringform fieldOptional

    Start of the range, inclusive, as YYYY-MM-DD HH:MM:SS. Send both dates, or neither for the last 12 days.

    Example2026-08-01 00:00:00
  • date_tostringform fieldOptional

    End of the range, inclusive, as YYYY-MM-DD HH:MM:SS. Use 23:59:59 to include the whole final day.

    Example2026-09-30 23:59:59
  • time_formatstringform fieldOptional

    daily returns one row per day; any other value, such as monthly, returns one row per calendar month.

    Defaultdaily
    Examplemonthly
  • statusstringform fieldOptional

    good counts messages accepted by the route, bad counts messages that failed, any other value (such as all) counts both.

    Defaultgood
    Exampleall
  • accounts[]integerform fieldOptional

    One of your SMPP or IoT account IDs; repeat the field for several. Omit to include all of them.

    Example1855
  • connections[]integerform fieldOptional

    i_connection of a purchased SMS route; repeat the field for several. Omit to include all your purchased SMS routes.

    Example1160
  • destination_descriptions[]stringform fieldOptional

    A 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.

    ExampleOMAN-%
  • downloadintegerform fieldOptional

    1 returns a CSV attachment (sms_summary.csv) with one row per period and sender ID instead of JSON.

    One of01
    Default0
POST/buyers/sms/summary
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=0
Response
{
  "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
    }
  ]
}