UsageExperimental
Get aggregated usage history
Retrieves historical usage for an eSIM, aggregated per period and usage type, with optional usage-country buckets. Recent periods may still change as additional usage is reported, and totals can differ from the package usage 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 UsagePeriodOne entry per period, oldest first. Periods without any usage are included with an empty usage array.
Show propertiesHide properties
periodStartstring · date-timeInclusive period start, RFC 3339 with the requested timezone's offset
periodEndstring · date-timeExclusive period end
usagearray of UsagePeriodEntryUsage 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
dataobjectoptionalShow propertiesHide properties
usednumberAmount used in unit; data usage is reported as whole bytes
usageCountrystringoptionalISO 3166-1 alpha-2 country where usage occurred, produced by the usageCountry aggregation dimension
sessionCountintegerNumber of logical usage sessions contributing to this aggregate
typestringunitstringvoiceobjectoptionalShow propertiesHide properties
usednumberAmount used in unit; data usage is reported as whole bytes
usageCountrystringoptionalISO 3166-1 alpha-2 country where usage occurred, produced by the usageCountry aggregation dimension
sessionCountintegerNumber of logical usage sessions contributing to this aggregate
typestringunitstringdirectionstringVoice direction; unknown preserves usage whose provider direction is unavailable
incomingoutgoingunknowndestinationCountrystringoptionalISO 3166-1 alpha-2 destination country for outgoing voice, omitted when unknown or not applicable
smsobjectoptionalShow propertiesHide properties
usednumberAmount used in unit; data usage is reported as whole bytes
usageCountrystringoptionalISO 3166-1 alpha-2 country where usage occurred, produced by the usageCountry aggregation dimension
sessionCountintegerNumber of logical usage sessions contributing to this aggregate
typestringunitstring400Bad request - invalid parameters401Unauthorized - missing or invalid API key403Forbidden - client does not have access to this resource404Resource not found429Rate limit exceeded. A `429` can also arrive without these headers or this body; handle it by its status code.500Internal server error