Retrieve daily usage for an entity
curl --request GET \
--url https://api.writer.com/api/billing/v1/organization/{organizationId}/consumption/daily/{scope}/{scopeId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.writer.com/api/billing/v1/organization/{organizationId}/consumption/daily/{scope}/{scopeId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.writer.com/api/billing/v1/organization/{organizationId}/consumption/daily/{scope}/{scopeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "USD",
"generated_at": "2026-10-20T12:00:00Z",
"days": [
{
"date": "2026-10-01",
"cost_in_cents": 40,
"total_tokens": 1500
},
{
"date": "2026-10-02",
"cost_in_cents": 0,
"total_tokens": 0
}
]
}{
"tpe": "<string>",
"errors": [
{
"key": "<string>",
"description": "<string>"
}
]
}{
"tpe": "<string>",
"errors": [
{
"key": "<string>",
"description": "<string>"
}
]
}Observability API
Retrieve daily usage for an entity
Retrieve one row per day of the month for one user, team, playbook, or billing group. Days with no usage return zero. When a team filter applies, from team_id or a legacy team API key, the series counts only the user’s or playbook’s usage in that team, so one that isn’t in the team returns zero for every day.
GET
/
api
/
billing
/
v1
/
organization
/
{organizationId}
/
consumption
/
daily
/
{scope}
/
{scopeId}
Retrieve daily usage for an entity
curl --request GET \
--url https://api.writer.com/api/billing/v1/organization/{organizationId}/consumption/daily/{scope}/{scopeId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.writer.com/api/billing/v1/organization/{organizationId}/consumption/daily/{scope}/{scopeId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.writer.com/api/billing/v1/organization/{organizationId}/consumption/daily/{scope}/{scopeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "USD",
"generated_at": "2026-10-20T12:00:00Z",
"days": [
{
"date": "2026-10-01",
"cost_in_cents": 40,
"total_tokens": 1500
},
{
"date": "2026-10-02",
"cost_in_cents": 0,
"total_tokens": 0
}
]
}{
"tpe": "<string>",
"errors": [
{
"key": "<string>",
"description": "<string>"
}
]
}{
"tpe": "<string>",
"errors": [
{
"key": "<string>",
"description": "<string>"
}
]
}Use an organization API key (All teams). An existing legacy team key can read the
team, user, and playbook scopes for its own team only. See Export usage and spend for examples, pagination, and error handling.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your Writer API key. User keys can't read consumption data.
Path Parameters
Query Parameters
Response
Daily series for the entity.
Was this page helpful?