Usage and spend

Usage alert thresholds and opt-in overage with its spend cap

Alert thresholds, and whether overage is available, on, off or paused, with the spend cap, its bounds and the rates. Overage is off by default; owners and billing members change it with the PUT (the console on /api/v1, or a CLI session on /v1; project API keys are refused).

get/v1/organizations/{organization_id}/spend-policy

Request

  • Base URL: https://api.shardflux.dev
  • URL: https://api.shardflux.dev/v1/organizations/{organization_id}/spend-policy
  • Auth: HTTP bearer

Path parameters

organization_idstring uuid required

UUIDv7, lowercase canonical form.

Response

Default Response

organization_idstring uuid required

UUIDv7, lowercase canonical form.

alert_thresholdsinteger[] required

Percentages of each allowance that send a usage email to owners and billing members.

overagestring nullable required

The plan's overage policy: disabled | opt_in | enabled; null without a plan.

overage_availableboolean required

The plan offers opt-in overage and the organization pays for it with a subscription, so overage can be turned on.

overage_enabledboolean required

Overage is turned on (off by default).

spend_cap_minorinteger nullable required

The configured spend cap per billing period, minor units of currency. Null: never set.

spend_cap_max_minorinteger nullable required

The largest cap that can be set: the current plan price. Null when overage is unavailable.

spend_cap_min_minorinteger required

The smallest cap that can be set (100 = $1).

currencystring required

ISO 4217 code, lower case, of the cap and the rates.

updated_atstring date-time nullable required

RFC 3339 UTC timestamp with Z.

versioninteger required

Send it as If-Match on PUT to detect a concurrent change (409 conflict, reason version_mismatch).

Changes

No recorded changes to this operation across all 1 revision of this API.