{"openapi":"3.0.3","info":{"title":"Finta API v2","version":"2.0.0","description":"DB-backed Finta API for users with storage mode enabled. Requires an API key or an OAuth access token, and an active subscription or free trial.\n\n## Rate limits\n\nRate limits are enforced per user based on subscription plan, separately from MCP. The free trial gets Standard limits, or Pro limits if you're trialing Pro:\n\n| Plan | Per minute | Per day |\n| --- | --- | --- |\n| Standard | 20 requests | 500 requests |\n| Pro | 60 requests | 2,000 requests |\n\nWhen a limit is exceeded, the API returns HTTP 429 with `error.code` `RATE_LIMITED` and a human-readable `message`. A `Retry-After` response header is included with the number of seconds until the window resets."},"servers":[{"url":"https://api.finta.io/v2","description":"Production server"}],"paths":{"/health":{"get":{"summary":"Health Check","description":"Returns API health status. Public endpoint; does not require authentication.","operationId":"getHealthV2","tags":["Health"],"security":[],"responses":{"200":{"description":"API is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"503":{"description":"Critical dependency unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/bank-connections":{"get":{"summary":"List bank connections","description":"Returns bank connections from durable Finta data only. Does not call live providers.","operationId":"listBankConnectionsV2","tags":["Bank Connections"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","all","disabled"],"default":"active"},"description":"Filter by connection lifecycle. `active` (default) returns non-disabled connections."}],"responses":{"200":{"description":"Bank connections for the authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankConnectionsListResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/me":{"get":{"summary":"Current API user","description":"Returns the authenticated user. Useful for verifying API keys, storage mode, and integration setup.","operationId":"getMeV2","tags":["Me"],"responses":{"200":{"description":"Authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/feedback":{"post":{"summary":"Send feedback","description":"Send Finta feedback: a bug, unclear docs, an error that did not say how to fix it, or a feature you needed. Set `operation` to the route it is about, or leave it out for general product feedback. Works with any API key or OAuth token, without Storage Mode or an active subscription. Limited to 20 reports an hour per user, separate from the API rate limits: feedback calls do not count toward them and are not blocked by them. Every error `message` ends with a pointer here and its `requestId`; send that `requestId` with the report.","operationId":"createFeedbackV2","tags":["Feedback"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackCreateBody"}}}},"responses":{"201":{"description":"Feedback received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackReceipt"}}}},"400":{"description":"Invalid request body. `message` lists each invalid field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/feedback/{id}":{"get":{"summary":"Get feedback status","description":"Returns the status of a report you sent with `POST /feedback`.","operationId":"getFeedbackV2","tags":["Feedback"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The id `POST /feedback` returned"}],"responses":{"200":{"description":"Feedback status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackStatusResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"`NOT_FOUND`. No report with this id belongs to the caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/accounts":{"get":{"summary":"List accounts","description":"Returns bank accounts from durable Finta data only. Does not call live providers.","operationId":"listAccountsV2","tags":["Accounts"],"parameters":[{"name":"bankConnectionId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by bank connection ID"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","closed","disconnected","all"],"default":"active"},"description":"Filter by account lifecycle. `active` (default) returns open accounts on non-disabled connections."},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by account type"}],"responses":{"200":{"description":"Accounts for the authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountsListResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}},"post":{"summary":"Create a manual account","description":"Create a manual (non-synced) account the user tracks by hand, including liability accounts (credit, student, mortgage). Only manual accounts can be created.","operationId":"createAccountV2","tags":["Accounts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualAccountCreateRequest"}}}},"responses":{"201":{"description":"Created account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/accounts/balance-history":{"get":{"summary":"List balance history","description":"Returns stored daily balance snapshots across accounts. Supports cursor pagination.","operationId":"listBalanceHistoryV2","tags":["Accounts"],"parameters":[{"name":"bankConnectionId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by bank connection ID"},{"name":"bankAccountId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by bank account ID"},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Inclusive start date (YYYY-MM-DD)"},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Inclusive end date (YYYY-MM-DD)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque pagination cursor from a previous response"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":250,"default":50},"description":"Page size (default 50, max 250)"}],"responses":{"200":{"description":"Balance history entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceHistoryListResponse"}}}},"400":{"description":"Invalid query parameters or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/accounts/{accountId}":{"get":{"summary":"Get account","description":"Returns a single bank account by Finta account ID.","operationId":"getAccountV2","tags":["Accounts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Finta bank account ID"}],"responses":{"200":{"description":"Account details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}},"patch":{"summary":"Update an account","description":"Update an account. Requires Storage Mode. A manual account's name, type, currency, mask, balance, or liability data can change; updating the balance records a balance-history snapshot for today. A bank-synced account can only be renamed: send `name` alone, or `name: null` to go back to the bank's name (`institutionAccountName`). Syncs never overwrite the new name. Sending any other field for a synced account returns 400 and saves nothing.","operationId":"updateAccountV2","tags":["Accounts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Finta bank account ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualAccountUpdateRequest"}}}},"responses":{"200":{"description":"Updated account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"400":{"description":"Invalid request body, a field other than `name` for a bank-synced account, or `name: null` before Finta has read the bank's name. Nothing is saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}},"delete":{"summary":"Delete a manual account","description":"Soft-close a manual account. Only manual accounts can be deleted; the account moves to `closed` status and keeps its transactions and balance history.","operationId":"deleteAccountV2","tags":["Accounts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Finta bank account ID"}],"responses":{"204":{"description":"Account closed"},"400":{"description":"Non-manual account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/accounts/{accountId}/balance-history":{"get":{"summary":"List account balance history","description":"Returns stored daily balance snapshots for a single account. Supports cursor pagination.","operationId":"listAccountBalanceHistoryV2","tags":["Accounts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Finta bank account ID"},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Inclusive start date (YYYY-MM-DD)"},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Inclusive end date (YYYY-MM-DD)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque pagination cursor from a previous response"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":250,"default":50},"description":"Page size (default 50, max 250)"}],"responses":{"200":{"description":"Balance history entries for the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceHistoryListResponse"}}}},"400":{"description":"Invalid query parameters or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/securities":{"get":{"summary":"List securities","description":"Returns securities referenced by the authenticated user holdings or investment transactions. Does not call live providers.","operationId":"listSecuritiesV2","tags":["Investments"],"parameters":[{"name":"bankConnectionId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by bank connection ID"},{"name":"bankAccountId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by bank account ID"},{"name":"securityId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by Finta security ID"}],"responses":{"200":{"description":"Securities for the authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecuritiesListResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/holdings":{"get":{"summary":"List holdings","description":"Returns stored investment holdings from durable Finta data only. Does not call live providers.","operationId":"listHoldingsV2","tags":["Investments"],"parameters":[{"name":"bankConnectionId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by bank connection ID"},{"name":"bankAccountId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by bank account ID"},{"name":"securityId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by Finta security ID"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","sold","all"],"default":"active"},"description":"Filter by holding lifecycle. `active` (default) excludes sold positions."}],"responses":{"200":{"description":"Holdings for the authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoldingsListResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/investment-transactions":{"get":{"summary":"List investment transactions","description":"Returns stored investment transactions from durable Finta data only. Supports cursor pagination.","operationId":"listInvestmentTransactionsV2","tags":["Investments"],"parameters":[{"name":"bankConnectionId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by bank connection ID"},{"name":"bankAccountId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by bank account ID"},{"name":"securityId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by Finta security ID"},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Inclusive start date (YYYY-MM-DD)"},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Inclusive end date (YYYY-MM-DD)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque pagination cursor from a previous response"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":250,"default":50},"description":"Page size (default 50, max 250)"}],"responses":{"200":{"description":"Investment transactions for the authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentTransactionsListResponse"}}}},"400":{"description":"Invalid query parameters or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/transactions":{"get":{"summary":"List transactions","description":"Returns stored transactions from durable Finta data only. Supports cursor pagination. Deleted transactions are excluded by default.","operationId":"listTransactionsV2","tags":["Transactions"],"parameters":[{"name":"bankConnectionId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by bank connection ID"},{"name":"bankAccountId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by bank account ID"},{"name":"categoryId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter by category ID"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","posted","deleted","all"],"default":"posted"},"description":"Transaction status filter (default: posted)"},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Inclusive start date on posted_date (YYYY-MM-DD)"},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Inclusive end date on posted_date (YYYY-MM-DD)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque pagination cursor from a previous response"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":250,"default":50},"description":"Page size (default 50, max 250)"},{"name":"includeHidden","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Include transactions hidden by a rule. Defaults to false."}],"responses":{"200":{"description":"Transactions for the authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionsListResponse"}}}},"400":{"description":"Invalid query parameters or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/transactions/{id}":{"patch":{"summary":"Update a transaction","description":"Update fields on a single transaction. Currently supports setting or clearing categoryId.","operationId":"updateTransactionV2","tags":["Transactions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Transaction UUID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionUpdateRequest"}}}},"responses":{"200":{"description":"Updated transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionSummary"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Transaction or category not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/transactions/batch":{"post":{"summary":"Batch update transactions","description":"Update multiple transactions at once (max 250). Currently supports setting or clearing categoryId per transaction.","operationId":"batchUpdateTransactionsV2","tags":["Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionBatchUpdateRequest"}}}},"responses":{"200":{"description":"Number of transactions updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchUpdateResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"One or more category IDs not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/categories":{"get":{"summary":"List categories","description":"Returns stored transaction categories from durable Finta data only.","operationId":"listCategoriesV2","tags":["Categories"],"parameters":[{"name":"provider","in":"query","required":false,"schema":{"type":"string","enum":["plaid","go_cardless","stripe","mercury"]},"description":"Filter by data provider"},{"name":"bankConnectionId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Filter to categories used by transactions on this bank connection"}],"responses":{"200":{"description":"Categories for the authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesListResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}},"post":{"summary":"Create a category","description":"Create a new manual category.","operationId":"createCategoryV2","tags":["Categories"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCreateRequest"}}}},"responses":{"201":{"description":"Created category","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategorySummary"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/categories/batch":{"post":{"summary":"Batch update categories","description":"Update multiple categories at once (max 250). Name, group, description and type are editable on any category except Mercury's, which is read-only. Unknown or read-only IDs are skipped.","operationId":"batchUpdateCategoriesV2","tags":["Categories"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryBatchUpdateRequest"}}}},"responses":{"200":{"description":"Number of categories updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchUpdateResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/categories/{id}":{"patch":{"summary":"Update a category","description":"Update a category's name, group, description or type. All four are editable on any category except Mercury's, which is read-only. Edits to a Plaid category persist across future syncs.","operationId":"updateCategoryV2","tags":["Categories"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Category UUID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryUpdateRequest"}}}},"responses":{"200":{"description":"Updated category","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategorySummary"}}}},"400":{"description":"Invalid request body, or a read-only (Mercury) category","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Category not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}},"delete":{"summary":"Delete a category","description":"Delete a category. A category you made is deleted, and its transactions become uncategorized. A bank category (Plaid, Stripe and others) or a Finta default category is archived instead: it disappears from category lists, its transactions move to replacementCategoryId (or become uncategorized when that is omitted), and future syncs send its transactions there instead of creating the category again. Mercury categories cannot be deleted.","operationId":"deleteCategoryV2","tags":["Categories"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Category UUID"},{"name":"replacementCategoryId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Optional category UUID to move the archived category's transactions to, now and on future syncs. Must be another active category of yours. Only allowed when the category is archived (a bank or Finta default category)."}],"responses":{"204":{"description":"Category deleted or archived"},"400":{"description":"Mercury category, or an invalid replacement category","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Category not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/category-groups":{"get":{"summary":"List category groups","description":"Returns the authenticated user's category groups in display order (sortOrder first, then name). Cursor-paginated.","operationId":"listCategoryGroupsV2","tags":["Category Groups"],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque pagination cursor from a previous response"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":250,"default":50},"description":"Page size (1–250, default 50)"}],"responses":{"200":{"description":"Category groups for the authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryGroupsListResponse"}}}},"400":{"description":"Invalid query parameters or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}},"post":{"summary":"Create a category group","description":"Create a category group. Names are normalized (trimmed, internal whitespace collapsed) and must be unique per user, compared case-insensitively.","operationId":"createCategoryGroupV2","tags":["Category Groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryGroupCreateRequest"}}}},"responses":{"201":{"description":"Created category group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryGroup"}}}},"400":{"description":"Invalid request body, or a group with this name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/category-groups/{id}":{"patch":{"summary":"Update a category group","description":"Rename a category group or change its sort order. Renaming also updates the `group` name on every category in the group.","operationId":"updateCategoryGroupV2","tags":["Category Groups"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Category group UUID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryGroupUpdateRequest"}}}},"responses":{"200":{"description":"Updated category group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryGroup"}}}},"400":{"description":"Invalid request body, or a group with this name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Category group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}},"delete":{"summary":"Delete a category group","description":"Delete a category group. Categories in the group are kept and become ungrouped (their `categoryGroupId` and `group` are cleared).","operationId":"deleteCategoryGroupV2","tags":["Category Groups"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Category group UUID"}],"responses":{"204":{"description":"Category group deleted"},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Category group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/rules":{"get":{"summary":"List transaction rules","description":"Returns the authenticated user's transaction rules. Active rules are returned by default.","operationId":"listRulesV2","tags":["Rules"],"parameters":[{"name":"includeArchived","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Include archived rules in the response (default false)"}],"responses":{"200":{"description":"Transaction rules for the authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRulesListResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}},"post":{"summary":"Create a transaction rule","description":"Create a new transaction rule that auto-categorizes or hides stored transactions. If this key or connection is limited to some accounts, the rule only applies to those accounts, and conditions may only reference them.","operationId":"createRuleV2","tags":["Rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRuleCreateBody"}}}},"responses":{"201":{"description":"Created transaction rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRule"}}}},"400":{"description":"Invalid request body, or a condition names an account this key or connection can't access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/rules/run":{"post":{"summary":"Run transaction rules","description":"Run transaction rules over stored transactions. Omit ruleIds to run all active rules. Only transactions in accounts this key or connection can access are scanned.","operationId":"runRulesV2","tags":["Rules"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRuleRunBody"}}}},"responses":{"200":{"description":"Result of running the rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRuleRunResult"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/rules/{ruleId}":{"patch":{"summary":"Update a transaction rule","description":"Update a transaction rule's conditions, outcomes, or priority. At least one field must be provided.","operationId":"updateRuleV2","tags":["Rules"],"parameters":[{"name":"ruleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Transaction rule UUID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRuleUpdateBody"}}}},"responses":{"200":{"description":"Updated transaction rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRule"}}}},"400":{"description":"Invalid request body, or a condition names an account this key or connection can't access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Rule not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}},"delete":{"summary":"Archive a transaction rule","description":"Archive a transaction rule. Archived rules no longer run but remain retrievable with includeArchived.","operationId":"deleteRuleV2","tags":["Rules"],"parameters":[{"name":"ruleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Transaction rule UUID"}],"responses":{"204":{"description":"Rule archived"},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Rule not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/budget-plans":{"get":{"summary":"List budget plans","description":"Returns every budget plan with its account scope, selected account ids and budget count. A key with account restrictions still sees every plan.","operationId":"listBudgetPlansV2","tags":["Budgets"],"responses":{"200":{"description":"Budget plans","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetPlansListResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`NOT_FOUND`. The plan, budget, category or account does not exist. A bad plan lists the user's plan names in `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}},"post":{"summary":"Create a budget plan","description":"Create a named plan. Pass `accountIds` to limit it to those accounts, or omit them to cover every account. A key with account restrictions can only select accounts it may use, and must pass `accountIds`. Names are unique per user. The plan is not the default unless `isDefault` is true or it is the first plan.","operationId":"createBudgetPlanV2","tags":["Budgets"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetPlanCreateRequest"}}}},"responses":{"201":{"description":"Created plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetPlanDetail"}}}},"400":{"description":"`BAD_REQUEST` for an invalid body, or `PLAN_NAME_TAKEN`, `INVALID_PLAN_NAME`, `NO_ACCOUNTS_SELECTED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`NOT_FOUND`. The plan, budget, category or account does not exist. A bad plan lists the user's plan names in `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/budget-plans/{id}":{"patch":{"summary":"Update a budget plan","description":"Rename a plan, change its accounts or method, or make it the default. Changing accounts or method changes every past month's numbers too. To stop a plan being the default, make another plan the default.","operationId":"updateBudgetPlanV2","tags":["Budgets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Plan id or name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetPlanUpdateRequest"}}}},"responses":{"200":{"description":"Updated plan and the fields that changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetPlanUpdateResponse"}}}},"400":{"description":"`BAD_REQUEST` for an invalid body, or `PLAN_NAME_TAKEN`, `INVALID_PLAN_NAME`, `NO_ACCOUNTS_SELECTED`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`NOT_FOUND`. The plan, budget, category or account does not exist. A bad plan lists the user's plan names in `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}},"delete":{"summary":"Delete a budget plan","description":"Delete a plan with all its budgets and per-month amounts. This can't be undone. Deleting the default plan makes the oldest remaining plan the default, returned as `newDefaultPlan`.","operationId":"deleteBudgetPlanV2","tags":["Budgets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Plan id or name"}],"responses":{"200":{"description":"Deleted plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetPlanDeleteResponse"}}}},"400":{"description":"Invalid plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`NOT_FOUND`. The plan, budget, category or account does not exist. A bad plan lists the user's plan names in `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/budgets":{"get":{"summary":"List budgets","description":"Returns the budgets in one plan with each category or group name and its template amount. For what was planned, spent and is left in a month, call `GET /budgets/status`. `plan` is null until the first budget exists.","operationId":"listBudgetsV2","tags":["Budgets"],"parameters":[{"name":"plan","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Plan name or id. Defaults to the default plan."}],"responses":{"200":{"description":"Budgets in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetsListResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`NOT_FOUND`. The plan, budget, category or account does not exist. A bad plan lists the user's plan names in `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}},"post":{"summary":"Set a budget","description":"Create or edit the budget for a category or category group, or assign to a credit card's payment envelope, in the default plan unless `plan` names another. `scope: \"template\"` changes the amount from the current month forward and creates the budget if it has none. `scope: \"period\"` changes one month and needs an existing budget, except for `accountId`, which takes `scope: \"period\"` only and creates the envelope's budget on the first assignment. In an envelope plan, `scope: \"period\"` is the assign action and `amount` is that month's total. The first budget creates the default plan.","operationId":"setBudgetV2","tags":["Budgets"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetSetRequest"}}}},"responses":{"200":{"description":"Edited an existing budget","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetSetResponse"}}}},"201":{"description":"Created the budget","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetSetResponse"}}}},"400":{"description":"`BAD_REQUEST` for an invalid body, or `INVALID_TARGET`, `INVALID_PERIOD`, `PERIOD_BEFORE_START`, `BUDGET_INACTIVE`, `UNSUPPORTED_CADENCE`, `SNAPSHOT_RANGE_TOO_LONG`, `CATEGORY_NOT_EXPENSE`, or for `accountId`, `ACCOUNT_NOT_CREDIT`, `ACCOUNT_NOT_IN_PLAN`, `METHOD_NOT_ENVELOPE`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`NOT_FOUND`. The plan, budget, category or account does not exist. A bad plan lists the user's plan names in `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/budgets/reallocate":{"post":{"summary":"Move money between budgets","description":"Move an amount between two budgets in the same plan for one month. Changes that month's planned amounts and leaves the template amounts alone. Send an `Idempotency-Key` so a retry doesn't move the money twice.","operationId":"reallocateBudgetV2","tags":["Budgets"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetReallocateRequest"}}}},"responses":{"200":{"description":"Both budgets before and after the move","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetReallocateResponse"}}}},"400":{"description":"`BAD_REQUEST` for an invalid body, or `DIFFERENT_PLANS`, `INSUFFICIENT_PLANNED`, `SAME_BUDGET`, `BUDGET_INACTIVE`, `PERIOD_BEFORE_START`, `INVALID_PERIOD`, `AMOUNT_OUT_OF_RANGE`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`NOT_FOUND`. The plan, budget, category or account does not exist. A bad plan lists the user's plan names in `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/budgets/status":{"get":{"summary":"Get budget status","description":"Returns planned, spent, rollover, available and pace for each budget in one plan and month, plus totals and spending no budget covers. Envelope plans also return `readyToAssign`, `readyToAssignBreakdown`, `paymentEnvelopes` and `unrecognizedCardInflows`. Finta computes every number at request time and counts only the plan's accounts. When `includesAccountsOutsideConsent` is true, the totals include accounts this key was not granted, named in `accountsOutsideConsent`, and their transactions stay unavailable to it. `plan` is null if the user has no budgets yet.","operationId":"getBudgetStatusV2","tags":["Budgets"],"parameters":[{"name":"plan","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Plan name or id. Defaults to the default plan."},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"current"},"description":"`current` (in the user's timezone) or a month as YYYY-MM"}],"responses":{"200":{"description":"Budget status for the month","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetStatusResponse"}}}},"400":{"description":"Invalid period or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`NOT_FOUND`. The plan, budget, category or account does not exist. A bad plan lists the user's plan names in `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}},"/budgets/{id}":{"patch":{"summary":"Update a budget","description":"Edit a budget by id. `scope: \"period\"` writes one month's amount and note. `scope: \"template\"` changes any of the amount, rollover, target or `isActive`, and past months keep their old amount. A payment envelope takes `scope: \"period\"` only.","operationId":"updateBudgetV2","tags":["Budgets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Budget UUID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetUpdateRequest"}}}},"responses":{"200":{"description":"Updated budget","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetUpdateResponse"}}}},"400":{"description":"`BAD_REQUEST` for an invalid id or body, or `INVALID_TARGET`, `INVALID_PERIOD`, `PERIOD_BEFORE_START`, `UNSUPPORTED_CADENCE`, `SNAPSHOT_RANGE_TOO_LONG`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`NOT_FOUND`. The plan, budget, category or account does not exist. A bad plan lists the user's plan names in `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}},"delete":{"summary":"Delete a budget","description":"Delete a budget and all its per-month amounts. This can't be undone. The category's spending then reports as unbudgeted.","operationId":"deleteBudgetV2","tags":["Budgets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Budget UUID"},{"name":"plan","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Plan name or id. When set, the budget must be in this plan."}],"responses":{"200":{"description":"Deleted budget","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetDeleteResponse"}}}},"400":{"description":"Invalid budget id or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"403":{"description":"Storage mode required or subscription inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`NOT_FOUND`. The plan, budget, category or account does not exist. A bad plan lists the user's plan names in `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitedResponse"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A Finta API key from API settings, or an OAuth access token issued to an authorized app. Send either as `Authorization: Bearer <token>`."}},"responses":{"RateLimitedResponse":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds until the rate-limit window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"code":"RATE_LIMITED","message":"Per-minute rate limit exceeded (standard plan)"}}}}}},"schemas":{"HealthResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["status","timestamp"],"properties":{"status":{"type":"string","enum":["ok","degraded"]},"timestamp":{"type":"string","format":"date-time"}}}}},"UnauthorizedResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"string","example":"Missing or invalid Authorization header"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"STORAGE_MODE_REQUIRED"},"message":{"type":"string"}}}}},"FeedbackCreateBody":{"type":"object","required":["kind","attempted","actual"],"properties":{"kind":{"type":"string","enum":["bug","docs_unclear","feature_request","confusing_error","other"]},"operation":{"type":"string","minLength":1,"maxLength":200,"description":"The route the feedback is about, such as `POST /v2/transactions`. Leave it out for general product feedback.","example":"POST /v2/transactions"},"attempted":{"type":"string","minLength":1,"maxLength":10000,"description":"What you were trying to do"},"actual":{"type":"string","minLength":1,"maxLength":10000,"description":"What happened instead, including the error text"},"expected":{"type":"string","minLength":1,"maxLength":10000,"description":"What you expected to happen"},"requestId":{"type":"string","minLength":1,"maxLength":200,"description":"The `requestId` from the error response"},"client":{"type":"string","minLength":1,"maxLength":200,"description":"The agent or tool sending the report","example":"Claude Code"}}},"FeedbackReceipt":{"type":"object","required":["id","status","createdAt"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["received"]},"createdAt":{"type":"string","format":"date-time"}}},"FeedbackStatusResponse":{"type":"object","required":["id","kind","status","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["bug","docs_unclear","feature_request","confusing_error","other"]},"operation":{"type":"string","nullable":true},"status":{"type":"string","enum":["received","in_progress","shipped","declined","duplicate"]},"resolutionNote":{"type":"string","nullable":true,"description":"Finta's note on what it did with the report"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"resolvedAt":{"type":"string","format":"date-time","nullable":true}}},"MeResponse":{"type":"object","required":["userId","email","storageMode"],"properties":{"userId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"storageMode":{"type":"boolean","description":"Whether storage mode is enabled for this user"}}},"BankConnectionSummary":{"type":"object","required":["id","provider","institutionName","institutionLogoUrl","status","lastSyncedAt","lastProviderErrorCode","lastProviderErrorMessage","reconnectUrl"],"properties":{"id":{"type":"string","format":"uuid"},"provider":{"type":"string","example":"plaid"},"institutionName":{"type":"string","nullable":true},"institutionLogoUrl":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","error","disabled"]},"lastSyncedAt":{"type":"string","format":"date-time","nullable":true,"description":"Last time this bank connection synced to destinations"},"lastProviderErrorCode":{"type":"string","nullable":true,"example":"ITEM_LOGIN_REQUIRED"},"lastProviderErrorMessage":{"type":"string","nullable":true},"reconnectUrl":{"type":"string","format":"uri","nullable":true}}},"BankConnectionsListResponse":{"type":"object","required":["bankConnections"],"properties":{"bankConnections":{"type":"array","items":{"$ref":"#/components/schemas/BankConnectionSummary"}}}},"AccountSummary":{"type":"object","required":["id","providerAccountId","bankConnectionId","bankConnectionStatus","provider","institutionName","name","mask","type","subtype","currency","currentBalance","availableBalance","balanceAsOf","status","closedAt","liability"],"properties":{"id":{"type":"string","format":"uuid"},"providerAccountId":{"type":"string"},"bankConnectionId":{"type":"string","format":"uuid"},"bankConnectionStatus":{"type":"string","enum":["active","error","disabled"]},"provider":{"type":"string","example":"plaid"},"institutionName":{"type":"string","nullable":true},"name":{"type":"string","description":"Display name. The user's own name when they renamed the account; syncs never overwrite it."},"institutionAccountName":{"type":"string","description":"The bank's current name for the account. Omitted for manual accounts and until a sync reads it."},"mask":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"subtype":{"type":"string","nullable":true},"currency":{"type":"string","nullable":true},"currentBalance":{"type":"number","nullable":true},"availableBalance":{"type":"number","nullable":true},"balanceAsOf":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["active","closed","disconnected"]},"closedAt":{"type":"string","format":"date-time","nullable":true},"liability":{"$ref":"#/components/schemas/AccountLiability"}}},"AccountLiability":{"type":"object","nullable":true,"description":"Liability detail for `credit`, `student`, or `mortgage` accounts; `null` for non-liability accounts. Fields not relevant to the liability type are `null`. The same shape is accepted when creating or updating a manual account.","required":["type"],"properties":{"type":{"type":"string","enum":["credit","student","mortgage"]},"minimumPaymentAmount":{"type":"number","nullable":true},"nextPaymentDueDate":{"type":"string","format":"date","nullable":true},"lastPaymentAmount":{"type":"number","nullable":true},"lastPaymentDate":{"type":"string","format":"date","nullable":true},"interestRate":{"type":"number","nullable":true},"isOverdue":{"type":"boolean","nullable":true},"lastStatementBalance":{"type":"number","nullable":true,"description":"Credit accounts only."},"aprs":{"type":"array","description":"Credit accounts only.","items":{"type":"object","required":["aprType","aprPercentage"],"properties":{"aprType":{"type":"string"},"aprPercentage":{"type":"number"},"balanceSubjectToApr":{"type":"number","nullable":true},"interestChargeAmount":{"type":"number","nullable":true}}}},"loanName":{"type":"string","nullable":true,"description":"Student accounts only."},"loanStatus":{"type":"object","nullable":true,"description":"Student accounts only.","properties":{"type":{"type":"string","nullable":true},"endDate":{"type":"string","format":"date","nullable":true}}},"repaymentPlan":{"type":"object","nullable":true,"description":"Student accounts only.","properties":{"type":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}}},"pslfStatus":{"type":"object","nullable":true,"description":"Student accounts only.","properties":{"paymentsRemaining":{"type":"number","nullable":true},"paymentsMade":{"type":"number","nullable":true},"estimatedEligibilityDate":{"type":"string","format":"date","nullable":true}}},"originationDate":{"type":"string","format":"date","nullable":true,"description":"Student and mortgage accounts."},"originationPrincipalAmount":{"type":"number","nullable":true,"description":"Student and mortgage accounts."},"expectedPayoffDate":{"type":"string","format":"date","nullable":true,"description":"Student accounts only."},"outstandingInterestAmount":{"type":"number","nullable":true,"description":"Student accounts only."},"ytdInterestPaid":{"type":"number","nullable":true,"description":"Student and mortgage accounts."},"ytdPrincipalPaid":{"type":"number","nullable":true,"description":"Student and mortgage accounts."},"interestRateType":{"type":"string","enum":["fixed","variable"],"nullable":true,"description":"Mortgage accounts only."},"nextMonthlyPayment":{"type":"number","nullable":true,"description":"Mortgage accounts only."},"escrowBalance":{"type":"number","nullable":true,"description":"Mortgage accounts only."},"hasPmi":{"type":"boolean","nullable":true,"description":"Mortgage accounts only."},"hasPrepaymentPenalty":{"type":"boolean","nullable":true,"description":"Mortgage accounts only."},"propertyAddress":{"type":"object","nullable":true,"description":"Mortgage accounts only.","properties":{"street":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"country":{"type":"string","nullable":true}}},"loanTypeDescription":{"type":"string","nullable":true,"description":"Mortgage accounts only."},"maturityDate":{"type":"string","format":"date","nullable":true,"description":"Mortgage accounts only."},"pastDueAmount":{"type":"number","nullable":true,"description":"Mortgage accounts only."}}},"ManualAccountCreateRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"institutionName":{"type":"string","minLength":1,"maxLength":255,"description":"Institution label. Defaults to 'Manual'."},"type":{"type":"string","minLength":1,"maxLength":100,"description":"e.g. depository, credit, loan, investment, other"},"subtype":{"type":"string","minLength":1,"maxLength":100,"description":"e.g. checking, savings, credit card, mortgage, student"},"mask":{"type":"string","minLength":1,"maxLength":100},"currency":{"type":"string","minLength":1,"maxLength":10,"description":"ISO currency code, e.g. USD"},"currentBalance":{"type":"number","description":"For liabilities, use a positive number for the amount owed."},"availableBalance":{"type":"number"},"liability":{"$ref":"#/components/schemas/AccountLiability"}}},"ManualAccountUpdateRequest":{"type":"object","description":"At least one field must be provided. Pass `null` to clear a nullable field. A bank-synced account accepts only `name`.","minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":120,"nullable":true,"description":"New display name. On a bank-synced account, `null` puts back the bank's name (`institutionAccountName`); a manual account needs a name."},"type":{"type":"string","minLength":1,"maxLength":100,"nullable":true},"subtype":{"type":"string","minLength":1,"maxLength":100,"nullable":true},"mask":{"type":"string","minLength":1,"maxLength":100,"nullable":true},"currency":{"type":"string","minLength":1,"maxLength":10},"currentBalance":{"type":"number","nullable":true},"availableBalance":{"type":"number","nullable":true},"liability":{"$ref":"#/components/schemas/AccountLiability"}}},"AccountsListResponse":{"type":"object","required":["accounts"],"properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/AccountSummary"}}}},"AccountResponse":{"type":"object","required":["account"],"properties":{"account":{"$ref":"#/components/schemas/AccountSummary"}}},"BalanceHistoryEntry":{"type":"object","required":["id","bankAccountId","accountName","date","balance","currency"],"properties":{"id":{"type":"string","format":"uuid"},"bankAccountId":{"type":"string","format":"uuid"},"accountName":{"type":"string"},"date":{"type":"string","format":"date"},"balance":{"type":"number"},"currency":{"type":"string","nullable":true}}},"PageInfo":{"type":"object","required":["nextCursor","hasMore"],"properties":{"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}},"BalanceHistoryListResponse":{"type":"object","required":["balanceHistory","pageInfo"],"properties":{"balanceHistory":{"type":"array","items":{"$ref":"#/components/schemas/BalanceHistoryEntry"}},"pageInfo":{"$ref":"#/components/schemas/PageInfo"}}},"SecurityProviderId":{"type":"object","required":["provider","providerId"],"properties":{"provider":{"type":"string","example":"plaid"},"providerId":{"type":"string"}}},"SecuritySummary":{"type":"object","required":["id","tickerSymbol","name","type","isin","cusip","currency","closePrice","closePriceAsOf","isCashEquivalent","sector","industry","optionContractType","optionExpirationDate","optionStrikePrice","optionUnderlyingTicker","providerIds"],"properties":{"id":{"type":"string","format":"uuid"},"tickerSymbol":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"isin":{"type":"string","nullable":true},"cusip":{"type":"string","nullable":true},"currency":{"type":"string","nullable":true},"closePrice":{"type":"number","nullable":true},"closePriceAsOf":{"type":"string","format":"date","nullable":true},"isCashEquivalent":{"type":"boolean"},"sector":{"type":"string","nullable":true},"industry":{"type":"string","nullable":true},"optionContractType":{"type":"string","nullable":true},"optionExpirationDate":{"type":"string","format":"date","nullable":true},"optionStrikePrice":{"type":"number","nullable":true},"optionUnderlyingTicker":{"type":"string","nullable":true},"providerIds":{"type":"array","items":{"$ref":"#/components/schemas/SecurityProviderId"}}}},"SecuritiesListResponse":{"type":"object","required":["securities"],"properties":{"securities":{"type":"array","items":{"$ref":"#/components/schemas/SecuritySummary"}}}},"HoldingSummary":{"type":"object","required":["id","bankConnectionId","bankAccountId","securityId","quantity","costBasis","currency","status","soldAt"],"properties":{"id":{"type":"string","format":"uuid"},"bankConnectionId":{"type":"string","format":"uuid"},"bankAccountId":{"type":"string","format":"uuid"},"securityId":{"type":"string","format":"uuid"},"quantity":{"type":"number"},"costBasis":{"type":"number","nullable":true},"currency":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","sold"]},"soldAt":{"type":"string","format":"date-time","nullable":true}}},"HoldingsListResponse":{"type":"object","required":["holdings"],"properties":{"holdings":{"type":"array","items":{"$ref":"#/components/schemas/HoldingSummary"}}}},"InvestmentTransactionSummary":{"type":"object","required":["id","bankConnectionId","bankAccountId","securityId","provider","providerId","date","amount","quantity","price","fees","currency","summary","type","subtype"],"properties":{"id":{"type":"string","format":"uuid"},"bankConnectionId":{"type":"string","format":"uuid"},"bankAccountId":{"type":"string","format":"uuid"},"securityId":{"type":"string","format":"uuid","nullable":true},"provider":{"type":"string","example":"plaid"},"providerId":{"type":"string"},"date":{"type":"string","format":"date"},"amount":{"type":"number"},"quantity":{"type":"number","nullable":true},"price":{"type":"number","nullable":true},"fees":{"type":"number","nullable":true},"currency":{"type":"string","nullable":true},"summary":{"type":"string"},"type":{"type":"string"},"subtype":{"type":"string"}}},"InvestmentTransactionsListResponse":{"type":"object","required":["investmentTransactions","pageInfo"],"properties":{"investmentTransactions":{"type":"array","items":{"$ref":"#/components/schemas/InvestmentTransactionSummary"}},"pageInfo":{"$ref":"#/components/schemas/PageInfo"}}},"TransactionSummary":{"type":"object","required":["id","bankConnectionId","bankAccountId","provider","providerId","status","summary","amount","currency","authorizedDate","postedDate","merchantName","categoryId","fees","feeType","netAmount","subAccount","paymentChannel","checkNumber","originalDescription","source"],"properties":{"id":{"type":"string","format":"uuid"},"bankConnectionId":{"type":"string","format":"uuid"},"bankAccountId":{"type":"string","format":"uuid"},"provider":{"type":"string","example":"plaid"},"providerId":{"type":"string"},"status":{"type":"string","enum":["pending","posted","deleted"]},"summary":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string","nullable":true},"authorizedDate":{"type":"string","format":"date","nullable":true},"postedDate":{"type":"string","format":"date","nullable":true},"merchantName":{"type":"string","nullable":true},"categoryId":{"type":"string","format":"uuid","nullable":true},"fees":{"type":"number","nullable":true},"feeType":{"type":"string","nullable":true},"netAmount":{"type":"number","nullable":true},"subAccount":{"type":"string","nullable":true},"paymentChannel":{"type":"string","nullable":true},"checkNumber":{"type":"string","nullable":true},"originalDescription":{"type":"string","nullable":true},"source":{"type":"string","nullable":true}}},"TransactionsListResponse":{"type":"object","required":["transactions","pageInfo"],"properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/TransactionSummary"}},"pageInfo":{"$ref":"#/components/schemas/PageInfo"}}},"CategorySummary":{"type":"object","required":["id","provider","providerId","name","group","categoryGroupId","description","type"],"properties":{"id":{"type":"string","format":"uuid"},"provider":{"type":"string","example":"plaid"},"providerId":{"type":"string"},"name":{"type":"string"},"group":{"type":"string","nullable":true,"description":"Name of the category group this category belongs to"},"categoryGroupId":{"type":"string","format":"uuid","nullable":true,"description":"ID of the category group this category belongs to (see /category-groups)"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["income","expense","transfer"],"description":"Only expense categories count as spending and can be budgeted."}}},"CategoriesListResponse":{"type":"object","required":["categories"],"properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/CategorySummary"}}}},"CategoryCreateRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"group":{"type":"string","minLength":1,"maxLength":100,"description":"Group name. An existing group is reused (case-insensitive match); a new one is created if it does not exist."},"description":{"type":"string","minLength":1,"maxLength":500},"type":{"type":"string","enum":["income","expense","transfer"],"description":"Only expense categories count as spending and can be budgeted. Defaults to expense."}}},"CategoryUpdateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"group":{"type":"string","minLength":1,"maxLength":100,"description":"Group name. An existing group is reused (case-insensitive match); a new one is created if it does not exist."},"description":{"type":"string","minLength":1,"maxLength":500,"nullable":true},"type":{"type":"string","enum":["income","expense","transfer"],"description":"Only expense categories count as spending and can be budgeted."}}},"CategoryBatchUpdateRequest":{"type":"object","required":["updates"],"properties":{"updates":{"type":"array","minItems":1,"maxItems":250,"items":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":100},"group":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","minLength":1,"maxLength":500,"nullable":true},"type":{"type":"string","enum":["income","expense","transfer"],"description":"Only expense categories count as spending and can be budgeted."}}}}}},"CategoryGroup":{"type":"object","required":["id","name","sortOrder"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sortOrder":{"type":"integer","nullable":true,"description":"Explicit display order. Groups without one sort last, alphabetically."}}},"CategoryGroupsListResponse":{"type":"object","required":["categoryGroups","pageInfo"],"properties":{"categoryGroups":{"type":"array","items":{"$ref":"#/components/schemas/CategoryGroup"}},"pageInfo":{"$ref":"#/components/schemas/PageInfo"}}},"CategoryGroupCreateRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"sortOrder":{"type":"integer","minimum":0,"maximum":100000,"nullable":true}}},"CategoryGroupUpdateRequest":{"type":"object","minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"sortOrder":{"type":"integer","minimum":0,"maximum":100000,"nullable":true}}},"TransactionUpdateRequest":{"type":"object","properties":{"categoryId":{"type":"string","format":"uuid","nullable":true,"description":"Category UUID to assign, or null to remove"}}},"TransactionBatchUpdateRequest":{"type":"object","required":["updates"],"properties":{"updates":{"type":"array","minItems":1,"maxItems":250,"items":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"categoryId":{"type":"string","format":"uuid","nullable":true}}}}}},"BatchUpdateResponse":{"type":"object","required":["updated"],"properties":{"updated":{"type":"integer","description":"Number of records updated"}}},"TransactionRule":{"type":"object","required":["id","conditions","outcomes","priority","allowedAccountIds","createdAt","updatedAt","archivedAt"],"properties":{"id":{"type":"string","format":"uuid"},"conditions":{"type":"array","items":{"type":"object","additionalProperties":true}},"outcomes":{"type":"array","items":{"type":"object","additionalProperties":true}},"priority":{"type":"integer"},"allowedAccountIds":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Accounts this rule is limited to. null means all accounts."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":"string","format":"date-time","nullable":true}}},"TransactionRulesListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TransactionRule"}}}},"TransactionRuleCreateBody":{"type":"object","required":["conditions","outcomes"],"properties":{"conditions":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":true},"description":"Conditions match transactions on Account, Summary, OriginalDescription, MerchantName, Amount, or transactionDay. Each condition is an object describing a field and how to match it."},"outcomes":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":true},"description":"Outcomes applied to matching transactions. Set Category (`{ action: 'updateTransaction', field: 'Category', value: { id, value } }`) or MerchantName, or hide the transaction (`{ action: 'hideTransaction', value: true }`)."},"priority":{"type":"integer","minimum":1,"maximum":100}}},"TransactionRuleUpdateBody":{"type":"object","minProperties":1,"properties":{"conditions":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":true},"description":"Conditions match transactions on Account, Summary, OriginalDescription, MerchantName, Amount, or transactionDay. Each condition is an object describing a field and how to match it."},"outcomes":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":true},"description":"Outcomes applied to matching transactions. Set Category (`{ action: 'updateTransaction', field: 'Category', value: { id, value } }`) or MerchantName, or hide the transaction (`{ action: 'hideTransaction', value: true }`)."},"priority":{"type":"integer","minimum":1,"maximum":100}}},"TransactionRuleRunBody":{"type":"object","properties":{"ruleIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Specific rule IDs to run. Omit to run all active rules."}}},"TransactionRuleRunResult":{"type":"object","required":["scanned","matched","updated"],"properties":{"scanned":{"type":"integer","description":"Number of transactions scanned"},"matched":{"type":"integer","description":"Number of transactions matched by a rule"},"updated":{"type":"integer","description":"Number of transactions updated"}}},"BudgetPlan":{"type":"object","required":["id","name","method","accountScope","isDefault"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"method":{"type":"string","enum":["standard","envelope"]},"accountScope":{"type":"string","enum":["All","Selected"]},"isDefault":{"type":"boolean"}}},"BudgetPlanDetail":{"allOf":[{"$ref":"#/components/schemas/BudgetPlan"},{"type":"object","required":["accountIds","budgetCount","createdAt"],"properties":{"accountIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The plan's accounts when `accountScope` is `Selected`, otherwise empty"},"budgetCount":{"type":"integer","description":"Active category and group budgets. Payment envelopes are not counted."},"createdAt":{"type":"string","format":"date-time"}}}]},"BudgetPlansListResponse":{"type":"object","required":["plans"],"properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/BudgetPlanDetail"}}}},"BudgetPlanCreateRequest":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"accountIds":{"type":"array","minItems":1,"items":{"type":"string","format":"uuid"},"description":"Accounts the plan covers. Omit for every account, now and any connected later."},"isDefault":{"type":"boolean"},"method":{"type":"string","enum":["standard","envelope"],"description":"How the plan budgets. Omit for `standard`."}}},"BudgetPlanUpdateRequest":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"accountIds":{"type":"array","nullable":true,"minItems":1,"items":{"type":"string","format":"uuid"},"description":"Accounts the plan covers, or null for every account"},"isDefault":{"type":"boolean","enum":[true],"description":"Make this the default plan. The previous default loses the flag."},"method":{"type":"string","enum":["standard","envelope"],"description":"`standard` compares spending to a monthly plan. `envelope` plans only what the user assigns from Ready to Assign."}}},"BudgetPlanUpdateResponse":{"type":"object","required":["plan","fieldsChanged"],"properties":{"plan":{"$ref":"#/components/schemas/BudgetPlanDetail"},"fieldsChanged":{"type":"array","items":{"type":"string"}}}},"BudgetPlanDeleteResponse":{"type":"object","required":["success","planId","budgetCount","newDefaultPlan"],"properties":{"success":{"type":"boolean","enum":[true]},"planId":{"type":"string","format":"uuid"},"budgetCount":{"type":"integer"},"newDefaultPlan":{"allOf":[{"$ref":"#/components/schemas/BudgetPlan"}],"nullable":true,"description":"The plan promoted because the default was deleted"}}},"Budget":{"type":"object","required":["id","planId","targetType","categoryId","categoryGroupId","accountId","amount","rolloverEnabled","targetAmount","targetDate","startPeriod","isActive"],"properties":{"id":{"type":"string","format":"uuid"},"planId":{"type":"string","format":"uuid"},"targetType":{"type":"string","enum":["category","category_group","account"]},"categoryId":{"type":"string","format":"uuid","nullable":true},"categoryGroupId":{"type":"string","format":"uuid","nullable":true},"accountId":{"type":"string","format":"uuid","nullable":true,"description":"The credit card, for a payment envelope"},"amount":{"type":"number","description":"The template amount in dollars. A one-month amount is in `periodOverride`."},"rolloverEnabled":{"type":"boolean"},"targetAmount":{"type":"number","nullable":true},"targetDate":{"type":"string","format":"date","nullable":true},"startPeriod":{"type":"string","format":"date","description":"First day of the first month the budget applies to"},"isActive":{"type":"boolean"}}},"BudgetsListResponse":{"type":"object","required":["plan","budgets"],"properties":{"plan":{"allOf":[{"$ref":"#/components/schemas/BudgetPlan"}],"nullable":true,"description":"Null until the user sets their first budget"},"budgets":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Budget"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","nullable":true,"description":"Category or group name"}}}]}}}},"BudgetSetRequest":{"description":"Send exactly one of `categoryId`, `categoryGroupId` or, with `scope: \"period\"`, `accountId`. Fields from the other scope are rejected.","oneOf":[{"type":"object","additionalProperties":false,"required":["scope","amount"],"properties":{"scope":{"type":"string","enum":["template"]},"categoryId":{"type":"string","format":"uuid"},"categoryGroupId":{"type":"string","format":"uuid"},"amount":{"type":"number","minimum":0,"description":"Dollars, at most 2 decimal places"},"rolloverEnabled":{"type":"boolean"},"targetAmount":{"type":"number","minimum":0,"nullable":true,"description":"Savings goal in dollars, or null to clear it"},"targetDate":{"type":"string","format":"date","nullable":true},"startPeriod":{"type":"string","description":"New budgets only: `current` (default) or YYYY-MM"},"plan":{"type":"string","description":"Plan name or id"}}},{"type":"object","additionalProperties":false,"required":["scope","period","amount"],"properties":{"scope":{"type":"string","enum":["period"]},"categoryId":{"type":"string","format":"uuid"},"categoryGroupId":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid","description":"Credit card account, for its payment envelope in an envelope plan"},"period":{"type":"string","description":"`current` or YYYY-MM"},"amount":{"type":"number","minimum":0,"description":"Dollars, at most 2 decimal places"},"note":{"type":"string","maxLength":500,"nullable":true},"plan":{"type":"string","description":"Plan name or id"}}}]},"BudgetUpdateRequest":{"oneOf":[{"type":"object","additionalProperties":false,"required":["scope","period","amount"],"properties":{"scope":{"type":"string","enum":["period"]},"period":{"type":"string","description":"`current` or YYYY-MM"},"amount":{"type":"number","minimum":0,"description":"Dollars, at most 2 decimal places"},"note":{"type":"string","maxLength":500,"nullable":true}}},{"type":"object","additionalProperties":false,"required":["scope"],"minProperties":2,"properties":{"scope":{"type":"string","enum":["template"]},"amount":{"type":"number","minimum":0,"description":"Dollars, at most 2 decimal places"},"rolloverEnabled":{"type":"boolean"},"targetAmount":{"type":"number","minimum":0,"nullable":true},"targetDate":{"type":"string","format":"date","nullable":true},"isActive":{"type":"boolean"}}}]},"BudgetUpdateResponse":{"type":"object","required":["budget","periodOverride","snapshot"],"properties":{"budget":{"$ref":"#/components/schemas/Budget"},"periodOverride":{"type":"object","nullable":true,"description":"Set for `scope: \"period\"`","required":["budgetId","period","startDate","endDate","plannedAmount","note","source"],"properties":{"budgetId":{"type":"string","format":"uuid"},"period":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"plannedAmount":{"type":"number"},"note":{"type":"string","nullable":true},"source":{"type":"string","enum":["user_edited","snapshot"]}}},"snapshot":{"type":"object","nullable":true,"description":"Set for `scope: \"template\"` when the amount changed: the past months written down at the old amount","required":["budgetId","periodsConsidered","rowsWritten","truncated"],"properties":{"budgetId":{"type":"string","format":"uuid"},"periodsConsidered":{"type":"integer"},"rowsWritten":{"type":"integer"},"truncated":{"type":"boolean"}}}}},"BudgetSetResponse":{"allOf":[{"$ref":"#/components/schemas/BudgetUpdateResponse"},{"type":"object","required":["created","plan"],"properties":{"created":{"type":"boolean","description":"True when this call created the budget"},"plan":{"$ref":"#/components/schemas/BudgetPlan"}}}]},"BudgetDeleteResponse":{"type":"object","required":["success","budgetId","overridesDeleted"],"properties":{"success":{"type":"boolean","enum":[true]},"budgetId":{"type":"string","format":"uuid"},"overridesDeleted":{"type":"integer"}}},"BudgetReallocateRequest":{"type":"object","required":["fromBudgetId","toBudgetId","amount"],"properties":{"fromBudgetId":{"type":"string","format":"uuid"},"toBudgetId":{"type":"string","format":"uuid"},"amount":{"type":"number","exclusiveMinimum":true,"minimum":0,"description":"Dollars, at most 2 decimal places"},"period":{"type":"string","default":"current","description":"`current` or YYYY-MM"},"note":{"type":"string","maxLength":500,"nullable":true},"plan":{"type":"string","description":"Plan name or id. When set, both budgets must be in this plan."}}},"BudgetPeriod":{"type":"object","required":["key","cadence","startDate","endDate"],"properties":{"key":{"type":"string","example":"2026-11"},"cadence":{"type":"string","enum":["monthly"]},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}}},"BudgetReallocationSide":{"type":"object","required":["budgetId","plannedBefore","plannedAfter"],"properties":{"budgetId":{"type":"string","format":"uuid"},"plannedBefore":{"type":"number"},"plannedAfter":{"type":"number"}}},"BudgetReallocateResponse":{"type":"object","required":["period","amount","from","to"],"properties":{"period":{"$ref":"#/components/schemas/BudgetPeriod"},"amount":{"type":"number"},"from":{"$ref":"#/components/schemas/BudgetReallocationSide"},"to":{"$ref":"#/components/schemas/BudgetReallocationSide"}}},"BudgetStatusEntry":{"type":"object","required":["budgetId","targetType","categoryId","categoryGroupId","name","categoryIds","rolloverEnabled","planned","plannedSource","suggestedAmount","overrideSource","spent","rollover","available","isOverBudget","pace","targetProgress","rolloverPeriodsWalked"],"properties":{"budgetId":{"type":"string","format":"uuid"},"targetType":{"type":"string","enum":["category","category_group"]},"categoryId":{"type":"string","format":"uuid","nullable":true},"categoryGroupId":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string","nullable":true},"categoryIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Categories whose spend counts toward this budget"},"rolloverEnabled":{"type":"boolean"},"planned":{"type":"number"},"plannedSource":{"type":"string","enum":["template","override","unassigned"],"description":"`unassigned` is an envelope plan's month with nothing assigned, so `planned` is 0."},"suggestedAmount":{"type":"number","nullable":true,"description":"Envelope plans: the template, as a quick-fill suggestion"},"overrideSource":{"type":"string","enum":["user_edited","snapshot"],"nullable":true},"spent":{"type":"number"},"rollover":{"type":"number"},"available":{"type":"number","description":"What's left. Negative when overspent."},"isOverBudget":{"type":"boolean","description":"True when `available` is negative."},"pace":{"type":"object","required":["periodElapsedRatio","spentRatio","status","projectedSpend"],"properties":{"periodElapsedRatio":{"type":"number"},"spentRatio":{"type":"number","nullable":true},"status":{"type":"string","enum":["under","on_track","over","unknown"],"description":"How spending compares with how far through the period it is. `over` means spending faster than the period is passing, not over budget. A budget is over budget when `available` is negative."},"projectedSpend":{"type":"number","nullable":true}}},"targetProgress":{"type":"object","nullable":true,"required":["targetAmount","targetDate","currentAmount","remainingAmount","progressRatio","isMet","periodsRemaining","requiredPerPeriod"],"properties":{"targetAmount":{"type":"number"},"targetDate":{"type":"string","format":"date","nullable":true},"currentAmount":{"type":"number"},"remainingAmount":{"type":"number"},"progressRatio":{"type":"number","nullable":true},"isMet":{"type":"boolean"},"periodsRemaining":{"type":"integer","nullable":true},"requiredPerPeriod":{"type":"number","nullable":true}}},"rolloverPeriodsWalked":{"type":"integer"}}},"BudgetStatusResponse":{"type":"object","required":["planId","plan","period","currency","totals","readyToAssign","readyToAssignBreakdown","assignedInFuture","spentOutsideEnvelopes","balancesAsOf","budgets","unbudgeted","paymentEnvelopes","unrecognizedCardInflows","meta","includesAccountsOutsideConsent","accountsOutsideConsent","freshness"],"properties":{"planId":{"type":"string","format":"uuid","nullable":true},"plan":{"allOf":[{"$ref":"#/components/schemas/BudgetPlan"}],"nullable":true},"period":{"$ref":"#/components/schemas/BudgetPeriod"},"currency":{"type":"string","nullable":true,"description":"The plan's currency code. `USD` when the plan stores none."},"totals":{"type":"object","description":"A category budget inside a budgeted group counts once, through the group.","required":["planned","spent","rollover","available","unbudgetedSpent","uncategorizedSpent","totalSpent"],"properties":{"planned":{"type":"number"},"spent":{"type":"number"},"rollover":{"type":"number"},"available":{"type":"number"},"unbudgetedSpent":{"type":"number","description":"Spend in categories no budget covers"},"uncategorizedSpent":{"type":"number","description":"Outflows on transactions with no category. An inflow with no category is not counted, since it is not a refund."},"totalSpent":{"type":"number"}}},"readyToAssign":{"type":"number","nullable":true,"description":"Depository balances minus `totals.available` minus every payment envelope's `available`, plus `spentOutsideEnvelopes`, minus `assignedInFuture`, over the plan's accounts. Negative when over-assigned. Null unless this is an envelope plan's current month."},"readyToAssignBreakdown":{"type":"object","nullable":true,"description":"The five terms of `readyToAssign`, each signed the way it moves it, so they add up to `readyToAssign`. Null whenever `readyToAssign` is.","required":["cashBalance","stillAvailableInBudgets","setAsideForCardPayments","assignedToFutureMonths","cashSpentOutsideBudgets"],"properties":{"cashBalance":{"type":"number","description":"The plan's open depository balances."},"stillAvailableInBudgets":{"type":"number","description":"Minus `totals.available`. Positive when the budgets are overspent overall, because that cash already left the balances."},"setAsideForCardPayments":{"type":"number","description":"Minus every payment envelope's `available`."},"assignedToFutureMonths":{"type":"number","description":"Minus `assignedInFuture`."},"cashSpentOutsideBudgets":{"type":"number","description":"Plus `spentOutsideEnvelopes`, cash spent with no budget that already left the balances."}}},"assignedInFuture":{"type":"number","nullable":true,"description":"Every assignment to a later month, payment envelopes included. It comes off `readyToAssign` now and moves into `available` when that month is current. Null whenever `readyToAssign` is."},"spentOutsideEnvelopes":{"type":"number","nullable":true,"description":"This month's unbudgeted and uncategorized spend from depository accounts, added back to `readyToAssign` like an overspent envelope, so budgeting the category later doesn't raise it. Null whenever `readyToAssign` is."},"balancesAsOf":{"type":"string","format":"date-time","nullable":true,"description":"Time of the oldest balance behind `readyToAssign`"},"budgets":{"type":"array","items":{"$ref":"#/components/schemas/BudgetStatusEntry"}},"unbudgeted":{"type":"array","items":{"type":"object","required":["categoryId","name","categoryGroupId","spent"],"properties":{"categoryId":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"categoryGroupId":{"type":"string","format":"uuid","nullable":true},"spent":{"type":"number"}}}},"paymentEnvelopes":{"type":"array","description":"One per credit card in an envelope plan's accounts. Otherwise empty.","items":{"type":"object","required":["budgetId","accountId","name","assigned","rollover","movedIn","paid","available","overpaid","owed","uncoveredLastMonth"],"properties":{"budgetId":{"type":"string","format":"uuid","nullable":true,"description":"Null until the first assignment"},"accountId":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The card's display name"},"institutionAccountName":{"type":"string","description":"The bank's current name for the card, when a sync has read it"},"assigned":{"type":"number"},"rollover":{"type":"number","description":"Carried from earlier months"},"movedIn":{"type":"number","description":"Budgeted spend on this card this month, net of refunds. Once the month has ended, only the part the spending envelopes covered: cash spend counts first, and card spend beyond what was left stays owed."},"paid":{"type":"number"},"available":{"type":"number","description":"What's set aside for the payment, never below 0"},"overpaid":{"type":"number","description":"This month's payments to the card beyond what was set aside. They came out of `readyToAssign`."},"owed":{"type":"number","description":"The card's current balance, whichever month this is. Not subtracted from `readyToAssign`."},"uncoveredLastMonth":{"type":"number","description":"Last month's spend on this card that no envelope covered. It wasn't set aside, so it shows in the shortfall until assigned."}}}},"unrecognizedCardInflows":{"type":"object","nullable":true,"description":"This month's inflows on a card in an income category or with no category. Null for standard plans.","required":["count","amount","accountIds"],"properties":{"count":{"type":"integer"},"amount":{"type":"number"},"accountIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The cards the inflows are on"}}},"meta":{"type":"object","required":["planCount","budgetCount","rolloverBudgetCount","maxRolloverPeriodsWalked","totalRolloverPeriodsWalked","rolloverWalkTruncated","queryCount"],"properties":{"planCount":{"type":"integer"},"budgetCount":{"type":"integer"},"rolloverBudgetCount":{"type":"integer"},"maxRolloverPeriodsWalked":{"type":"integer"},"totalRolloverPeriodsWalked":{"type":"integer"},"rolloverWalkTruncated":{"type":"boolean"},"queryCount":{"type":"integer"}}},"includesAccountsOutsideConsent":{"type":"boolean","description":"True when the totals include accounts this key was not granted"},"accountsOutsideConsent":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}},"freshness":{"type":"object","description":"How current the plan's spending is. Destination syncs don't count.","required":["asOf","connections"],"properties":{"asOf":{"type":"string","format":"date-time","nullable":true,"description":"The oldest last successful sync across `connections`. Null when one never synced or the plan has no synced accounts."},"connections":{"type":"array","description":"Each bank connection behind the plan's open accounts. Manual accounts are left out.","items":{"type":"object","required":["id","name","status","lastSuccessAt","errorMessage","reconnectUrl"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true,"description":"The institution's name"},"status":{"type":"string","enum":["ok","stale","error","unavailable","disabled","never"],"description":"`stale` when the bank reports transaction updates failing, or the last success is on an earlier day than another connection's. `error` when the user needs to reconnect. `unavailable` when the bank isn't responding, so reconnecting won't help. `never` when it has not synced yet."},"lastSuccessAt":{"type":"string","format":"date-time","nullable":true},"errorMessage":{"type":"string","nullable":true,"description":"Why it can't sync, in the user's words. Only when `status` is `error` or `unavailable`."},"reconnectUrl":{"type":"string","format":"uri","nullable":true,"description":"Where the user reconnects. Only when `status` is `error`."}}}}}}}}}},"security":[{"bearerAuth":[]}],"tags":[{"name":"Me","description":"Authenticated user"},{"name":"Feedback","description":"Bug reports, unclear docs, confusing errors and feature requests"},{"name":"Health","description":"Service health"},{"name":"Bank Connections","description":"Bank connection resources"},{"name":"Accounts","description":"Account and balance history resources"},{"name":"Investments","description":"Securities, holdings, and investment transaction resources"},{"name":"Transactions","description":"Transaction resources"},{"name":"Categories","description":"Transaction category resources"},{"name":"Category Groups","description":"Category group resources"},{"name":"Rules","description":"Transaction rule resources"},{"name":"Budgets","description":"Budget plans, budgets, and budget status"}]}