Update budget

updateBudget(budgetId: ID!, input: UpdateBudgetInput!): Budget!

Arguments

ArgumentTypeRequiredDescription
budgetIdID!YesBudget ID. A budget you cannot manage is masked as missing and fails with resource-not-found (404).
inputUpdateBudgetInput!Yes

Input fields

input

UpdateBudgetInput

FieldTypeRequiredDescription
monthlyLimitCreditsFloat!YesNew monthly AI spending limit in credits. Usage already recorded this month is retained; if the new limit is below it, the next call in the scope is rejected.

Response

Returns Budget!. Open the type for its fields and nested types.

FieldType
idID!
scopeBudgetScope!
monthlyLimitCreditsFloat!
monthlyLimitUsdFloat!
statusBudgetStatus!
createdAtString!
updatedAtString!

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation UpdateBudget($budgetId: ID!, $input: UpdateBudgetInput!) {
  updateBudget(budgetId: $budgetId, input: $input) {
    id
    createdAt
    updatedAt
    monthlyLimitCredits
    monthlyLimitUsd
  }
}
json
{
  "budgetId": "00000000-0000-4000-8000-000000000001",
  "input": {
    "monthlyLimitCredits": 100
  }
}