Skip to content
Hayonix

API reference · Billing

Billing emails sent to the organization (low balance, out of credit, payments …)

GET/v1/orgs/{org_id}/billing/notices
API keybilling:readOrganizationPaginated
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

Headers
HeaderRequiredDescription
AuthorizationyesBearer and your API key. The key implies its project.

Path parameters

  • org_idstring

    Your organization. The SDKs and the CLI fill it in from the API key.

    ID with prefix org_

Query parameters

  • limitinteger

    1–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.

    Show 7 fields of data
    • objectstringrequired

      Always `billing_notice`: the type of this object

      One ofbilling_notice

    • idstringrequired

      Unique ID (`bnot_…`)

      ID with prefix bnot_

    • kindstringrequired

      What the notice is about, for example `low_balance`, `payment_received` or `compute_stopped`

    • subjectstringrequired

      Email subject line

    • bodystringrequired

      Email body (plain text)

    • created_atstring (date-time)required

      When it was created (ISO 8601, UTC)

    • sent_atstring (date-time) | nullrequired

      Time sent (ISO 8601, UTC)

  • next_cursorstring | nullrequired

    Pass as `cursor` for the next page; null on the last page.

Example response
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:

Errors
StatusTypeWhen
400invalid_request_errorA parameter or body field is missing or not allowed; param names it.
401authentication_errorThe key or session is missing, revoked or expired.
403permission_errorThe credential lacks the permission this needs, or the organization is suspended.
402insufficient_credit_errorThe organization is out of credit or over a spend limit.
429rate_limit_error rate_limitedToo many requests; retry after retry-after seconds.