Analytics

Get aggregated usage analytics

Returns voice, SMS, and data consumption for your organization, aggregated into per-interval totals with highest / lowest / average metadata across the window.

Use this for reporting and dashboards. When you need individual events — to bill on or to act on one customer's usage — use GET /v1/usage instead. Totals lag the network by the same delay as the usage feed.

get/v1/analytics

Request

  • Base URL
    https://api.telgea.com
  • Auth
    API key in header x-api-key

Query parameters

startDatestring date required

Inclusive start of the reporting window (YYYY-MM-DD).

Example:2026-09-01
endDatestring date required

Inclusive end of the reporting window (YYYY-MM-DD).

Example:2026-09-30
interval'month' | 'day' required

Aggregation bucket size

Example:day
userIdstring uuid

Restrict to one end-user your organization owns.

Example:9c1f2a6e-3b7d-4e0a-8f21-5d6c7b8a9e01
msisdnstring

Restrict to a single number.

Example:+4520123456
countryIsoCodestring

Restrict to usage served in one country.

Example:DK
orderBy'asc' | 'desc'

Order the returned intervals ascending or descending by time

Example:asc

Response

Aggregated usage grouped by interval, with per-channel metadata.

Example response

{
  "usage": {
    "data": [
      {
        "interval": "2026-09-11",
        "usage": {
          "total": 10485760
        }
      }
    ],
    "voice": [
      {
        "interval": "2026-09-11",
        "usage": {
          "local": 1240,
          "international": 310,
          "total": 1550
        }
      }
    ],
    "sms": [
      {
        "interval": "2026-09-11",
        "usage": {
          "local": 1240,
          "international": 310,
          "total": 1550
        }
      }
    ]
  },
  "metadata": {
    "data": {
      "highest": {
        "interval": "2026-09-11",
        "usage": {
          "total": 10485760
        }
      },
      "lowest": {
        "interval": "2026-09-11",
        "usage": {
          "total": 10485760
        }
      },
      "average": {
        "total": 10485760
      }
    },
    "voice": {
      "highest": {
        "interval": "2026-09-11",
        "usage": {
          "local": 1240,
          "international": 310,
          "total": 1550
        }
      },
      "lowest": {
        "interval": "2026-09-11",
        "usage": {
          "local": 1240,
          "international": 310,
          "total": 1550
        }
      },
      "average": {
        "local": 1240,
        "international": 310,
        "total": 1550
      }
    },
    "sms": {
      "highest": {
        "interval": "2026-09-11",
        "usage": {
          "local": 1240,
          "international": 310,
          "total": 1550
        }
      },
      "lowest": {
        "interval": "2026-09-11",
        "usage": {
          "local": 1240,
          "international": 310,
          "total": 1550
        }
      },
      "average": {
        "local": 1240,
        "international": 310,
        "total": 1550
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.