Get message usage
GET https://chatapps.8x8.com/api/v1/accounts/:accountId/usage/messages
Returns monthly per-message usage totals for the specified billing period. Results can be filtered and grouped by subaccount, business account, channel, pricing category, and destination country.
Currently, only WhatsApp is supported.
Constraints:
- Data is available from February 2026 onwards
- Only closed billing periods can be queried
- Maximum lookback: 6 months
Grouping behavior:
- If
groupByis omitted, a single aggregated total is returned -
pricingis included whengroupBycontainschannel,businessAccountId,pricingCategory, andcountry
Request
Path Parameters
You must replace {accountId} with the account ID that you want to use.
Query Parameters
Possible values: Value must match regular expression ^\d{4}-(0[1-9]|1[0-2])$
The billing month to query, in YYYY-MM format (e.g. 2026-03). Must be a closed billing period from February 2026 or later. Maximum lookback is 6 months.
Possible values: [whatsapp]
Filter results by messaging channel. Currently, only whatsapp is supported. Defaults to whatsapp if omitted.
Comma-separated list of dimensions to group results by. When omitted, a single aggregated total is returned. pricing is included when groupBy contains channel, businessAccountId, pricingCategory, and country.
Available values: subAccountId, channel, businessAccountId, pricingCategory, country.
Successful response containing message usage data.
Schema
- Array [
- Array [
- ]
- ]
data object[]
List of usage records, grouped according to the groupBy parameter.
Sub-account identifier. Present when subAccountId is included in groupBy.
umsg_AGG001
Messaging channel. Present when channel is included in groupBy.
Possible values: [whatsapp]
whatsapp
ISO 3166-1 alpha-2 destination country code. Present when country is included in groupBy.
IN
Business account identifier associated with the messaging provider. For WhatsApp, this represents the WhatsApp Business Account (WABA) ID. Present when businessAccountId is included in groupBy.
120xx01234567890
Message pricing category. For WhatsApp: utility, marketing, authentication, authentication_international, service. Present when pricingCategory is included in groupBy.
utility
volume object
Message volume breakdown.
Total number of delivered messages.
479100
Number of messages that were charged.
437900
Number of messages delivered at no charge.
41200
pricing object
Pricing structure. Present when groupBy includes channel, businessAccountId, pricingCategory, and country.
The pricing rate model applied to this combination.
Possible values: [flat, tiered]
tiered
tiers object[]
Tier breakdown. Only present when rateModel is tiered.
Lower bound of this tier (inclusive).
0
Upper bound of this tier (inclusive). null indicates an openended bracket with no upper limit.
250000
Number of messages that fall within this tier.
250000
Indicates the tier was fully settled. Always completed since only closed billing periods can be queried.
Possible values: [completed]
completed
meta object
Metadata about the request and result set.
The account ID used in the request.
bp-xxx
billingPeriod object
Start date of the billing period.
2026-03-01
End date of the billing period.
2026-03-31
The billing period status. Always closed since only closed billing periods can be queried.
Possible values: [closed]
closed
Timestamp the final data snapshot for this billing period.
2026-03-16T12:00:00Z
The groupBy dimensions applied to this query.
["subAccountId","channel","businessAccountId","pricingCategory","country"]
Currency used for pricing amounts (ISO 4217 code).
USD
{
"data":[
{
"subAccountId":"umsg_AGG001",
"channel":"whatsapp",
"country":"IN",
"businessAccountId":"120xx01234567890",
"pricingCategory":"utility",
"volume":{
"delivered":479100,
"charged":437900,
"free":41200
},
"pricing":{
"rateModel":"tiered",
"tiers":[
{
"from":0,
"to":250000,
"quantity":250000,
"status":"completed"
}
]
}
}
],
"meta":{
"accountId":"bp-xxx",
"billingPeriod":{
"start":"2026-03-01",
"end":"2026-03-31",
"status":"closed"
},
"dataAsOf":"2026-03-16T12:00:00Z",
"groupBy":[
"subAccountId",
"channel",
"businessAccountId",
"pricingCategory",
"country"
],
"currency":"USD"
}
}
Response with full groupBy (includes pricing)
{
"data":[
{
"subAccountId":"umsg_AGG001",
"channel":"whatsapp",
"country":"IN",
"businessAccountId":"120xx01234567890",
"pricingCategory":"utility",
"volume":{
"delivered":479100,
"charged":437900,
"free":41200
},
"pricing":{
"rateModel":"tiered",
"tiers":[
{
"from":0,
"to":250000,
"quantity":250000,
"status":"completed"
},
{
"from":250001,
"to":500000,
"quantity":187900,
"status":"completed"
}
]
}
},
{
"subAccountId":"umsg_AGG001",
"channel":"whatsapp",
"country":"IN",
"businessAccountId":"120xx01234567890",
"pricingCategory":"marketing",
"volume":{
"delivered":1234,
"charged":1234,
"free":0
},
"pricing":{
"rateModel":"flat"
}
}
],
"meta":{
"accountId":"bp-xxx",
"billingPeriod":{
"start":"2026-03-01",
"end":"2026-03-31",
"status":"closed"
},
"dataAsOf":"2026-03-16T12:00:00Z",
"groupBy":[
"subAccountId",
"channel",
"businessAccountId",
"pricingCategory",
"country"
],
"currency":"USD"
}
}
Response without groupBy (aggregated volume only)
{
"data":[
{
"volume":{
"delivered":480334,
"charged":439134,
"free":41200
}
}
],
"meta":{
"accountId":"bp-xxx",
"billingPeriod":{
"start":"2026-03-01",
"end":"2026-03-31",
"status":"closed"
},
"dataAsOf":"2026-03-16T12:00:00Z",
"groupBy":[],
"currency":"USD"
}
}
Bad request. The billing period format is invalid, the period is not yet closed, the date is before February 2026, or the lookback exceeds 6 months.
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Data and time of the error occurence
{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
Request was not authenticated.
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Data and time of the error occurence
{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
Source: https://developer.8x8.com/connect/reference/get-message-usage · 8x8 CPaaS Developer Docs. Synced for support deflection.
0 Comments