API reference · Billing
Billing emails sent to the organization (low balance, out of credit, payments …)
/v1/orgs/{org_id}/billing/notices- TypeScript
client.billing.listNotices()- Python
client.billing.list_notices()- CLI
hayonix billing notices
Returns the billing notices written for the organization, newest first, including ones not yet emailed (sent_at null).
Project API key (Authorization: Bearer sk_…), or a console session. Requires the billing:read permission (a key's scope, or a role that includes it).
Examples
The samples read API_KEY and API_BASE_URL from the environment (see Setup). Values are examples.
# The org of your key: GET /v1/caller
ORG_ID=$(curl -sS "$API_BASE_URL/caller" -H "Authorization: Bearer $API_KEY" | jq -r .org_id)
curl -sS "$API_BASE_URL/orgs/$ORG_ID/billing/notices" \
-H "Authorization: Bearer $API_KEY"Request
| Header | Required | Description |
|---|---|---|
Authorization | yes | Bearer and your API key. The key implies its project. |
Path parameters
org_idstringYour organization. The SDKs and the CLI fill it in from the API key.
ID with prefix org_
Query parameters
limitinteger1–200, default 50
1–200
cursorstring`next_cursor` of the previous page
up to 200 characters
Response
200 a page of results — A page of notices, newest first
The items of this page.
ShowHide 7 fields of
dataobjectstringrequiredAlways `billing_notice`: the type of this object
One of
billing_noticeidstringrequiredUnique ID (`bnot_…`)
ID with prefix bnot_
kindstringrequiredWhat the notice is about, for example `low_balance`, `payment_received` or `compute_stopped`
subjectstringrequiredEmail subject line
bodystringrequiredEmail body (plain text)
created_atstring (date-time)requiredWhen it was created (ISO 8601, UTC)
sent_atstring (date-time) | nullrequiredTime sent (ISO 8601, UTC)
next_cursorstring | nullrequiredPass as `cursor` for the next page; null on the last page.
Example response
{
"data": [
{
"object": "billing_notice",
"id": "bnot_01jc5zq4m8k3v6x9t2w7r0b1e4",
"kind": "string",
"subject": "string",
"body": "string",
"created_at": "2026-01-01T00:00:00.000Z",
"sent_at": "2026-01-01T00:00:00.000Z"
}
],
"next_cursor": "string"
}Errors
Errors use the standard envelope. What this operation can answer:
| Status | Type | When |
|---|---|---|
400 | invalid_request_error | A parameter or body field is missing or not allowed; param names it. |
401 | authentication_error | The key or session is missing, revoked or expired. |
403 | permission_error | The credential lacks the permission this needs, or the organization is suspended. |
402 | insufficient_credit_error | The organization is out of credit or over a spend limit. |
429 | rate_limit_error rate_limited | Too many requests; retry after retry-after seconds. |