Welcome to AI2Fin API
The AI2Fin API provides endpoints for financial management, transaction processing, bill automation, and AI-powered tax optimization.OpenAPI Specification
View the complete OpenAPI 3.1 specification
Quick Start
Authentication Methods
AI2Fin API supports two authentication methods:- Bearer Token (OAuth)
- API Key
Authenticates the REST API (
/api/...) and the main MCP endpoint (/mcp)Method 1: Bearer Token (OAuth Login)
All API endpoints (except registration and login) require authentication. Sign in to receive a bearer token, then send it in theAuthorization header on every request.
Method 2: API Key
API keys authenticate the MCP Inspector endpoint (/mcp/inspector) — the development and testing surface for exploring AI2Fin’s MCP tools. They are ideal for:
- Exploring MCP tools with the MCP Inspector
- Testing and development against
/mcp/inspector
API keys work only on the MCP Inspector endpoint. The REST API (
/api/...) and the main MCP endpoint (/mcp) authenticate with an OAuth bearer token. Building a custom integration or webhook flow? The Integration API lets you create transactions and expenses and receive signed webhooks.Create API Key
Generate a new API key from the AI2Fin dashboard.
Default Scope: If you don’t specify
scopes, the key defaults to ["mcp:full"].X-API-Key header on requests to the MCP Inspector endpoint:
mcp:read- Read-only MCP operationsmcp:tools:list- List available toolsmcp:tools:call- Execute tools (read-only)mcp:resources:read- Read resourcesmcp:full- Full MCP access (read + write)
Connecting an MCP client
AI2Fin exposes a Model Context Protocol (MCP) endpoint athttps://api.ai2fin.com/mcp so assistants like ChatGPT, Claude, and Cursor can work with your financial data securely. Assistants connect via OAuth — you sign in, approve access, and the assistant uses standard JSON-RPC methods such as tools/list and tools/call on your behalf. See MCP authentication for the full setup, and use the /mcp/inspector endpoint with an API key when developing or testing.
API Features
Bank Transactions
Import, categorize, and manage bank transactions with CSV upload support
AI Classification
Intelligent transaction categorization with tax deduction analysis
Smart Categories (Elite+)
Category sets, multi-category assignments, and transaction history tracking
Bill Automation
Recurring bill patterns with automatic occurrence generation
Custom Rules
Create automation rules with conditions and actions for any entity
Tax Reports
Tax-ready exports with GST/VAT calculations included
Analytics
Real-time financial summaries and insights
AI Assistant Chat APIs
Use the chat endpoints to power the in-app assistant, automate financial workflows, and ingest receipts securely. See the AI Assistant guide for user experience details.| Method | Endpoint | Purpose |
|---|---|---|
POST | /api/chat/message | Send a message and receive an AI response with tool usage metadata |
GET | /api/chat/conversations | List conversations for the authenticated user |
POST | /api/chat/conversations | Create a new conversation thread |
GET | /api/chat/conversations/:id | Fetch the full message history and tool calls |
POST | /api/chat/upload | Upload files (receipts, invoices, spreadsheets) for analysis |
GET | /api/chat/files/:userId/:fileName | Retrieve stored attachments with access control |
GST & Tax APIs
These endpoints provide localized GST/VAT/Sales Tax rate lookup and accurate tax calculations for transactions. They power the User Preferences and Transaction Management experiences.| Method | Endpoint | Purpose |
|---|---|---|
GET | /api/tax/country-rates | List active tax rates grouped by country |
GET | /api/tax/rates/:countryCode | Get the tax profile for a country code (e.g. AU, GB) |
POST | /api/tax/calculate | Calculate the tax amount for a tax-inclusive or tax-exclusive price |
Core Concepts
Data Scoping
Every API request is scoped to the authenticated user. You can only ever read and write your own data — accounts are isolated from one another.Pagination
List endpoints support pagination with standard query parameters:page: Page number (default: 1)limit: Items per page (default: 50, max: 200)
Rate Limiting
The API is rate limited to keep the platform fast and reliable for everyone. Limits scale with your subscription tier, with higher allowances on paid and Enterprise plans. If you exceed your limit, the API responds with429 Too Many Requests — pause briefly and retry.
Each response includes standard X-RateLimit-* headers so your client can see its remaining allowance and when it resets.
Error Handling
All errors follow a consistent format:200- Success201- Created400- Bad Request (validation error)401- Unauthorized (missing/invalid token)403- Forbidden (insufficient permissions)404- Not Found429- Rate Limited500- Internal Server Error
Advanced Features
Custom Rules Engine
Create powerful automation rules with:- Multiple condition types (contains, equals, regex, etc.)
- Flexible actions (set category, tax flags, etc.)
- Priority-based execution
- Support for transactions, bills, expenses, and patterns
GST/VAT Calculations
Built-in support for both tax-inclusive and tax-exclusive amounts. Send a price and a country, and the API returns the tax, the pre-tax subtotal, and the rate applied — ready to display or store against a transaction.AI-Powered Features
- Smart Categorization: Transactions are sorted into the right categories automatically
- Tax Analysis: Likely deductions are surfaced for you to review
- Pattern Recognition: Recurring bills and subscriptions are detected
- Intelligent Search: Ask questions in plain language across all your data
Access Control
- Bearer token authentication for the REST API and the main MCP endpoint (from OAuth login)
- API key authentication for the MCP Inspector endpoint (
/mcp/inspector) - Per-account data isolation — you only ever access your own records
- Activity is logged to support compliance and account security
Authorization: Bearer <YOUR_TOKEN>- OAuth bearer token for the REST API and/mcpX-API-Key: <YOUR_API_KEY>- API key for/mcp/inspectoronly
Webhooks
Get notified the moment activity happens in your account. Three events are available today:transaction.categorized— a transaction you added reaches its final categorised stateexpense.created— an expense is created (manually or through the Integration API)receipt.processed— a receipt is committed and linked
Data synced from connected bank feeds is never included in webhook payloads — webhooks carry only data you added yourself (manual entries, CSV imports, API-created records, and receipts you upload).
Integrations, webhooks & iPaaS
The full webhooks and Integration API reference — events, payloads, signatures, and Zapier/Make recipes.
Calling the API
The AI2Fin REST API works with any HTTP client. Authenticate with an OAuth bearer token, then call the JSON endpoints directly.Official SDKs — coming soon. First-party client libraries are planned to make integration even faster. In the meantime, the REST and MCP endpoints above work with any standard HTTP or MCP client.
Support
- Documentation: https://docs.ai2fin.com
- Status Page: https://status.ai2fin.com
