Skip to main content
PATCH
/
v1
/
contracts
/
{contractId}
/
budgets
/
{index}
Update Credit Budget
curl --request PATCH \
  --url https://api.monk.com/v1/contracts/{contractId}/budgets/{index} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "<string>",
  "meterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "maxCredits": 123,
  "maxCreditsCents": 123
}
'
{
  "data": {
    "index": 123,
    "label": "<string>",
    "eventPropertyKey": "<string>",
    "eventPropertyValue": "<string>",
    "meterId": "<string>",
    "maxCredits": 123,
    "maxCreditsCents": 123,
    "isExhausted": true
  }
}
Updates a budget by its array index. Only provided fields are changed. When maxCredits or maxCreditsCents changes, the alert state resets so the budget can refire the credit.budget.exhausted webhook at the new cap. Scope: contracts:write

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

contractId
string
required

The unique identifier of the contract (UUID)

index
integer
required

Budget array index (from GET /budgets response)

Required range: x >= 0

Body

application/json
label
string
meterId
string<uuid> | null
maxCredits
number | null
maxCreditsCents
integer | null

Response

Budget updated

data
object