List usage
Billable usage over a range (the current billing month by default), per meter, dimension and bucket (hour, day or month, UTC), oldest first; with group_by=environment, per environment too. Only live environments are billed, so only they appear. Usage counts when it becomes billable (an email when the provider accepts it) and is kept for 400 days.
bearerAuthAuthorizationBearer <token>A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.
from?stringStart (inclusive). Defaults to the start of the current billing month.
date-timeto?stringEnd (exclusive). Defaults to now. At most 400 days after from (7 by hour).
date-timegranularity?stringBucket size (UTC). Defaults to day.
"hour""day""month"group_by?"environment"Split each bucket per environment.
"environment"meter?stringOnly this meter.
"email.recipients""sms.segments""video.participant_minutes""scheduling.bookings"Coss-Version?"2026-10-10"The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.
"2026-10-10"Usage, oldest first.
application/json- response
- response
- …
object*"list""list"data*array<>has_more*falsefalseimport { Coss } from "coss";const coss = new Coss({ apiKey: process.env.COSS_API_KEY, baseUrl: "https://api.coss.com",});const { data, error } = await coss.billing.usage();{ "object": "list", "data": [ { "object": "usage", "meter": "email.recipients", "dimension": null, "environment_id": null, "start": "2026-10-12T00:00:00.000Z", "end": "2026-10-13T00:00:00.000Z", "quantity": 4200 } ], "has_more": false}