Skip to main content
GET
cURL

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Path Parameters

id
string<uuid>
required

The unique identifier (UUID) of the account. Must be the authenticated account or another accessible via organization membership.

Query Parameters

limit
integer
default:20

Maximum number of line items to return per page.

Required range: 1 <= x <= 100
sort
enum<string>
default:created_at

Order of the line items, both descending: created_at (newest first, the default) or cost (largest credits_deducted first, ties by newest).

Available options:
created_at,
cost
cursor
string

Opaque paging token: pass the next_cursor value from the previous page, with the same sort, from and to. With sort=created_at it is the last item's created_at; with sort=cost it encodes the last item's amount and id. Returns the items that follow it.

from
string<date-time>

Start of the period (inclusive), ISO 8601. Defaults to the start of the current UTC month.

to
string<date-time>

End of the period (exclusive), ISO 8601. Defaults to now.

Response

Usage line items retrieved successfully

account_id
string<uuid>
required

The account whose charges are listed.

Example:

"550e8400-e29b-41d4-a716-446655440000"

period
object
required

The period the totals cover.

total_credits_deducted
integer
required

Sum of credits_deducted over every charge in the period, in micro-dollars. Covers the whole period, not only this page.

Example:

70000

total_usd
string
required

total_credits_deducted formatted as US dollars.

Example:

"$0.07"

events
object[]
required

Charges in the period in the requested sort order (newest first by default).

next_cursor
string | null
required

Opaque; pass as cursor (with the same sort, from and to) to fetch the next page. Null when the page was the last one in the period.

Example:

"2026-08-27T11:56:58.000Z"

series_bucket
enum<string>

Granularity of series, derived from the span of the period: hour up to 2 days, day up to 90 days, week up to 12 months, month beyond. Present only on a first page (no cursor).

Available options:
hour,
day,
week,
month
Example:

"day"

series
object[]

Spend over the period, one entry per series_bucket that had at least one charge, ascending by start, in UTC. The sum of credits_deducted across the entries equals total_credits_deducted. Present only on a first page (no cursor); omitted on cursor pages so paging never recomputes it.

Example: