Get daily usage
curl --request GET \
--url https://agents.labs.bandwidth.com/api/v1/organizations/usage/daily-breakdown \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.labs.bandwidth.com/api/v1/organizations/usage/daily-breakdown"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agents.labs.bandwidth.com/api/v1/organizations/usage/daily-breakdown', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"breakdown": [
{
"call_count": 123,
"date": "<string>",
"minutes": 123,
"voai_tokens": 123,
"cost_usd": 123
}
],
"total_minutes": 123,
"total_voai_tokens": 123,
"currency": "<string>",
"total_cost_usd": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Usage
Get daily usage
Retrieve recent daily call usage and cost.
GET
/
api
/
v1
/
organizations
/
usage
/
daily-breakdown
Get daily usage
curl --request GET \
--url https://agents.labs.bandwidth.com/api/v1/organizations/usage/daily-breakdown \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.labs.bandwidth.com/api/v1/organizations/usage/daily-breakdown"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agents.labs.bandwidth.com/api/v1/organizations/usage/daily-breakdown', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"breakdown": [
{
"call_count": 123,
"date": "<string>",
"minutes": 123,
"voai_tokens": 123,
"cost_usd": 123
}
],
"total_minutes": 123,
"total_voai_tokens": 123,
"currency": "<string>",
"total_cost_usd": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}days defaults to 7 and ranges from 1 to 30. This operation requires pricing to be configured for the workspace; otherwise it returns 400. The response includes daily items and totals. Currency and amount fields reflect workspace pricing.Authorizations
LabsAuthLabsApiKey
Bandwidth Labs OAuth access token. Uses the user's selected workspace; the workspace header is not required. Do not also send an API key. Bearer-only operations may additionally require the Labs super_user role.
Headers
Required with X-BW-LABS-AGENTS-API-KEY: the positive local workspace ID to access. The key owner must be a current member. Missing or invalid IDs return 400; non-member workspaces return 403. Not required for bearer authentication, which uses the user's selected workspace.
Query Parameters
Number of days to include
Required range:
1 <= x <= 30