Get this month's summary
GET/api/v1/billing/summary
The headline numbers for the current UTC month: usage so far, the month-end projection, what usage so far would cost, and where the free allowance and payment state stand.
mtd_ehuis the billable usage so far;projected_ehuadds the run rate of the last seven complete days for the rest of the month.projected_usdandcharged_usdare already net of the free allowance and of credit — do not subtract them again.charged_usdbreaks down asallowance_covered_ehu(absorbed by the free allowance),credit_applied_ehu(covered by credit) andoverage_ehu(charged to the card), out ofchargeable_ehu.dispatch_blockedistruewhen outbound notifications are stopped because the allowance is spent and there is neither a card nor credit;dispatch_blocked_atanddispatch_block_reasonthen say since when and why. While notifications are still sent but the same condition holds,dispatch_grace_ends_atis when they stop.
Requires the billing:usage:read scope.
Authorization
Responses
200
The summary.
dataSummaryShow Summary properties
period_startstring (date)The first day of the current month.period_endstring (date)The first day of next month (exclusive).mtd_ehunumberBillable usage so far this month.usage_ehunumberThe same usage, summed per line.projected_ehunumberForecast usage for the whole month.projected_usdnumberForecast charge for the month, net of the free allowance and credit.days_elapsedintegerComplete days the run rate is read from.days_remainingintegercharged_usdnumberWhat usage so far would cost, net of the free allowance and credit.allowance_covered_ehunumbercredit_applied_ehunumberchargeable_ehunumberUsage the free allowance did not cover, before credit.overage_ehunumberUsage left to charge to the card after the allowance and credit — the EHU behindcharged_usd.commitment_ehunumberThe committed volume billed this month; 0 without a commitment.statusstringpricing_tierstringallowance_ehunumberThis month's free allowance.allowance_used_ehunumberallowance_remaining_ehunumberhas_payment_methodbooleandispatch_blockedbooleanWhether outbound notifications are stopped right now.dispatch_blocked_atstring (date-time)Present only whiledispatch_blockedistrue.dispatch_block_reasonstringPresent only whiledispatch_blockedistrue.dispatch_grace_ends_atstring (date-time)When notifications stop if nothing changes. Present only while the allowance is spent with no card and no credit, and notifications are still being sent.
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
403
The key lacks the scope this endpoint needs (FORBIDDEN).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
429
Too many requests (RATE_LIMITED). Wait for Retry-After seconds.
Retry-AfterintegerSeconds to wait before retrying.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
500
The summary could not be computed (SUMMARY_FAILED). Retry later.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
Example request
curl -X GET 'https://evohub.io/api/v1/billing/summary' \
-H 'Authorization: Bearer <TOKEN>'
