SpendRock Docs
Months

Plan some of what the same month a year before had in this month (FUT-18)

Each of `add` puts the Category back in this month (its history kept, as adding it back by name does) in the group it was in a year before, at `planned`. The response is what's left. One that isn't listed is `not_found`, and nothing is added. To plan a month that has no budget yet, pass `last_year` when creating it instead. Required scope: `budget:write` (personal access tokens; sessions have every scope).

POST
/households/{householdId}/months/{month}/last-year

Each of add puts the Category back in this month (its history kept, as adding it back by name does) in the group it was in a year before, at planned. The response is what's left. One that isn't listed is not_found, and nothing is added.

To plan a month that has no budget yet, pass last_year when creating it instead.

Required scope: budget:write (personal access tokens; sessions have every scope).

Authorization

bearerAuth
AuthorizationBearer <token>

Authorization: Bearer <token>: a mobile session token, or a personal access token (srp_…) created in Account → API tokens (DEV-1).

Personal access tokens:

  • Act as their user, in any household the user belongs to (each call names it in its path).
  • Carry scopes (DEV-2), and each operation's description names the one it needs: budget:read / budget:write (months, groups, items, funds, favorites, harvest, cover), transactions:read / transactions:write (transactions, merchant suggestions), households:read / households:manage (households, members, invites), account:read / account:write (me, settings). A write scope includes its read scope. A call outside the token's scopes gets 403 insufficient_scope, with the needed scope in details.required_scope.
  • Can't manage tokens or passwords (403 session_required).
  • May expire (401 unauthenticated afterwards).
  • Are rate-limited (DEV-3): 120 requests/minute per token with bursts up to 120. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset (seconds until the bucket is full again); over the limit the answer is 429 rate_limited with Retry-After (seconds). Limits are kept per server instance, so they're approximate.

Subscriptions (BILL-4): once a household's free trial is over and its owner has no subscription, every budget, transaction, and merchant-suggestion call answers 402 payment_required. Account, settings, and household calls keep working; subscribing (on the web, Account → Billing) restores access to everything.

Sessions (web cookie or mobile bearer) have every scope and aren't limited this way. Cross-origin browser calls (CORS, for the API docs playground) must use a bearer token; cookies are never accepted cross-origin.

In: header

Path Parameters

householdId*string

ULID.

Match^[0-9A-HJKMNP-TV-Z]{26}$
month*string
Match^[0-9]{4}-(0[1-9]|1[0-2])$

Header Parameters

SpendRock-Version?string

The API version (DEV-5), YYYY-MM-DD. Without it: your personal access token's pinned version, or the latest. 400 unknown_version / version_retired.

Match^\d{4}-\d{2}-\d{2}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/households/01J8Z3N4Q5R6S7T8V9W0X1Y2Z3/months/2026-12/last-year" \  -H "Content-Type: application/json" \  -d '{    "add": [      {        "item_id": "01J8Z3N4Q5R6S7T8V9W0X1Y2Z3",        "planned": 1234      }    ]  }'
{  "month": "2026-12",  "from": "2026-12",  "items": [    {      "item": {        "id": "01J8Z3N4Q5R6S7T8V9W0X1Y2Z3",        "name": "string",        "kind": "income",        "icon": "shopping-cart",        "is_fund": true,        "is_debt": true,        "debt_since": "2026-12",        "debt_original": 0,        "debt_minimum": 0,        "debt_rate_bps": 2499,        "debt_rate_kind": "apr",        "one_off": true,        "favorite": true,        "fund_target": 0,        "archived_from": "2026-10"      },      "group_id": "01J8Z3N4Q5R6S7T8V9W0X1Y2Z3",      "group_name": "string",      "planned": 1234,      "used": 1234,      "suggested": 1234,      "note": "string",      "merchants": [        "string"      ]    }  ],  "purchases": [    {      "transaction_id": "01J8Z3N4Q5R6S7T8V9W0X1Y2Z3",      "date": "2019-08-24",      "merchant": "string",      "note": "string",      "amount": 1234,      "item": {        "id": "01J8Z3N4Q5R6S7T8V9W0X1Y2Z3",        "name": "string",        "kind": "income",        "icon": "shopping-cart",        "is_fund": true,        "is_debt": true,        "debt_since": "2026-12",        "debt_original": 0,        "debt_minimum": 0,        "debt_rate_bps": 2499,        "debt_rate_kind": "apr",        "one_off": true,        "favorite": true,        "fund_target": 0,        "archived_from": "2026-10"      },      "group_name": "string"    }  ],  "off": true}

What the same month a year before had that this month doesn't (FUT-18) GET

Some expenses come once a year (a registration, a birthday, holiday gifts), and a new month is copied from the one before, which didn't have them. This lists: - `items`: the expense Categories the same month a year before had that this month doesn't, the largest first. Left out: income, archived ones, Debts, those that had less than the person's least amount (`last_year_min` in Settings, $100.00 unless changed), those also in the months either side of last year's (a regular then, since stopped), and those AI judged to be a Category this month has under another name. - `purchases`: big purchases a year before, in Categories this month has, that AI judged to come round once a year (a birthday dinner, a yearly trip): a heads-up that they may come again. Nothing is planned for them. For a month with no budget yet, "this month" is what creating it would copy, so this can be shown before it's created and its picks passed to `POST /months/{month}`. Both lists are empty when there's no budget a year before, or `off` is true when the person turned these suggestions off (`last_year_off`). Required scope: `budget:read` (personal access tokens; sessions have every scope).

Add a group to this month (GROUP-1), an expense group or an income group (INC-1) POST

With `income`, it's an income group: income groups come before the expense groups, and their Categories are income Categories. Every income Category is in one; a household can have several, one for each job, say. A name already used by a group of the other kind is `name_taken`. Without an `icon`, it shows the one its name suggests (ICON-1), and a name that isn't one of the icons' keywords may be given one an AI model picks (ICON-3). Required scope: `budget:write` (personal access tokens; sessions have every scope).