EndpointsCreate a billing account

Billing accounts

Create a billing account

Starts PENDING with a card payment method and binds the caller as roles/billing.admin on the new account.

POST/billing_accounts
Authorizationstringheaderrequired

Bearer token for the authenticated caller.

idempotency-keystringrequired

Required caller-supplied idempotency key. Any non-empty key up to 64 characters is accepted. Endpoint-specific documentation describes how the key is used.

Required string length: 1 - 64

Example: "create-prod-2026-05-07"

Body

application/json
organizationstringrequired

Required string length: 3 - 54

display_namestringrequired

Required string length: 1 - 100

Response

application/json

BillingAccount

idstringrequired

Required string length: 3 - 54

namestringrequired

Pattern: ^billingAccounts\/bac_[A-Za-z0-9]+$

Example: "billingAccounts/bac_4kQ9mXr2Tz7Lw1"

organization_idstringrequired

Required string length: 3 - 54

display_namestringrequired

Required string length: 1 - 100

stateenum<string>required

Available options: PENDING, ACTIVE, CLOSED

payment_methodobjectrequired
payment_method.typeenum<string>required

Available options: card

payment_method.cardobject | nullrequired
child attributes

Maximum string length: 32

Example: "visa"

Pattern: ^[0-9]{4}$

Required range: 1 <= x <= 12

Required range: 2000 <= x <= 2199

Unix timestamp (seconds)

Required range: 0 <= x <= 9007199254740991

currency_codeenum<string>required

Available options: EUR

conditionsobject[]required

Problems and notable facts that hold now, beside state; empty when there are none. See each reason in the resource description.

Maximum array length: 32 elements

child attributes
conditions.reasonstringrequired

Kebab-case reason; the resource documents the reasons it reports.

Maximum string length: 64

Pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$

Example: "agent-offline"

conditions.severityenum<string>required

error: the resource failed; the condition says why. warning: it is limited or held until the person acts or it recovers. info: worth knowing, nothing to do.

Available options: error, warning, info

conditions.messagestringrequired

Safe to show the person as is.

Maximum string length: 512

conditions.remedyobject | nullrequired

What the person can do; null when nothing they do helps.

conditions.remedy.kindenum<string>required

Available options: free-capacity

conditions.remedy.metricenum<string>required

Available options: kaas/clusters, compute/machines, compute/cpu, compute/memory, compute/machines_concurrency, compute/managed_vm_trial, agents/turns_concurrency, agents/sandboxes, agents/sandboxes_running, agents/retained_filesystem_lifetime, codemode/executions, api/secrets_access, api/secrets_write, domain_routing/preview_hostnames, domain_routing/custom_domains, source_control/repositories

Maximum string length: 256

Unix timestamp (seconds) when this condition last changed.

Required range: x >= 0

created_atintegerrequired

Unix timestamp (seconds)

Required range: 0 <= x <= 9007199254740991

updated_atintegerrequired

Unix timestamp (seconds)

Required range: 0 <= x <= 9007199254740991

closed_atinteger | nullrequired

Unix timestamp (seconds)

Required range: 0 <= x <= 9007199254740991

etagstringrequired

Maximum string length: 64