---
title: "Categorize a bank transaction"
method: PATCH
path: "/v1/banking/transactions/{transactionId}/categorize"
tags: ["Banking"]
---

# Categorize a bank transaction

`PATCH /v1/banking/transactions/{transactionId}/categorize`

## Request

- Base URL: `https://api.frihet.io`
- URL: `https://api.frihet.io/v1/banking/transactions/{transactionId}/categorize`
- Auth: API key in header `X-API-Key`

Set the category (and optional notes) on a bank transaction.

## Path parameters

- `transactionId` string, required

## Request body

- BankCategorize
  - `category` string, required
  - `notes` string

## Response `200`

Transaction categorized

- object
  - `data` BankTransaction: A bank transaction. Positive amount = income, negative = expense.
    - `id` string
    - `connectionId` string: ID of the owning bank account (accountId).
    - `transactionId` string: Provider transaction ID (manual-* for API-created entries).
    - `date` string, date
    - `amount` number: Positive for income, negative for expenses.
    - `currency` string
    - `description` string
    - `reference` string, nullable
    - `category` string, nullable
    - `counterparty` object, nullable
      - `name` string
      - `accountNumber` string
      - `iban` string
    - `reconciled` boolean
    - `reconciledWith` 'invoice' | 'expense', nullable
    - `reconciledId` string, nullable
    - `reconciledAt` string, date-time, nullable
    - `status` 'raw' | 'recognized' | 'matched' | 'categorized' | 'excluded'
    - `source` string, nullable
    - `createdAt` string, date-time, nullable
    - `updatedAt` string, date-time, nullable

## Other responses

- `400`: Bad request - invalid parameters or request body
- `401`: Authentication required or invalid API key
- `404`: Resource not found
- `429`: Rate limit exceeded (100 requests per minute)

---

[API](https://skmtc.dev/frihet/apis/frihet-api.md) · [All operations](https://skmtc.dev/frihet/apis/frihet-api/llms.txt) · [OpenAPI document](https://skmtc.dev/frihet/apis/frihet-api/revisions/3dd37f6a72d1?raw)
