Skip to main content
POST
The credit spend ledger

Authorizations

Authorization
string
header
required

Your API token (af_…) as the Basic-auth username, with an empty password.

Body

application/json
since
string<date-time>
required

Start of the spend window (inclusive) as an ISO 8601 date or date-time, e.g. 2026-08-01 or 2026-08-01T00:00:00Z. spendByDateByProduct is bucketed by the window's length — daily while it spans at most 13 days, then weekly (ISO weeks), monthly or quarterly — while usage always reflects the current billing period regardless of the window.

to
string<date-time>

End of the spend window (inclusive) as an ISO 8601 date or date-time; must not precede since. Omit to run the window up to now. A date-only value means midnight UTC at the START of that day, so send an end-of-day instant (e.g. 2026-08-31T23:59:59.999Z) to include the last day.

memberIds
string[]

Restrict spendByDateByProduct to these teammates' deductions. Omit or pass [] for the whole ledger (every teammate sees the same default). Each id must be an active member of the caller's team; including the owner adds the owner's own untagged charges. Any id outside the team answers 403 TEAM_MEMBER_NOT_IN_SCOPE. usage always reflects the current billing period regardless of this filter.

Maximum array length: 200

Response

Success

since
string<date-time>
required
to
string<date-time> | null
required
memberIds
string[]
required
usage
object | null
required
spendByDateByProduct
object[] | null
required