Skip to content

Set or clear the organization's monthly spend budget

  • Method: PUT
  • Path: /v1/orgs/{org}/billing
  • Operation ID: setBillingBudget
  • Tag: Billing

Send Authorization: Bearer <credential>. The credential is either an API key (vsk_…) created for an organization, or an OIDC access token obtained by signing in to VirtScale.

Name Type Required Description
org string (uuid) Yes The organization’s id.

Content type application/json, schema BillingUpdateRequest, required.

Field Type Required Enum Description
spend_budget_cents integer, nullable Yes Monthly spend budget in cents. Required key. null clears it – no budget cap. Any other value must be a positive integer no greater than 9223372036854775807 (the storage limit); 0 is not a budget nothing can be spent against, the same distinction every other ‘no cap’ column on this schema draws. Sent as a JSON number: a string or a boolean is refused rather than coerced.
Field Type Required Enum Description
billing_exempt boolean Yes
current_period_end string (date-time), nullable No
month_to_date MonthToDateOut Yes
month_to_date.egress_gb string Yes
month_to_date.estimated_cents integer Yes
month_to_date.storage_gb_month string Yes
plan BillingPlanOut, nullable No
plan.display_name string Yes
plan.slug string Yes
prices array of BillingPriceOut Yes
prices.meter string Yes
prices.unit string Yes
prices.unit_amount_micro_eur integer Yes
spend_budget_cents integer, nullable No
state string Yes

Every error response is application/problem+json (schema Problem).

Status Meaning
400 The request is malformed or failed validation.
401 The credential is missing or invalid.
403 The credential does not have permission to perform this operation.
404 The resource does not exist.
default Any other status is possible; the code field identifies the error.
curl -X PUT "https://api.virtscale.nl/v1/orgs/$ORG_ID/billing" \
  -H "Authorization: Bearer $VIRTSCALE_API_KEY" \
  -H "Content-Type: application/json" \
  --data @body.json