All endpoints require authentication via dough-session cookie (except /api/auth/login and /api/auth/logout).
POST /api/auth/login— login with email + password, sets session cookieGET /api/auth/logout— clears session cookie, redirects to /loginGET /api/auth/me— returns current user profilePOST /api/auth/update— update user locale, YNAB settings
GET /api/household— get shared household settings (YNAB connection, saving rate, prompts, household profile)POST /api/household— update household settings (key-value pairs)
GET /api/profile— get user profile and linked account IDsPUT /api/profile— update display name or linked accounts
POST /api/ynab/sync— sync YNAB data (accounts, transactions, month budget), auto-takes net worth snapshot and runs payee matchingGET /api/ynab/accounts— list checking/savings accountsGET /api/ynab/budgets— list available budgetsGET /api/ynab/categories— list budget categoriesPOST /api/ynab/transaction— create a new transaction in YNAB (with AI auto-categorization)
GET /api/income— list all income sources with averagesPOST /api/income— create income sourcePUT /api/income— update income source or toggle activeDELETE /api/income— delete income source
GET /api/bills— list bills with paid status, patterns, averages, overdue detectionPOST /api/bills— create billPUT /api/bills— update bill, toggle active, or mark paid/unpaidDELETE /api/bills— delete bill
GET /api/debts— list debts from YNAB with overrides and AI suggestionsPUT /api/debts— save interest rate and payment overridesGET /api/debts/suggestion— AI debt payoff suggestion
GET /api/investments— list investment accounts from YNAB cache with overrides and monthly transfer amountsPUT /api/investments— save monthly contribution and expected return overrides
GET /api/subscriptions— list all subscriptions with paid/overdue statusPOST /api/subscriptions— create a subscriptionPUT /api/subscriptions— update subscription or toggle activeDELETE /api/subscriptions— delete a subscription
GET /api/savings-goals— list all savings goalsPOST /api/savings-goals— create a savings goalPUT /api/savings-goals— update goal, toggle include/exclude, toggle activeDELETE /api/savings-goals— delete a goal
GET /api/monthly-history— last 4 monthly snapshots (income, expenses, categories)
GET /api/net-worth— list snapshotsPOST /api/net-worth— take a new snapshot
GET /api/chat/messages— list all shared chat messagesPOST /api/chat/messages— save a messageDELETE /api/chat/messages— clear all messagesPOST /api/chat— send message to AI advisor, returns AI responseGET /api/chat/typing— get typing usersPOST /api/chat/typing— broadcast typing statusGET /api/chat/unread— get unread count for current userPOST /api/chat/unread— mark all as read
GET /api/account-notes— get notes for all YNAB accountsPUT /api/account-notes— save or remove a note for an account
POST /api/receipt— parse receipt/statement image via Claude vision, returns array of transactions with amount, payee, date, accountPOST /api/receipt/resolve-account— resolve YNAB account from memo text (name-based routing)
GET /api/matches— list patterns and monthly matchesPOST /api/matches— add a payee patternDELETE /api/matches— remove a pattern
GET /api/summary?locale=fi&refresh=1— get or generate AI financial summary
GET /api/events— Server-Sent Events stream
Event types: chat:message, chat:typing, sync:complete, data:updated
GET /api/transactions/unread— check if new transactions since last visitPOST /api/transactions/unread— mark as seen