TelgeaDevelopers

Usage

Raw voice, SMS and data records as one chronological feed, granular enough to bill on.

The usage record object

Retrieve raw voice, SMS, and data usage records for billing and suspension.

FieldTypeDescription
idrequiredstringIdentifier of this usage record. Stable, so you can deduplicate across pages.
cdr_01j9v2k8f3m4n5p6q7r8s9t0u1
typerequiredenum
VOICESMSMMSDATAUNKNOWN
What was metered. `UNKNOWN` is a record the network sent us that we could not classify.
DATA
providerrequiredstringThe network that reported this usage.
telia-denmark
msisdnrequiredstringThe number the usage was recorded against, in E.164 format.
+4520123456
timeStartedrequiredstringWhen the session or message started, ISO 8601 UTC.
2026-09-11T08:30:00.000Z
timeEndedrequiredstringWhen it ended, ISO 8601 UTC. Null for records the network reports without a duration.
2026-09-11T08:34:12.000Z
amountrequirednumberUsage quantity, expressed in `unit`.
10485760
unitrequiredenum
secondscountbytes
What `amount` counts: seconds for voice, count for messages, bytes for data.
bytes
servingCountryCoderequiredstringISO-2 country serving the subscriber.
DK
usageClassrequiredenum
domesticroaminginternational
Where the usage sat relative to the home market.
domestic
counterpartyMsisdnrequiredstringCommunication records only.
+4598765432
callDirectionrequiredenum
inboundoutbound
Which way the call or message went. Null for data.
outbound
counterpartyCountryCoderequiredstringISO-2 country of the other party. Null for data.
DK
networkTyperequiredstringData records only.
5G
userIdrequiredstringThe end-user this usage belongs to, or null when the number is not attached to one.
9c1f2a6e-3b7d-4e0a-8f21-5d6c7b8a9e01
daterequiredstringCalendar day the usage is billed under, YYYY-MM-DD.
2026-09-11
totalPricerequiredstringWhat this record costs, as a decimal string so no precision is lost. A connected voice call may also carry a one-off connection fee, which is included here and is not derivable from unitPrice. Null until the record is rated, and on usage covered by a pool.
0.043200
unitPricerequiredstringThe rate applied, as a decimal string. Priced per minute for voice, per binary megabyte (1024²) for data, and per message for SMS and MMS — so for voice and data this is not the same unit `amount` is counted in. Null until the record is rated.
0.004320
currencyrequiredstringISO 4217 currency of the prices. Null until rated.
EUR
rateIdrequiredstringThe rate that priced this record, for reconciling a bill line by line. Null until rated.
rate_01j9v2k8f3m4n5p6q7r8s9t0u1

Operations

List usage records

GET/v1/usage
Enterprise APIPartner API

Returns raw voice, SMS, and data usage records for your organization whose timeStarted falls between startDate and endDate, as one feed — you do not need to know that we store calls and data separately. Records come in the order we stored or last corrected them, not by timeStarted.

Walk a period with the opaque cursor: send the first request with a startDate/endDate, then keep passing the nextCursor from each response until hasMore is false. Filter to one subscriber with userId.

Records are granular enough to bill on. Each arrives once the network reports it, from minutes to days after the usage depending on the market, and keeps its original timeStarted; a record we correct later comes round again with the same id. To poll incrementally, keep the cursor you sent for the last page and send it again, with the same window, on the next poll: you receive everything stored or corrected since, including records whose timeStarted is earlier than any you have seen. De-duplicate on id, keeping the latest copy. Records written in the last few minutes are held back until they settle. Expect usage from the last 24–48 hours to keep changing as late records arrive and are rated; the cursor delivers those updates.

Polling budget. Each API key allows 1000 requests per 24 hours, shared across every endpoint. Walk a whole organisation with the default page size rather than polling per subscriber — a request over the budget returns 429.

Requires the permission consumption:read on the key.

Try it in the playground → Calls run against your live organization; there is no sandbox.

Parameters

ParameterInTypeDescription
startDaterequiredquerystring (date)Inclusive start of the usage window (YYYY-MM-DD, UTC).
2026-09-01
endDaterequiredquerystring (date)Inclusive end of the usage window (YYYY-MM-DD, UTC). The window may span at most 31 days.
2026-09-30
pageSizequeryintegerRecords per page (max 100)
50
cursorquerystringOpaque cursor from a previous response's nextCursor. Omit for the first page.
eyJjIjoiMjAyNi0wOS0xMVQwODozMDowMC4xMjM0NTZaI…
userIdquerystring (uuid)Restrict to one end-user your organization owns. Omit for every user.
9c1f2a6e-3b7d-4e0a-8f21-5d6c7b8a9e01

Responses

StatusMeaningBody
200A page of usage records with a forward cursor.UsageFeedResponse
400Invalid cursor, a query window wider than the published maximum, or schema validationnone
401Missing or invalid API key in the X-API-Key headerUnauthorizedError
403The API key lacks the consumption:read scopeForbiddenError
429The API key has used its request quota for the current window. `Retry-After` says how many seconds until it resets.TooManyRequestsError
500Internal server error. Contact support if this persists.InternalError

Problems this endpoint can return

StatusProblemWhen
400Invalid usage cursorThe usage feed is read with a cursor it did not hand out.
Response fields

200 UsageFeedResponse

FieldTypeDescription
itemsrequiredarray of UsageRecordUsage records on this page, in the order they were stored or last corrected.
Show 20 child fields of items
FieldTypeDescription
idrequiredstringIdentifier of this usage record. Stable, so you can deduplicate across pages.
cdr_01j9v2k8f3m4n5p6q7r8s9t0u1
typerequiredenum
VOICESMSMMSDATAUNKNOWN
What was metered. `UNKNOWN` is a record the network sent us that we could not classify.
DATA
providerrequiredstringThe network that reported this usage.
telia-denmark
msisdnrequiredstringThe number the usage was recorded against, in E.164 format.
+4520123456
timeStartedrequiredstringWhen the session or message started, ISO 8601 UTC.
2026-09-11T08:30:00.000Z
timeEndedrequiredstringWhen it ended, ISO 8601 UTC. Null for records the network reports without a duration.
2026-09-11T08:34:12.000Z
amountrequirednumberUsage quantity, expressed in `unit`.
10485760
unitrequiredenum
secondscountbytes
What `amount` counts: seconds for voice, count for messages, bytes for data.
bytes
servingCountryCoderequiredstringISO-2 country serving the subscriber.
DK
usageClassrequiredenum
domesticroaminginternational
Where the usage sat relative to the home market.
domestic
counterpartyMsisdnrequiredstringCommunication records only.
+4598765432
callDirectionrequiredenum
inboundoutbound
Which way the call or message went. Null for data.
outbound
counterpartyCountryCoderequiredstringISO-2 country of the other party. Null for data.
DK
networkTyperequiredstringData records only.
5G
userIdrequiredstringThe end-user this usage belongs to, or null when the number is not attached to one.
9c1f2a6e-3b7d-4e0a-8f21-5d6c7b8a9e01
daterequiredstringCalendar day the usage is billed under, YYYY-MM-DD.
2026-09-11
totalPricerequiredstringWhat this record costs, as a decimal string so no precision is lost. A connected voice call may also carry a one-off connection fee, which is included here and is not derivable from unitPrice. Null until the record is rated, and on usage covered by a pool.
0.043200
unitPricerequiredstringThe rate applied, as a decimal string. Priced per minute for voice, per binary megabyte (1024²) for data, and per message for SMS and MMS — so for voice and data this is not the same unit `amount` is counted in. Null until the record is rated.
0.004320
currencyrequiredstringISO 4217 currency of the prices. Null until rated.
EUR
rateIdrequiredstringThe rate that priced this record, for reconciling a bill line by line. Null until rated.
rate_01j9v2k8f3m4n5p6q7r8s9t0u1
nextCursorrequiredstringPass as `cursor` to fetch the next page; null once the feed is exhausted. To pick up later changes, resend the cursor that fetched the last page.
eyJjIjoiMjAyNi0wOS0xMVQwODozMDowMC4xMjM0NTZaI…
hasMorerequiredbooleanWhether another page follows. Equivalent to nextCursor being non-null.
true
GET/v1/usage

Request

curl -X GET "https://api.telgea.com/v1/usage" \
  -H "x-api-key: $TELGEA_API_KEY"

Response

{
  "items": [
    {
      "id": "cdr_01j9v2k8f3m4n5p6q7r8s9t0u1",
      "type": "DATA",
      "provider": "telia-denmark",
      "msisdn": "+4520123456",
      "timeStarted": "2026-09-11T08:30:00.000Z",
      "timeEnded": "2026-09-11T08:34:12.000Z",
      "amount": 10485760,
      "unit": "bytes",
      "servingCountryCode": "DK",
      "usageClass": "domestic",
      "counterpartyMsisdn": null,
      "callDirection": null,
      "counterpartyCountryCode": null,
      "networkType": "5G",
      "userId": "9c1f2a6e-3b7d-4e0a-8f21-5d6c7b8a9e01",
      "date": "2026-09-11",
      "totalPrice": "0.043200",
      "unitPrice": "0.004320",
      "currency": "EUR",
      "rateId": "rate_01j9v2k8f3m4n5p6q7r8s9t0u1"
    }
  ],
  "nextCursor": "eyJjIjoiMjAyNi0wOS0xMVQwODozMDowMC4xMjM0NTZaIiwicyI6ImRhdGEiLCJpIjoiY2RyXzEifQ",
  "hasMore": true
}
Need the raw schema? OpenAPI JSON