Get the usage breakdown
What the workspace consumed and was charged over a window, grouped by one dimension per call (`by`: day, platform or keyword), in USD cents at list price, with the window's totals on every call. `range` reads a trailing window of UTC days ending today (default 30d); `month` reads one calendar month (YYYY-MM), the shape a bill or a per-customer margin is reconciled against. Keyword-days come from the daily tick and mention charges from the matches that billed, so a deleted keyword keeps its charges in the keyword rows (`keyword.removed`) while its mention counts read 0; the same numbers ride on each keyword as `stats.cost` for the running month. `totals.ledgerDebitCents` is what the wallet has debited so far for the window's days: mentions settle the morning after their day, so a window ending today lags `totals.totalCents` by the unsettled ones, and a closed month differs from it only by cumulative rounding. Rows are paged (`limit`, `offset`, `total`); a workspace may read this at most 30 times a minute through its keys and tokens together.
API key minted via POST /v1/api-keys (format mk_live_...)
In: header
Query Parameters
The dimension to group by: day (one row per UTC day of the window), platform, or keyword (default: the row a margin is computed from).
"keyword""day" | "platform" | "keyword"Trailing window of UTC days ending today: 7d, 30d, 90d (default 30d). Ignored when month is given.
"7d" | "30d" | "90d"A calendar month (YYYY-MM, UTC) instead of a trailing window: from its first day to its last, or to today for the running month. A future month is a 400.
^\d{4}-(0[1-9]|1[0-2])$Rows per page, 1 to 500 (default 100). Only by=keyword can outgrow a page; a window has at most 90 days and a dozen platforms.
1001 <= value <= 500Skip this many rows.
00 <= valueResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://api.mentio.dev/v1/usage/breakdown"{
"window": {
"from": "string",
"to": "string",
"days": 0,
"keywordDaysFrom": "string"
},
"by": "day",
"currency": "USD",
"totals": {
"keywordDays": 0,
"keywordCents": 0,
"matchedMentions": 0,
"billableMentions": 0,
"mentionCents": 0,
"totalCents": 0,
"unclassifiedMentions": 0,
"ledgerDebitCents": 0,
"unattributedBillable": 0
},
"data": [
{
"key": "string",
"label": "string",
"keyword": {
"id": "string",
"term": "string",
"removed": true
},
"keywordDays": 0,
"keywordCents": 0,
"matchedMentions": 0,
"billableMentions": 0,
"mentionCents": 0,
"totalCents": 0
}
],
"total": 0
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"retryAfterSeconds": 0
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"retryAfterSeconds": 0
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"retryAfterSeconds": 0
}
}Update a segment PATCH
Previous Page
Get usage and balance GET
The prepaid balance (ledger, pending mention charges, and the effective balance the stop rule reads), the daily burn and the days it buys, the keywords the wallet runs and pauses, the matches recorded today and over 30 days, and whether tracking is stopped or the balance is low. Every matched mention bills ($0.008), relevant or not; every active keyword bills $5 a month, charged daily.