Skip to main content
PUT
Create or update a workspace budget

Authorizations

Authorization
string
header
required

API key as bearer token in Authorization header

Path Parameters

id
string
required

The workspace ID (UUID) or slug

Minimum string length: 1
Example:

"production"

interval
enum<string>
required

Budget reset interval. Use "lifetime" for a one-time budget that never resets.

Available options:
daily,
weekly,
monthly,
lifetime
Example:

"monthly"

Body

application/json
limit_usd
number<double>
required

Spending limit in USD. Must be greater than 0.

Example:

100

include_byok_in_budgets
boolean

Whether to include BYOK (bring-your-own-key) spend when enforcing the workspace's budgets. This is a workspace-wide setting: it applies to every budget interval (daily, weekly, monthly, and lifetime), not just the interval being upserted in this request. Omit to leave the current setting unchanged.

Example:

true

Response

Budget created or updated successfully

data
object
required

The created or updated budget

Example:
include_byok_in_budgets
boolean

Whether BYOK (bring-your-own-key) spend is included when enforcing the workspace's budgets. This is a workspace-wide setting that applies to all budget intervals (daily, weekly, monthly, and lifetime).

Example:

true