Errors
The error format, HTTP statuses, and every error code.
Format
Every error response has a JSON body with a stable, machine-readable code and a human-readable
message. Some add details.
{
"code": "item_not_in_month",
"message": "That Category isn't available. Choose another.",
"details": { "item_id": "01J…", "month": "2026-12" },
"fields": [{ "field": "splits[0].item_id", "message": "That Category isn't available. Choose another." }]
}- Branch on
code, never onmessage. Codes are stable within/v1; messages may change. messageis safe to show to a user.detailsis an object whose contents depend on the code (for exampledetails.required_scopeforinsufficient_scope). Ignore keys you don't know.fields, when present, names the request fields at fault, so a form can mark them (like Rails' errors on a model). Field names are the request's, with[n]for an array index:amount,date,splits[0].item_id,version.- New codes may be added in
/v1. Treat an unknown code by its HTTP status.
Statuses
| Status | Meaning |
|---|---|
400 | The request didn't parse: malformed JSON, a wrong type, or a bad parameter (invalid). |
401 | No valid credentials: missing, revoked, or expired token. |
403 | Authenticated, but not allowed: missing scope, not a member, not the owner, and so on. |
404 | No such thing (or no budget for that month yet). |
409 | Conflicts with what exists: a name that's taken, a month that exists, a reused transaction ID. |
410 | A link that was valid but isn't any more (an expired or used invite or email link). |
422 | Well-formed, but breaks a budgeting rule (the splits don't add up, the item isn't in that month, …). |
429 | Too many requests. See Rate limits. |
500 | Something went wrong on our side (internal). It's reported to us automatically; retry later. |
502, 503, 504 | SpendRock can't be reached right now. These come from our edge, not the API, so the body is an HTML page, not an error object; retry with backoff, and see status.spendrock.com for what's known. |
Codes
Authentication and access
| Code | Status | Meaning |
|---|---|---|
unauthenticated | 401 | No credentials, or the token or session is revoked or expired. |
insufficient_scope | 403 | The token lacks the scope this operation needs; details.required_scope names it. See scopes. |
session_required | 403 | Only a signed-in session can do this (managing tokens, changing your password). |
reauth_required | 403 | Adding a way to log in (a password) needs a recent login. Log in again, then retry. |
not_invited | 403 | Logging in: the account isn't on the invite list and has no pending invite. |
not_a_member | 403 | You aren't a current member of that household. See Households. |
not_owner | 403 | Only the household's owner can do this. |
rate_limited | 429 | Too many requests; wait Retry-After seconds. |
unknown_version | 400 | SpendRock-Version (or api_version) isn't a version. See Versioning. |
version_retired | 400 | That version is past its support window; details.oldest_supported names the oldest still served. |
Budgets, groups, and items
| Code | Status | Meaning |
|---|---|---|
not_found | 404 | No such group, item, transaction, household, or invite (or it isn't in this household). |
month_not_created | 404 / 422 | The month has no budget yet: 404 when reading it, 422 when writing to it. Create it with POST /households/{householdId}/months/{month}. |
month_exists | 409 | The month already has a budget. |
no_previous_month | 409 | Resetting with "replace" needs an earlier budget to copy, and there isn't one. |
name_taken | 409 | A group or item with that name already exists (names are unique within a budget). |
recurring_uses | 409 | A recurring transaction still repeats in the item, so it can't be archived or deleted from that month (or with its group). details.recurring lists each (rule_id, merchant, type, item_id, item_name, split). Send move_recurring_to or stop_recurring with the archive or delete to resolve them all at once; GET /households/{householdId}/months/{month}/recurring-holds lists them ahead of time. |
income_group_protected | 422 | The Income group can't be deleted. |
kind_mismatch | 422 | The item's kind doesn't allow this: income items can't be funds, favorites, harvested, or covered, can't leave Income; funds can't be harvested or covered; an expense can't be split to an income item; an item a recurring transaction repeats in can't be made One-Off. |
already_fund | 422 | The item is already a fund. |
not_fund | 422 | The operation only applies to funds. |
already_archived | 422 | The item is already archived. See Archived categories. |
not_archived | 422 | Unarchiving an item that isn't archived. |
month_in_past | 422 | Archiving or unarchiving from a month that has passed. Use the current month or a later one. |
nothing_to_harvest | 422 | The item has nothing left over to move back to Left to Budget (after what this month's upcoming recurring transactions will need). |
nothing_to_cover | 422 | The item isn't overspent, and this month's upcoming recurring transactions won't take it past Planned, so there's nothing to cover. |
not_enough_left_to_budget | 422 | The item is overspent by more than there is in Left to Budget. |
invalid | 400 / 422 | Generic validation failure; message says what's wrong. |
Transactions
| Code | Status | Meaning |
|---|---|---|
id_conflict | 409 | That transaction ID was already used with a different body. See Idempotency. |
version_conflict | 409 | The transaction changed since the version you sent; nothing changed. details.current_version has its version now. See Idempotency. |
amount_not_positive | 422 | Amounts must be greater than zero (the type gives the direction). |
split_not_positive | 422 | Every split's amount must be greater than zero. |
splits_do_not_sum | 422 | The splits must add up to the transaction's amount. |
duplicate_split_item | 422 | Two splits point at the same item. |
item_not_in_month | 422 | A split's item doesn't exist in the transaction's budget month. |
Households and invites
| Code | Status | Meaning |
|---|---|---|
already_member | 409 | That person is already in the household. |
invite_email_mismatch | 403 | The invite was sent to a different email than the one you're logged in with. |
invite_unavailable | 410 | The invite expired, or was revoked, declined, or already accepted. |
last_household | 422 | You can't leave, delete, or archive your only (non-archived) household. |
personal_household | 422 | Your personal household can't be deleted, and its owner can't leave it. |
owner_must_transfer | 422 | Transfer ownership before leaving a household others still belong to. |
default_household | 422 | Your default household can't be archived; pick another default first. |
household_archived | 422 | An archived household can't be your default. |
choose_default | 422 | Leaving your default household: say which household becomes the new default. |
household_full | 422 | A household can have up to 10 members, counting pending invites. Revoke an invite or remove a member first. |
Limits
SpendRock caps how many of each thing a household or a person can have. The limits are well past what a budget needs, and exist to stop a runaway script from filling an account. At one, creating another answers:
| Code | Status | Meaning |
|---|---|---|
limit_reached | 422 | At a limit. details.resource says which, details.limit how many, and message what to do. |
details.resource | Limit |
|---|---|
households | 50 households you belong to, archived ones included |
access_tokens | 50 personal access tokens |
logins | 10 connected Google or Apple accounts |
passkeys | 20 passkeys |
groups | 100 groups in a household |
categories | 2,000 items in a household, archived ones included |
months | 1,200 months with a budget |
recurring_transactions | 2,000 recurring transactions, ended ones included |
invites | 500 invites sent by a household, any status |
untracked_transactions | 5,000 untracked transactions (deleted ones don't count) |
month_transactions | 5,000 transactions tracked to one budget month (deleted ones don't count) |
stored_transactions | 20,000 transactions in one budget month, or 100,000 untracked, deleted ones included |
splits | 50 splits on one transaction |
balance_updates | 200 balance updates to one fund or debt in one month |
A household also has at most 10 members (household_full, above).
Email + password accounts
These apply only where email + password login is turned on.
| Code | Status | Meaning |
|---|---|---|
bad_credentials | 401 | Email or password is incorrect. |
email_unverified | 403 | Verify the email address first. |
invalid_link | 410 | The email link expired or was already used. |
Server
| Code | Status | Meaning |
|---|---|---|
internal | 500 | Unexpected error. Retry later; if it keeps happening, let us know. |
For what's going on when requests fail across the board, see status.spendrock.com, which runs apart from SpendRock. Its status.json is the same thing for programs, and feed.atom for feed readers.