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:- JWT Token (OAuth)
- API Key
Standard authentication for web and mobile apps
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 are ideal for:- MCP integrations
- Server-to-server automation
- Custom integrations and webhooks
- Testing and development
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 or the Authorization: Bearer header.
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 so AI assistants and automation clients can work with your financial data securely. Authenticate with an API key, then use standard JSON-RPC methods such astools/list and tools/call.
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 user sessions (from OAuth login)
- API key authentication for server-to-server and automation
- Per-account data isolation — you only ever access your own records
- Activity is logged to support compliance and account security
Authorization: Bearer <YOUR_TOKEN>- bearer token from OAuth login or an API keyX-API-Key: <YOUR_API_KEY>- API key (recommended for MCP)
Webhooks
Subscribe to real-time events:- Transaction imported
- Bill due soon
- Pattern detected
- Rule executed
Webhook support is available on Professional and Enterprise plans.
Calling the API
The AI2Fin REST API works with any HTTP client. Authenticate with a bearer token or an API key, 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
