openapi: 3.0.0 info: title: Actual Budget REST API # Placeholder only, so the raw file stays a standalone-valid OpenAPI document. # The real value is injected from package.json by src/config/swagger.js # (which serves /docs) and by scripts/validate-openapi.mjs, so the release # version is maintained in exactly one place. Never bump this line. version: 0.0.0 description: | REST API wrapper for Actual Budget with OAuth2 integration for n8n. **Features:** - JWT-based authentication with access and refresh tokens - OAuth2 flow for n8n integration - Comprehensive metrics collection - Health checks with service status - Secure ActualQL query endpoint - Rate limiting with Redis support - Environment variable validation - Comprehensive error handling servers: - url: http://localhost:3000 description: Development server security: - bearerAuth: [] tags: - name: Authentication - name: OAuth2 - name: Admin - name: Accounts - name: Transactions - name: Categories - name: Category Groups - name: Payees - name: Tags - name: Notes - name: Preferences - name: Account Groups - name: Budgets - name: Budget Files - name: Rules - name: Schedules - name: Query - name: System - name: Health - name: Metrics - name: Audit paths: # API v1: read-only audit feed (own bearer token, not a JWT) /v1/audit/changes: $ref: './paths/audit.yml#/auditChanges' # API v2 endpoints (prefixed with /v2) /v2/health: $ref: './paths/health.yml#/health' /v2/metrics: $ref: './paths/metrics.yml#/metrics' /v2/metrics/summary: $ref: './paths/metrics.yml#/metricsSummary' /v2/metrics/reset: $ref: './paths/metrics.yml#/metricsReset' /v2/metrics/prometheus: $ref: './paths/metrics.yml#/metricsPrometheus' /v2/auth/login: $ref: './paths/authentication.yml#/authLogin' /v2/auth/logout: $ref: './paths/authentication.yml#/authLogout' /v2/accounts: $ref: './paths/accounts.yml#/accounts' /v2/accounts/{id}: $ref: './paths/accounts.yml#/accountById' /v2/accounts/{id}/close: $ref: './paths/accounts.yml#/accountClose' /v2/accounts/{id}/reopen: $ref: './paths/accounts.yml#/accountReopen' /v2/accounts/{id}/balance: $ref: './paths/accounts.yml#/accountBalance' /v2/accounts/{accountId}/bank-sync: $ref: './paths/accounts.yml#/accountBankSync' /v2/accounts/{accountId}/transactions: $ref: './paths/transactions.yml#/accountTransactions' /v2/accounts/{accountId}/transactions/import: $ref: './paths/transactions.yml#/accountTransactionsImport' /v2/transactions/{id}: $ref: './paths/transactions.yml#/transactionById' /v2/categories: $ref: './paths/categories.yml#/categories' /v2/categories/{id}: $ref: './paths/categories.yml#/categoryById' /v2/category-groups: $ref: './paths/category-groups.yml#/categoryGroups' /v2/category-groups/{id}: $ref: './paths/category-groups.yml#/categoryGroupById' /v2/payees: $ref: './paths/payees.yml#/payees' /v2/payees/{id}: $ref: './paths/payees.yml#/payeeById' /v2/payees/merge: $ref: './paths/payees.yml#/payeesMerge' /v2/payees/common: $ref: './paths/payees.yml#/payeesCommon' /v2/tags: $ref: './paths/tags.yml#/tags' /v2/tags/{id}: $ref: './paths/tags.yml#/tagById' /v2/notes/{id}: $ref: './paths/notes.yml#/noteByEntityId' /v2/preferences: $ref: './paths/preferences.yml#/preferences' /v2/account-groups: $ref: './paths/account-groups.yml#/accountGroups' /v2/account-groups/{id}: $ref: './paths/account-groups.yml#/accountGroupById' /v2/budgets/months: $ref: './paths/budgets.yml#/budgetMonths' /v2/budgets/batch: $ref: './paths/budgets.yml#/budgetBatch' /v2/budgets/{month}: $ref: './paths/budgets.yml#/budgetByMonth' /v2/budgets/{month}/categories/{categoryId}/budget: $ref: './paths/budgets.yml#/budgetCategoryBudget' /v2/budgets/{month}/categories/{categoryId}/carryover: $ref: './paths/budgets.yml#/budgetCategoryCarryover' /v2/budgets/{month}/hold: $ref: './paths/budgets.yml#/budgetHold' /v2/budgets/{month}/reset-hold: $ref: './paths/budgets.yml#/budgetResetHold' /v2/rules: $ref: './paths/rules.yml#/rules' /v2/rules/payees/{payeeId}: $ref: './paths/rules.yml#/rulesByPayee' /v2/rules/{id}: $ref: './paths/rules.yml#/ruleById' /v2/schedules: $ref: './paths/schedules.yml#/schedules' /v2/schedules/{id}: $ref: './paths/schedules.yml#/scheduleById' /v2/query: $ref: './paths/query.yml#/query' /v2/budget/files: $ref: './paths/budget-files.yml#/budgetFiles' /v2/budget/load: $ref: './paths/budget-files.yml#/budgetLoad' /v2/budget/export: $ref: './paths/budget-files.yml#/budgetExport' /v2/sync: $ref: './paths/system.yml#/sync' /v2/server/version: $ref: './paths/system.yml#/serverVersion' /v2/lookup/{type}/{name}: $ref: './paths/system.yml#/lookupByName' # Non-versioned endpoints (no /v2 prefix) /login: $ref: './paths/authentication.yml#/loginForm' /logout: $ref: './paths/authentication.yml#/logoutForm' /oauth/authorize: $ref: './paths/oauth2.yml#/oauthAuthorize' /oauth/token: $ref: './paths/oauth2.yml#/oauthToken' /admin: $ref: './paths/admin.yml#/adminDashboard' /admin/oauth-clients: $ref: './paths/admin.yml#/adminOAuthClients' /admin/oauth-clients/{clientId}: $ref: './paths/admin.yml#/adminOAuthClientById' components: securitySchemes: bearerAuth: $ref: './components/securitySchemes.yml#/bearerAuth' auditBearer: $ref: './components/securitySchemes.yml#/auditBearer' schemas: Error: $ref: './components/schemas.yml#/Error' Success: $ref: './components/schemas.yml#/Success' Account: $ref: './components/schemas.yml#/Account' Transaction: $ref: './components/schemas.yml#/Transaction' Category: $ref: './components/schemas.yml#/Category' CategoryGroup: $ref: './components/schemas.yml#/CategoryGroup' Payee: $ref: './components/schemas.yml#/Payee' Tag: $ref: './components/schemas.yml#/Tag' Note: $ref: './components/schemas.yml#/Note' AccountGroup: $ref: './components/schemas.yml#/AccountGroup' Preferences: $ref: './components/schemas.yml#/Preferences' BudgetFile: $ref: './components/schemas.yml#/BudgetFile' ServerVersion: $ref: './components/schemas.yml#/ServerVersion' BatchBudgetOperation: $ref: './components/schemas.yml#/BatchBudgetOperation' Schedule: $ref: './components/schemas.yml#/Schedule' Rule: $ref: './components/schemas.yml#/Rule' AuthTokens: $ref: './components/schemas.yml#/AuthTokens' Balance: $ref: './components/schemas.yml#/Balance' CreateAccountRequest: $ref: './components/schemas.yml#/CreateAccountRequest' UpdateAccountRequest: $ref: './components/schemas.yml#/UpdateAccountRequest' CloseAccountRequest: $ref: './components/schemas.yml#/CloseAccountRequest' Metrics: $ref: './components/schemas.yml#/Metrics' MetricsSummary: $ref: './components/schemas.yml#/MetricsSummary'