Trillet AI logo

Get usage totals

Trillet OEM API: Usage totals by day or month, per tenant or per charge type, in USD.

GEThttps://api.trillet.ai/partner/v1/usage

Usage totals by day or month, per tenant or per charge type, in USD. A range can cover up to 92 days. Usage includes deleted tenants. Needs usage:read.

Loading code example
Loading code example

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

fromstring<date-time>

Start, inclusive. Default is the start of the current month (UTC).

tostring<date-time>

End, exclusive. Default is now.

tenantIdstring

Only this tenant.

Pattern: ^[a-fA-F0-9]{24}$
groupBy"tenant" | "type"default: tenant
Allowed values: "tenant" | "type"
Default: "tenant"
granularity"day" | "month"default: day
Allowed values: "day" | "month"
Default: "day"

Response

application/json

Usage totals.

objectstringrequired
fromstring<date-time>required
tostring<date-time>required
currencystringrequired
groupBy"tenant" | "type"required
Allowed values: "tenant" | "type"
granularity"day" | "month"required
Allowed values: "day" | "month"
totalnumberrequired
dataarray<object>required
data.periodstring

YYYY-MM-DD or YYYY-MM, UTC.

data.tenantIdstring

Present when groupBy is tenant.

data.type"call_charge" | "message_charge" | "sms_charge" | "voice_generation_charge" | "antibot_detection_charge" | "workflow_charge" | "phone_number_charge" | "phone_number_purchase"

Present when groupBy is type.

Allowed values: "call_charge" | "message_charge" | "sms_charge" | "voice_generation_charge" | "antibot_detection_charge" | "workflow_charge" | "phone_number_charge" | "phone_number_purchase"
data.amountnumber

USD.

data.countinteger
data.billedMinutesnumber

Last updated on