Budgets and reserves

budgets.save

Create or edit a monthly, quarterly or yearly spending budget, for all expenses or one category. Actuals use ledger entries and splits, with refunds deducted and transfers excluded. Requires current expectedRevision or zero for a new budget and an idempotencyKey. Does not change bookkeeping entries.

POST/api/v1/accounting/budgets.save

Permissions

accounting:readaccounting:write

Who can call it

admin, finance

Retries

Idempotency key required, with expectedRevision

MCP

accounting_budgets_save

Fields

  • idstring (ID)

    The record's ID.

  • expectedRevisionintegerRequired

    The record's current revision, from the last time you read it. If someone changed the record since, the request is refused with a conflict so you can reload and check before trying again.

    0 to 9007199254740991

  • idempotencyKeystringRequired

    Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match.

    8–200 characters

  • namestringRequired

    A display name.

    1–160 characters

  • categoryIdstring (ID) or nullRequired

    The ID of a category, from categories.list.

  • currencystringRequired

    Three-letter currency code, such as CAD or USD.

  • amountMinorstringRequired

    An amount in cents (the currency's smallest unit), written as a whole-number string such as "1250" for $12.50.

    Matches ^\d{1,15}$

  • periodenumRequired

    The period to cover.

    monthlyquarterlyyearly
  • startsOnstring (date)Required

    A date, as YYYY-MM-DD.

  • endsOnstring (date) or nullRequired
  • activebooleanRequired

    Whether the record is turned on.

Example

curl https://app.getoatmilk.com/api/v1/accounting/budgets.save \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "expectedRevision": 3,
  "name": "Synthetic Ventures Inc.",
  "categoryId": "7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10",
  "currency": "CAD",
  "amountMinor": "1250",
  "period": "monthly",
  "startsOn": "2026-09-01",
  "endsOn": "2026-09-01",
  "active": true,
  "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
}'
Response
{
  "data": { … }
}

Try it

Try it

Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.

POST/api/v1/accounting/budgets.save
curl https://app.getoatmilk.com/api/v1/accounting/budgets.save \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "expectedRevision": 3,
  "name": "Synthetic Ventures Inc.",
  "categoryId": "7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10",
  "currency": "CAD",
  "amountMinor": "1250",
  "period": "monthly",
  "startsOn": "2026-09-01",
  "endsOn": "2026-09-01",
  "active": true,
  "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
}'

More in Budgets and reserves.