Skip to main content
GET
Get account usage for a time range.

Authorizations

x-api-key
string
header
required

LedgerUp API Key.

Path Parameters

account_id
string
required

Resource identifier. LedgerUp account identifier.

Pattern: ^account_[0-9a-f]{32}$
Example:

"account_0194f4e3a2b77c6aa91c4f6b4db2a980"

Query Parameters

start_at
integer<int64>
required

Inclusive lower bound for event occurrence time. Unix timestamp in seconds.

Example:

1767225600

end_at
integer<int64>
required

Exclusive upper bound for event occurrence time. Unix timestamp in seconds.

Example:

1767225600

aggregation
enum<string>
default:sum

Aggregation applied to corrected usage events. Defaults to sum. Aggregation applied to corrected usage events. latest returns the quantity from the event with the latest occurred_at; ties use accepted_at then event ID. count returns the number of events.

Available options:
sum,
min,
max,
avg,
latest,
count
Example:

"sum"

currency
string

Aggregate only events for this currency. Normalized to lowercase.

Pattern: ^[A-Za-z]{3}$
Example:

"usd"

Response

Account and usage aggregated by metric or currency.

account
object
required
events_consumed
object[]
required