Hanzo
OpenapiBilling

Lists this org's spend caps: the ceiling, its scope, whether it enforces, and…

Lists this org's spend caps: the ceiling, its scope, whether it enforces, and how much of it has been spent this period.

GET /v1/billing/alerts

Addresshttps://api.hanzo.ai/v1/billing/alerts
MethodGET
Operationget_billing_alerts
AuthAuthorization: Bearer $HANZO_API_KEY

Lists this org's spend caps: the ceiling, its scope, whether it enforces, and how much of it has been spent this period.

periodSpentCents, over and warn are ABSENT rather than zero when the spend could not be read, because "nothing spent" and "spend unknown" are different answers and a customer acting on the first when the second is true would be reading a ceiling that is not there. The policy row is reported either way.

The period is the UTC calendar month and resetsAt is when the count starts again, so a surface can say "resets on" without a second call.

A named handler, not a closure, so zipdoc can lift this prose into the registry.

Request

GET /v1/billing/alerts takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200Alert[]ok

200 body — 18 fields.

FieldInTypeAlwaysDescription
[].createdAtbodystring
[].currencybodystring
[].enforcebodyboolean
[].idbodystring
[].overbodyboolean
[].periodbodystring
[].periodSpentCentsbodyinteger
[].projectbodystring
[].rateLimitRpmbodyinteger
[].resetsAtbodystring
[].servicebodystring
[].softPctbodyinteger
[].thresholdbodyinteger
[].titlebodystring
[].triggeredAtbodystring
[].updatedAtbodystring
[].userIdbodystring
[].warnbodyboolean

Failure carries the platform error shape — see Errors.

Examples

hanzo billing alerts list

Billing API · All Hanzo APIs · Interactive reference

How is this guide?

On this page