Frihet Banking API

Bank accounts, transactions, categorization, and read-only reconciliation helpers.

GitHub OpenAPI

Operations 7

GET /v1/banking/accounts List bank accounts #
GET /v1/banking/accounts/{accountId} Get bank account #
GET /v1/banking/transactions List bank transactions #
POST /v1/banking/transactions Create a bank transaction (manual entry) #
GET /v1/banking/transactions/{transactionId}/suggestions Get reconciliation suggestions #
PATCH /v1/banking/transactions/{transactionId}/categorize Categorize a bank transaction #
POST /v1/banking/transactions/{transactionId}/match Match a bank transaction to an invoice or expense #

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/frihet-io:frihet-io-banking-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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

frihet-io-banking-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Frihet Banking API
  version: '2026-03-18'
  description: 'The Frihet REST API provides programmatic access to your business data

    in Frihet, the AI-native business management platform for modern businesses. ## Authentication


    All API requests require an API key passed via the `X-API-Key` header. Generate keys from **Settings > API Keys** in the Frihet app. ```

    X-API-Key: fri_your_api_key_here

    ```


    ### API-key scopes


    A key without scopes (no list, or an empty one) is unrestricted. A key with a

    non-empty scope list gets only what the list grants. On such a key, every

    request other than `GET` and `HEAD` needs the `write` scope (or `*`), except

    the read-only `POST /v1/gestoria/aging` and the POS and purchase-order routes,

    which check their own `pos:` and `purchase-orders:` scopes. E-invoicing endpoints need an `einvoice:` scope,

    and the sends (`einvoice/export`, `face/submit`, `ticketbai/submit`) also need

    `write` or `einvoice:write`. A request without the scope it needs gets

    `403 Forbidden` with a `detail` naming that scope. The refusal happens before

    the idempotency gate, so it does not reserve the `Idempotency-Key`. `GET /v1/permissions/me` reports `denied.write`, `denied.einvoice` and

    `denied.einvoiceSend` for the calling key. Inventory (`/v1/inventory/*`) and purchase-order (`/v1/purchase-orders/*`) routes are

    not released yet: after the scope checks they answer `503` with code

    `INVENTORY_AUTHORITY_NOT_RELEASED`, before the idempotency gate. ## Rate Limiting


    The API enforces a rate limit of **100 requests per minute** per API key. When exceeded, the API returns `429 Too Many Requests` with an integer

    delta-seconds `Retry-After` header and matching `retryAfter` JSON field. Every authenticated response includes rate limit headers:


    | Header | Description |

    |--------|-------------|

    | `X-RateLimit-Limit` | Maximum requests per window (100) |

    | `X-RateLimit-Remaining` | Remaining requests in current window |

    | `X-RateLimit-Reset` | Unix timestamp (seconds) when the window resets |

    | `Retry-After` | Integer seconds until the window resets (429 responses) |


    ## Idempotency


    Most POST requests accept an `Idempotency-Key` header to prevent duplicate

    resource creation from network retries. For protected routes, the key is

    reserved against the operation *before* the request is executed, and it stays

    reserved for 24 hours unless released by an explicit pre-write refusal. ```

    Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000

    ```


    Keys must be at most 64 characters. We recommend UUID v4. A retry of the same operation gets one of three answers:


    | Situation | Response |

    |---|---|

    | The first request finished | The **original status and body**, verbatim, with `X-Idempotent-Replayed: true` |

    | The first request is still running, or its outcome could not be recorded | `409 IDEMPOTENCY_REQUEST_IN_PROGRESS` |

    | The key is live but was used for a **different** operation | `409 IDEMPOTENCY_KEY_REUSED` — the second operation is not executed |


    The replayed status is the **stored** one. A `201` replays as `201`, not `200`. This includes stored error responses: a request that answered `4xx` or `5xx`

    replays that same status and body, it does not re-execute — except explicit

    pre-mutation refusals on `POST /v1/pos/cash-sessions/{id}/close` (`503` when

    the workspace POS money-authority grant is not enabled and `403 POS_INACTIVE`

    before the POS app is activated), which release the reservation instead of

    caching the refusal for 24 hours. ### When a retry is refused


    A `409 IDEMPOTENCY_REQUEST_IN_PROGRESS` after the first request already

    returned means the outcome could not be recorded — the response was too large

    or unserializable, or the bookkeeping write failed. The API refuses rather than

    execute a second time, because for a fiscal document a duplicate is not

    recoverable. **Reconcile; do not simply retry with a fresh key.** Read the resource back

    (`GET` the collection, or look for the document the operation would have

    created) and decide from its actual state.'
  contact:
    name: Frihet API Support
    url: https://docs.frihet.io/desarrolladores/api-rest
    email: api@frihet.io
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  x-logo:
    url: https://frihet.io/logos/frihet-logo.svg
servers:
- url: https://api.frihet.io
  description: Production
security:
- ApiKeyAuth: []
tags:
- name: Banking
  description: Bank accounts, transactions, categorization, and read-only reconciliation helpers.
paths:
  /v1/banking/accounts:
    get:
      operationId: listBankAccounts
      summary: List bank accounts
      description: Returns the connected bank accounts (bank connections) for the workspace.
      tags:
      - Banking
      security:
      - ApiKeyAuth: []
      parameters:
      - name: provider
        in: query
        schema:
          type: string
      - name: isActive
        in: query
        schema:
          type: boolean
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0
          default: 0
      responses:
        '200':
          description: List of bank accounts
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/BankAccount'
                  total:
                    type: integer
                  limit:
                    type: integer
                  offset:
                    type: integer
                  hasMore:
                    type: boolean
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
  /v1/banking/accounts/{accountId}:
    get:
      operationId: getBankAccount
      summary: Get bank account
      description: Returns a single bank account (connection) by ID.
      tags:
      - Banking
      security:
      - ApiKeyAuth: []
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Bank account
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BankAccount'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
  /v1/banking/transactions:
    get:
      operationId: listBankTransactions
      summary: List bank transactions
      description: Returns bank transactions for the workspace. Filter by account, date range, status, or category.
      tags:
      - Banking
      security:
      - ApiKeyAuth: []
      parameters:
      - name: accountId
        in: query
        description: Filter by bank account (connection) ID.
        schema:
          type: string
      - name: from
        in: query
        description: Start date (ISO YYYY-MM-DD).
        schema:
          type: string
          format: date
      - name: to
        in: query
        description: End date (ISO YYYY-MM-DD).
        schema:
          type: string
          format: date
      - name: status
        in: query
        schema:
          type: string
          enum:
          - raw
          - recognized
          - matched
          - categorized
          - excluded
      - name: category
        in: query
        schema:
          type: string
      - name: reconciled
        in: query
        schema:
          type: boolean
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0
          default: 0
      responses:
        '200':
          description: List of bank transactions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/BankTransaction'
                  total:
                    type: integer
                  limit:
                    type: integer
                  offset:
                    type: integer
                  hasMore:
                    type: boolean
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      operationId: createBankTransaction
      summary: Create a bank transaction (manual entry)
      description: 'Manually create a bank transaction. The transaction is attached to the

        account identified by accountId (which must belong to your workspace).

        Reconciliation state is force-initialised (reconciled=false, status=raw);

        a caller cannot create an already-reconciled transaction.'
      tags:
      - Banking
      security:
      - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankTransactionCreate'
      responses:
        '201':
          description: Transaction created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BankTransaction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/WriteScopeForbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
  /v1/banking/transactions/{transactionId}/suggestions:
    get:
      operationId: getBankTransactionSuggestions
      summary: Get reconciliation suggestions
      description: 'Read-only ranked reconciliation candidates for a bank transaction.

        This endpoint does not mutate the transaction, invoices, expenses,

        ledger entries, or reconciled fields.'
      tags:
      - Banking
      security:
      - ApiKeyAuth: []
      parameters:
      - name: transactionId
        in: path
        required: true
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 10
          default: 5
      responses:
        '200':
          description: Read-only reconciliation suggestions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      transactionId:
                        type: string
                      limit:
                        type: integer
                      suggestions:
                        type: array
                        items:
                          $ref: '#/components/schemas/ReconciliationSuggestion'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
  /v1/banking/transactions/{transactionId}/categorize:
    patch:
      operationId: categorizeBankTransaction
      summary: Categorize a bank transaction
      description: Set the category (and optional notes) on a bank transaction.
      tags:
      - Banking
      security:
      - ApiKeyAuth: []
      parameters:
      - name: transactionId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankCategorize'
      responses:
        '200':
          description: Transaction categorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BankTransaction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/WriteScopeForbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
  /v1/banking/transactions/{transactionId}/match:
    post:
      operationId: matchBankTransaction
      summary: Match a bank transaction to an invoice or expense
      description: 'Link a bank transaction to an invoice or expense in your workspace

        (status becomes ''matched''). This records the match WITHOUT posting ledger

        (GL) entries — full GL reconciliation is performed in the supervised app

        flow. Fails with 409 if the transaction is already matched/reconciled.'
      tags:
      - Banking
      security:
      - ApiKeyAuth: []
      parameters:
      - name: transactionId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankMatch'
      responses:
        '200':
          description: Transaction matched
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BankTransaction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/WriteScopeForbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: Transaction already matched/reconciled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  responses:
    RateLimited:
      description: Rate limit exceeded (100 requests per minute)
      headers:
        Retry-After:
          description: Integer seconds until the current rate-limit window resets
          schema:
            type: integer
            minimum: 1
          example: 60
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Rate limit exceeded
              message:
                type: string
                example: Maximum 100 requests per minute
              retryAfter:
                type: integer
                description: Seconds until rate limit resets
                example: 60
              meta:
                type: object
                properties:
                  requestId:
                    type: string
    WriteScopeForbidden:
      description: Write scope required to mutate, send or submit. The API key must include the `write` scope (or `einvoice:write` for e-invoice sends) or be unrestricted.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Forbidden
            detail: This API key does not have the write scope required to create, update, delete, send or submit. E-invoice sends also accept einvoice:write. Use an API key with write access.
            meta:
              requestId: 550e8400-e29b-41d4-a716-446655440000
    BadRequest:
      description: Bad request - invalid parameters or request body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Validation error
            details:
            - code: invalid_type
              message: Required
              path:
              - clientName
            meta:
              requestId: 550e8400-e29b-41d4-a716-446655440000
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Resource not found
            meta:
              requestId: 550e8400-e29b-41d4-a716-446655440000
    Unauthorized:
      description: Authentication required or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid or expired API key
            meta:
              requestId: 550e8400-e29b-41d4-a716-446655440000
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal server error
            meta:
              requestId: 550e8400-e29b-41d4-a716-446655440000
  schemas:
    BankTransactionCreate:
      type: object
      required:
      - accountId
      - amount
      - date
      - description
      properties:
        accountId:
          type: string
          description: ID of the bank account (connection) to attach the transaction to. Must belong to your workspace.
        amount:
          type: number
          description: Non-zero. Positive for income, negative for expenses.
        date:
          type: string
          format: date
          description: ISO date (YYYY-MM-DD).
        description:
          type: string
          minLength: 1
          maxLength: 2000
        currency:
          type: string
          minLength: 3
          maxLength: 3
          description: ISO 4217 code. Defaults to the account currency or EUR.
        reference:
          type: string
          maxLength: 500
        category:
          type: string
          maxLength: 200
        counterparty:
          type: object
          properties:
            name:
              type: string
            accountNumber:
              type: string
            iban:
              type: string
          required:
          - name
    BankTransaction:
      type: object
      description: A bank transaction. Positive amount = income, negative = expense.
      properties:
        id:
          type: string
        connectionId:
          type: string
          description: ID of the owning bank account (accountId).
        transactionId:
          type: string
          description: Provider transaction ID (manual-* for API-created entries).
        date:
          type: string
          format: date
        amount:
          type: number
          description: Positive for income, negative for expenses.
        currency:
          type: string
        description:
          type: string
        reference:
          type: string
          nullable: true
        category:
          type: string
          nullable: true
        counterparty:
          type: object
          nullable: true
          properties:
            name:
              type: string
            accountNumber:
              type: string
            iban:
              type: string
        reconciled:
          type: boolean
        reconciledWith:
          type: string
          enum:
          - invoice
          - expense
          nullable: true
        reconciledId:
          type: string
          nullable: true
        reconciledAt:
          type: string
          format: date-time
          nullable: true
        status:
          type: string
          enum:
          - raw
          - recognized
          - matched
          - categorized
          - excluded
        source:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
    BankCategorize:
      type: object
      required:
      - category
      properties:
        category:
          type: string
          minLength: 1
          maxLength: 200
        notes:
          type: string
          maxLength: 2000
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: Optional machine-readable code, including MISSING_FISCAL_INFO, AEAT_QR_UNAVAILABLE (422) and AEAT_RECORD_IRREPRODUCIBLE (409) on invoice PDF.
        message:
          type: string
          description: Optional explanatory message accompanying the error code.
        details:
          type: array
          description: Validation error details (Zod issues). Only present on 400 validation errors.
          items:
            type: object
            properties:
              code:
                type: string
              message:
                type: string
              path:
                type: array
                items:
                  type: string
        meta:
          type: object
          properties:
            requestId:
              type: string
              description: Unique request identifier for tracing
    BankAccount:
      type: object
      description: A connected bank account (backed by the bankConnections collection).
      properties:
        id:
          type: string
        provider:
          type: string
          nullable: true
          description: saltedge | tink | truelayer | yodlee | revolut | manual
        bankName:
          type: string
          nullable: true
        accountName:
          type: string
          nullable: true
        accountNumber:
          type: string
          nullable: true
          description: Last 4 digits for display.
        iban:
          type: string
          nullable: true
          description: Masked IBAN.
        currency:
          type: string
          nullable: true
        isActive:
          type: boolean
        lastSyncAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
    BankMatch:
      type: object
      required:
      - documentId
      - documentType
      properties:
        documentId:
          type: string
          description: ID of the invoice or expense to match. Must belong to your workspace.
        documentType:
          type: string
          enum:
          - invoice
          - expense
        notes:
          type: string
          maxLength: 2000
    ReconciliationSuggestion:
      type: object
      properties:
        documentType:
          type: string
          enum:
          - invoice
          - expense
        documentId:
          type: string
        score:
          type: integer
          minimum: 0
          maximum: 100
        confidence:
          type: integer
          minimum: 0
          maximum: 100
        suggested:
          type: boolean
        amountDiff:
          type: number
        dateDiff:
          type: number
        reasons:
          type: array
          items:
            type: string
        breakdown:
          type: array
          items:
            type: object
            properties:
              signal:
                type: string
                enum:
                - amount
                - date
                - reference
                - counterparty
              points:
                type: integer
              similarity:
                type: number
                minimum: 0
                maximum: 1
              reason:
                type: string
  headers:
    X-RateLimit-Reset:
      description: Unix timestamp (seconds) when the rate limit window resets
      schema:
        type: integer
        example: 1742310060
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key for authentication. Keys start with `fri_` prefix.

        Generate keys from Settings > API Keys in the Frihet app.

        '