SpendRock Docs
Auth

Add or change the caller's password (ACCT-2)

Changing an existing password needs `current_password` (401 `bad_credentials`), and logs the account out everywhere but the calling session (other sessions get 401; personal access tokens keep working). Adding the first one is a new way into the account, so it needs a recent login: a session whose login is more than 15 minutes old gets 403 `reauth_required` (log in again, then retry). If the account's email isn't verified yet, a verification link is emailed and the password works once it's verified (`verification_sent`). Needs a signed-in session: personal access tokens get 403 `session_required`.

PUT
/me/password

Changing an existing password needs current_password (401 bad_credentials), and logs the account out everywhere but the calling session (other sessions get 401; personal access tokens keep working). Adding the first one is a new way into the account, so it needs a recent login: a session whose login is more than 15 minutes old gets 403 reauth_required (log in again, then retry). If the account's email isn't verified yet, a verification link is emailed and the password works once it's verified (verification_sent).

Needs a signed-in session: personal access tokens get 403 session_required.

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

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

application/json

curl -X PUT "https://example.com/me/password" \  -H "Content-Type: application/json" \  -d '{    "password": "stringstri"  }'
{  "verification_sent": true}