Usage
Get Customers Usage
Developers: what each of your customers cost you over a range, in one call — spend net of refunds, how many charges, and spend by kind. Customers with no charges in the range are left out (list them with GET /customers). Without from/to it is this month so far; days are UTC and a range covers at most 366 days. Call it from your own workspace: the Katexs-Workspace header is refused. Any key may call this, a read-only key included.
GET/customers/usage
Query parameters
- fromstring (date)
- First UTC day, YYYY-MM-DD. Needs
to. Default: the 1st of this month. - tostring (date)
- Last UTC day, YYYY-MM-DD. Needs
from. Default: today.
Example request
bash
curl "https://app.katexs.com/api/v1/customers/usage" \
-H "Authorization: Bearer $KATEXS_API_KEY"Responses
| Status | Description |
|---|---|
200 | Spend per customer. |
400 | The header was sent, or a bad range. |
401 | The key is missing, wrong or revoked. The answer is always the same, whichever it is. |
404 | The workspace no longer exists. |
409 | A white-label reseller has clients, not API customers. |
429 | Over a per-minute limit. Wait for Retry-After seconds. code and limit say which limit: rate_limit_resources (240 requests a minute for the workspace), rate_limit_family (2,400 across a developer's customers), rate_limit_calls, rate_limit_messages, rate_limit_codes, rate_limit_code_recipient, concurrent_calls or number_daily_limit. |
Response fields
- timezonestringrequired
- Days are UTC, as Settings → Developer counts the month. One of:
UTC. - fromstring (date)required
- First day counted.
- tostring (date)required
- Last day counted (cut to today).
- currencystringrequired
- Your workspace's currency. Always
USD. - totalMicrointegerrequired
- Spend across all customers in the range. Integer micro-units of
currency: 1000000 is one dollar. - itemsobject[]required
- One per customer with charges in the range, biggest spend first.
200 response
{
"timezone": "UTC",
"from": "2026-09-01",
"to": "2026-09-30",
"currency": "USD",
"totalMicro": 4318200000,
"items": [
{
"customer": "org_8b2e4f6a-1c3d-4e5f-9a7b-0c2d4e6f8a13",
"name": "Mehta Realty",
"externalId": "crm-1042",
"state": "active",
"spendMicro": 3120000000,
"entries": 812,
"byKind": {
"voice_call": 2410000000,
"reply": 710000000
}
},
{
"customer": "org_7Lm2Qp4Rs8Tv1Wx3Yz5AbC",
"name": null,
"externalId": null,
"state": "erased",
"spendMicro": 1198200000,
"entries": 233,
"byKind": {
"wa_message": 1198200000
}
}
]
}Last updated November 2026 · Found a problem? Email support@katexs.com
