curl -G https://api.integrateledger.com/v1/usage/totals \
-H "Authorization: Bearer $LEDGER_API_KEY" \
--data-urlencode "month=2026-11"
import ledger from "integrateledger";
const client = new ledger({ apiKey: process.env.LEDGER_API_KEY ?? "" });
const totals = await client.getUsageTotals({ month: "2026-11" });
console.log(totals);
import os
from integrateledger import ledger
client = ledger(api_key=os.environ["LEDGER_API_KEY"])
totals = client.get_usage_totals(month="2026-11")
print(totals["charged"], totals["reasons"])
{
"month": "2026-11",
"customerId": null,
"events": 1250,
"charged": 1210,
"blocked": 38,
"failed": 2,
"chargedCredits": 4840,
"reasons": {
"insufficient_credits": 35,
"overage_cap_reached": 3,
"feature_not_found": 2
}
}
Usage
Usage totals
Count a month’s tracked requests by outcome and failure reason.
GET
/
v1
/
usage
/
totals
curl -G https://api.integrateledger.com/v1/usage/totals \
-H "Authorization: Bearer $LEDGER_API_KEY" \
--data-urlencode "month=2026-11"
import ledger from "integrateledger";
const client = new ledger({ apiKey: process.env.LEDGER_API_KEY ?? "" });
const totals = await client.getUsageTotals({ month: "2026-11" });
console.log(totals);
import os
from integrateledger import ledger
client = ledger(api_key=os.environ["LEDGER_API_KEY"])
totals = client.get_usage_totals(month="2026-11")
print(totals["charged"], totals["reasons"])
{
"month": "2026-11",
"customerId": null,
"events": 1250,
"charged": 1210,
"blocked": 38,
"failed": 2,
"chargedCredits": 4840,
"reasons": {
"insufficient_credits": 35,
"overage_cap_reached": 3,
"feature_not_found": 2
}
}
Counts the requests
track recorded in one UTC month, for the whole environment or one customerId.
eventsis every request;charged,blockedandfailedsplit it by outcome.chargedCreditsadds up what the charged ones spent, overage included.reasonscounts the refused requests by reason, such asinsufficient_credits,overage_cap_reachedorfeature_not_found.monthis required (YYYY-MM). Usage is filed under the customer’s time, so a customer with Simulate time on can have usage in a later month.
curl -G https://api.integrateledger.com/v1/usage/totals \
-H "Authorization: Bearer $LEDGER_API_KEY" \
--data-urlencode "month=2026-11"
import ledger from "integrateledger";
const client = new ledger({ apiKey: process.env.LEDGER_API_KEY ?? "" });
const totals = await client.getUsageTotals({ month: "2026-11" });
console.log(totals);
import os
from integrateledger import ledger
client = ledger(api_key=os.environ["LEDGER_API_KEY"])
totals = client.get_usage_totals(month="2026-11")
print(totals["charged"], totals["reasons"])
{
"month": "2026-11",
"customerId": null,
"events": 1250,
"charged": 1210,
"blocked": 38,
"failed": 2,
"chargedCredits": 4840,
"reasons": {
"insufficient_credits": 35,
"overage_cap_reached": 3,
"feature_not_found": 2
}
}
Authorizations
Query Parameters
Response
A month's usage, counted by outcome and failure reason