Space Balance

Retrieve low balance settings

Returns how the space is notified when its balance falls below the threshold, and how auto top-up is configured. A space that has never configured a threshold reports the platform default.

The settings are read from the billing service, so the response is 502 when that service is unavailable.

Permissions

Authenticate with a Personal access token whose holder is an owner or admin of the space. A project API token is not accepted on this endpoint, and a Personal access token has no scopes: the holder's role in the space is the whole authorization decision.

get/api/space/low_balance_setting

Response

The request has succeeded.

type'low_balance_setting' required

The object type. Always low_balance_setting.

threshold_in_microdollarsinteger required

The balance, in microdollars, below which notifications and auto top-up trigger. Falls back to the platform default when never configured.

thresholdnumber double required

The threshold in US dollars. The same value as threshold_in_microdollars.

send_emailboolean required

Whether an email is sent when the balance falls below the threshold.

send_webhookboolean required

Whether a webhook is sent when the balance falls below the threshold.

webhook_urlstring nullable required

The URL the low balance webhook is sent to, or null when none is set.

webhook_method'GET' | 'POST' required

The HTTP method used to deliver the low balance webhook.

send_topupboolean required

Whether auto top-up is enabled.

topup_amount_in_microdollarsinteger nullable required

The amount, in microdollars, deposited by each auto top-up. Can be null.

topup_amountnumber double nullable required

The auto top-up amount in US dollars. The same value as topup_amount_in_microdollars.

topup_payment_method_idstring uuid required

Universal Unique Identifier.

Example response

{
  "type": "low_balance_setting",
  "threshold_in_microdollars": 6000000,
  "threshold": 6,
  "send_email": true,
  "webhook_url": "https://example.com/hooks/low-balance",
  "send_topup": true,
  "topup_amount_in_microdollars": 20000000,
  "topup_amount": 20
}

Changes

Changed in 1 of the 161 revisions of this API.1

Of the 161 revisions, 3 have a changelog that could not be searched.