AI2Fin Authentication API

User authentication and authorization

Operations 7

POST /api/enterprise-auth/register Register new user #
POST /api/enterprise-auth/login Login user #
GET /api/auth/me Get current user profile #
POST /api/api-keys Create API Key (User) #
GET /api/api-keys List User API Keys #
POST /api/admin/api-keys Generate API Key #
GET /api/admin/api-keys List API Keys #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ai2fin-com:ai2fin-com-authentication-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ai2fin-com-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AI2Fin Financial Management Authentication API
  description: Financial management platform with AI-powered categorization, tax optimization, and bill management.
  version: 1.0.0
  contact:
    name: AI2Fin Support
    url: https://ai2fin.com
  license:
    name: Proprietary
servers:
- url: https://api.ai2fin.com
  description: Production
- url: http://localhost:3001
  description: Local Development
security:
- bearerAuth: []
- cookieAuth: []
tags:
- name: Authentication
  description: User authentication and authorization
paths:
  /api/enterprise-auth/register:
    post:
      tags:
      - Authentication
      summary: Register new user
      description: Create a new user account with email and password. (Legacy path /api/auth/register returns HTTP 410 — use this path instead.)
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              - password
              - firstName
              - lastName
              properties:
                email:
                  type: string
                  format: email
                  example: user@example.com
                password:
                  type: string
                  format: password
                  minLength: 8
                  example: SecurePass123!
                firstName:
                  type: string
                  example: John
                lastName:
                  type: string
                  example: Smith
                businessType:
                  type: string
                  enum:
                  - business
                  - individual
                  - company
                  - trust
                  default: business
                countryCode:
                  type: string
                  example: AU
                  default: AU
      responses:
        '201':
          description: User registered successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '400':
          description: Invalid input or user already exists
      operationId: postApiEnterpriseAuthRegister
      x-operation-id-source: derived
  /api/enterprise-auth/login:
    post:
      tags:
      - Authentication
      summary: Login user
      description: Authenticate user and receive JWT token. (Legacy path /api/auth/login returns HTTP 410 — use this path instead.)
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              - password
              properties:
                email:
                  type: string
                  format: email
                password:
                  type: string
                  format: password
      responses:
        '200':
          description: Login successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '401':
          description: Invalid credentials
      operationId: postApiEnterpriseAuthLogin
      x-operation-id-source: derived
  /api/auth/me:
    get:
      tags:
      - Authentication
      summary: Get current user profile
      description: Retrieve authenticated user information
      responses:
        '200':
          description: User profile retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  user:
                    $ref: '#/components/schemas/User'
                  authenticated:
                    type: boolean
      operationId: getApiAuthMe
      x-operation-id-source: derived
  /api/api-keys:
    post:
      tags:
      - Authentication
      summary: Create API Key (User)
      description: Create a new API key for the authenticated user. Users can create keys for themselves with safe default scopes. Defaults to mcp:full scope if not specified. API key is only shown once - save it immediately.
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              properties:
                name:
                  type: string
                  example: My MCP Integration
                scopes:
                  type: array
                  items:
                    type: string
                    enum:
                    - mcp:read
                    - mcp:tools:list
                    - mcp:tools:call
                    - mcp:resources:read
                    - mcp:full
                  default:
                  - mcp:full
                  description: Scopes for the API key. Defaults to mcp:full. Admin scope (*) is not allowed for user-created keys.
                expiresInDays:
                  type: integer
                  default: 90
                  minimum: 1
                  maximum: 365
                  example: 90
      responses:
        '201':
          description: API key created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  key:
                    type: string
                    description: API key - only shown once! Save immediately.
                  name:
                    type: string
                  scopes:
                    type: array
                    items:
                      type: string
                  expiresAt:
                    type: string
                  createdAt:
                    type: string
                  warning:
                    type: string
                    example: Save this key now - it will not be shown again!
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - Admin scope not allowed for user-created keys
      operationId: postApiApiKeys
      x-operation-id-source: derived
    get:
      tags:
      - Authentication
      summary: List User API Keys
      description: List all API keys for the authenticated user
      security:
      - bearerAuth: []
      responses:
        '200':
          description: List of user's API keys
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    scopes:
                      type: array
                      items:
                        type: string
                    isActive:
                      type: boolean
                    expiresAt:
                      type: string
                    lastUsedAt:
                      type: string
                    createdAt:
                      type: string
        '401':
          description: Unauthorized - Authentication required
      operationId: getApiApiKeys
      x-operation-id-source: derived
  /api/admin/api-keys:
    post:
      tags:
      - Authentication
      summary: Generate API Key
      description: Generate an API key for the MCP Inspector endpoint (/mcp/inspector). Requires admin authentication. API keys carry mcp:* scopes and are not accepted on the REST API. API key is only shown once - save it immediately.
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              - scopes
              properties:
                name:
                  type: string
                  example: MCP Inspector - Production
                scopes:
                  type: array
                  items:
                    type: string
                    enum:
                    - mcp:read
                    - mcp:tools:list
                    - mcp:tools:call
                    - mcp:resources:read
                    - mcp:full
                    - '*'
                  example:
                  - mcp:read
                  - mcp:tools:list
                expiresInDays:
                  type: integer
                  default: 90
                  example: 90
      responses:
        '201':
          description: API key created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      key:
                        type: string
                        description: API key - only shown once!
                      scopes:
                        type: array
                        items:
                          type: string
                      expiresAt:
                        type: string
                      createdAt:
                        type: string
        '401':
          description: Unauthorized - Admin access required
      operationId: postApiAdminApiKeys
      x-operation-id-source: derived
    get:
      tags:
      - Authentication
      summary: List API Keys
      description: List all API keys for the authenticated user (admin access required)
      security:
      - bearerAuth: []
      responses:
        '200':
          description: List of API keys
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        scopes:
                          type: array
                        expiresAt:
                          type: string
                        createdAt:
                          type: string
                        lastUsedAt:
                          type: string
      operationId: getApiAdminApiKeys
      x-operation-id-source: derived
components:
  schemas:
    AuthResponse:
      type: object
      properties:
        success:
          type: boolean
        token:
          type: string
        user:
          $ref: '#/components/schemas/User'
    User:
      type: object
      properties:
        id:
          type: string
          format: uuid
        email:
          type: string
          format: email
        firstName:
          type: string
        lastName:
          type: string
        businessType:
          type: string
          enum:
          - business
          - individual
          - company
          - trust
        countryCode:
          type: string
          example: AU
        emailVerified:
          type: boolean
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: First-party access token for your own signed-in session, obtained from the /api/enterprise-auth/login endpoint. The REST API returns your own account data to you — it is a first-party consumer surface, not a third-party integration channel. Data from connected bank feeds (open-banking / CDR data) is your own data, returned only to you in your own authenticated session.
    cookieAuth:
      type: apiKey
      in: cookie
      name: ai2_sess
      description: Session cookie for web applications
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key for the MCP Inspector endpoint (/mcp/inspector) only. Generate your own key via /api/api-keys. Format: mcp_<64 hex characters>. API keys carry mcp:* scopes and authenticate MCP Inspector operations — they are not accepted on the REST API (/api/...) or the main MCP endpoint (/mcp), which use OAuth bearer tokens.'