curl --request GET \
--url https://app.thinnest.ai/api/v1/customers/usage \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/customers/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/customers/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"timezone": "UTC",
"from": "2026-09-01",
"to": "2026-09-30",
"currency": "INR",
"totalMicro": 4318200000,
"items": [
{
"customer": "org_3fKq9TzQ1mN8vB2xR7cLpA",
"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
}
}
]
}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 Thinnest-Workspace header is refused. Any key may call this, a read-only key included.
curl --request GET \
--url https://app.thinnest.ai/api/v1/customers/usage \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/customers/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/customers/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"timezone": "UTC",
"from": "2026-09-01",
"to": "2026-09-30",
"currency": "INR",
"totalMicro": 4318200000,
"items": [
{
"customer": "org_3fKq9TzQ1mN8vB2xR7cLpA",
"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
}
}
]
}Authorizations
Your API key (ta_live_…) from Settings → API keys, sent as Authorization: Bearer <key>. Keep it on a server: it can message every customer you have. A key is full, build or read-only; a request its level does not allow is refused with 403.
Query Parameters
First UTC day, YYYY-MM-DD. Needs to. Default: the 1st of this month.
Last UTC day, YYYY-MM-DD. Needs from. Default: today.
Response
Spend per customer.
Days are UTC, as Settings → Developer counts the month.
UTC First day counted.
Last day counted (cut to today).
Your workspace's currency (INR when unset).
INR, USD Spend across all customers in the range. Integer micro-units of currency: 1000000 is one rupee or one dollar.
One per customer with charges in the range, biggest spend first.
Show child attributes
Show child attributes