Hanzo
OpenapiBilling

Opens a spend cap on the caller's own org.

Opens a spend cap on the caller's own org.

POST /v1/billing/alerts

Addresshttps://api.hanzo.ai/v1/billing/alerts
MethodPOST
Operationpost_billing_alerts
AuthAuthorization: Bearer $HANZO_API_KEY

Opens a spend cap on the caller's own org.

At least one limit must mean something: a threshold above zero (a spend cap) or a requests-per-minute above zero (a rate limit). A row that bounds neither is refused rather than stored, because a ceiling nothing measures against is a ceiling a customer believes in and does not have.

The cap is keyed on the caller's own billing subject, resolved server-side — the SAME key the verdict looks it up under, which is what makes enforcement bind rather than merely record.

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

Request

9 fields, body application/json (required).

FieldInTypeRequiredDescription
currencybodystring
enforcebodyboolean
projectbodystring
rateLimitRpmbodyinteger
servicebodystring
softPctbodyinteger
subjectbodystring
thresholdbodyinteger
titlebodystring

Response

StatusBodyMeaning
201Alertcreated

201 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 create

Billing API · All Hanzo APIs · Interactive reference

How is this guide?

On this page