Usage
Get aggregated usage history
Experimental. This endpoint is still settling — its request and response shape may change without a deprecation cycle.
Retrieves historical usage for an eSIM, aggregated per period and usage type, with optional usage-country buckets. Built from provider CDRs: recent periods may still change as files arrive, and totals can differ from the live counters returned by the packages endpoints.
from/to are wall-clock timestamps interpreted in timezone — they must
not carry a zone designator (Z or offset) and must fall on the temporal
aggregation boundary in that timezone (midnight for day, first of month
for month). On the DST fall-back day a day period genuinely contains 25
hours; a spring-forward wall-clock gap is resolved by shifting across the gap.
Usage is attributed to the period containing the session's usageUpdatedAt. For every
period the aggregated total exactly equals the sum of the sessions listed by the
sessions endpoint for the same window; data usage is reported as whole bytes on both.
Every requested period is returned. Periods without usage have an empty
usage array. Usage is always grouped by type. aggregation accepts grouping
dimensions followed by a temporal period: day produces daily totals, while
usageCountry,day produces daily totals per country where usage occurred and
includes usageCountry in each country bucket. Voice is always additionally
grouped by direction, and outgoing voice by destination country when known.
/profiles/{profileReference}/esims/{esimReference}/usage/historyAuthorization
Authorization: Bearer {token} — an OAuth2 access token from the client-credentials flow. How authentication works
Path parameters
profileReferencestringrequiredThe eSIM's profile reference (16-digit numeric string)
esimReferencestringrequiredeSIM reference identifier (18-digit opaque token)
Query parameters
fromstringrequiredPeriod start (inclusive). Wall-clock in timezone, no zone designator, aligned to aggregation, and no more than 3 calendar months before the current wall-clock time.
tostringPeriod end (exclusive, so a full period ends at the start of the next one). Same format and alignment as from; defaults to the next aggregation boundary after now (the in-progress period is included). Maximum span and lookback are 3 calendar months.
aggregationstringrequiredComma-separated grouping dimensions followed by period size. Supported periods are hour, day, and month; usageCountry adds buckets for the country where usage occurred. Voice is always split by direction, and outgoing voice by destination country. Spans longer than 7 days require a day or month period.
hourdaymonthusageCountry,hourusageCountry,dayusageCountry,monthtimezonestringAllowed IANA timezone used to interpret from/to and cut period boundaries.
UTCEurope/AmsterdamEurope/BerlinEurope/BrusselsEurope/LondonEurope/ParisAmerica/New_YorkAmerica/Los_AngelesAsia/SingaporeAsia/TokyoAustralia/SydneyUTCResponses
200Aggregated usage per periodapplication/jsonShow response bodyHide response body
dataarray of UsagePeriodrequiredOne entry per period, oldest first. Periods without any usage are included with an empty usage array.
Show propertiesHide properties
periodStartstring · date-timerequiredInclusive period start, RFC 3339 with the requested timezone's offset
periodEndstring · date-timerequiredExclusive period end
usagearray of UsagePeriodEntryrequiredUsage in this period, always split by type. The optional usageCountry dimension applies to every type. Voice is always split by direction, and outgoing voice by destination country when known. Only observed combinations are included.
Show propertiesHide properties
dataobjectShow propertiesHide properties
usednumberrequiredAmount used in unit; data usage is reported as whole bytes
usageCountrystringISO 3166-1 alpha-2 country where usage occurred, produced by the usageCountry aggregation dimension
sessionCountintegerrequiredNumber of logical usage sessions contributing to this aggregate
typestringrequiredunitstringrequiredvoiceobjectShow propertiesHide properties
usednumberrequiredAmount used in unit; data usage is reported as whole bytes
usageCountrystringISO 3166-1 alpha-2 country where usage occurred, produced by the usageCountry aggregation dimension
sessionCountintegerrequiredNumber of logical usage sessions contributing to this aggregate
typestringrequiredunitstringrequireddirectionstringrequiredVoice direction; unknown preserves usage whose provider direction is unavailable
incomingoutgoingunknowndestinationCountrystringISO 3166-1 alpha-2 destination country for outgoing voice, omitted when unknown or not applicable
smsobjectShow propertiesHide properties
usednumberrequiredAmount used in unit; data usage is reported as whole bytes
usageCountrystringISO 3166-1 alpha-2 country where usage occurred, produced by the usageCountry aggregation dimension
sessionCountintegerrequiredNumber of logical usage sessions contributing to this aggregate
typestringrequiredunitstringrequired400Bad request - invalid parameters401Unauthorized - missing or invalid API key403Forbidden - client does not have access to this resource404Resource not found429Rate limit exceeded500Internal server error