---
title: "Add a bank feed"
method: POST
path: "/bank-feeds"
tags: ["Bank Feeds"]
---

# Add a bank feed

`POST /bank-feeds`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/bank-feeds`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

Gives one bank or card account its Bank Feeds card. Pass exactly one of: chartAccountId (any active asset or liability account in the Chart of Accounts; its register is reused or created, and no new chart account is made), an existing bankAccountId, or newAccount fields. mode tells the caller what comes next: bank opens bank sign-in for this account, files opens the CSV upload. A feed can be connected to a bank, used with files only, or both. Adding a feed that already shows is a no-op (alreadyExisted=true); adding a hidden feed shows it again.

## Request body

- object
  - `bankAccountId` string, uuid: Existing bank or card account
  - `chartAccountId` string, uuid: Existing active asset or liability Chart of Accounts account the feed posts to
  - `newAccount` object: Create a new bank or card account for the feed
    - `accountName` string, required
    - `accountNumber` string, nullable: Last four digits or masked number
    - `bankName` string, nullable
    - `accountType` 'checking' | 'savings' | 'credit_card' | 'cash' | 'loan' | 'investment' | 'other'
  - `mode` 'bank' | 'files', required

## Response `200`

{ bankAccountId, mode, createdAccount, alreadyExisted }

## Other responses

- `409`: bank_account_inactive: the account is inactive
- `default`: Error response

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
