---
title: "Create a bank account"
method: POST
path: "/bank-accounts"
tags: ["Bank Accounts"]
---

# Create a bank account

`POST /bank-accounts`

## Request

- Base URL: `https://api.lumabill.ch/v1`
- URL: `https://api.lumabill.ch/v1/bank-accounts`
- Auth: HTTP bearer

## Request body

- BankAccountWrite: On PUT, include `id` in the body. All fields other than `id` are optional on PUT.
  - `name` string, required
  - `iban` string, nullable
  - `bankName` string, nullable
  - `currency` 'CHF' | 'EUR' | 'USD' | 'GBP' | 'JPY' | 'CAD' | 'AUD' | 'SEK' | 'NOK' | 'DKK' | 'HUF', required: ISO 4217 code of a currency the API converts (ESTV/BAZG rates). The same list applies to every currency field of the API.
  - `chartAccountId` string, uuid, nullable: Linked chart-of-accounts posting account used when booking this bank account's transactions.
  - `type` 'BANK' | 'CASH'
  - `isActive` boolean
  - `confirmPostingAccountChange` boolean: PUT only. Must be true to change `chartAccountId` when the bank account already has booked transactions; otherwise the request is rejected with 409 POSTING_ACCOUNT_HAS_BOOKINGS. Existing bookings stay on the old account; only new bookings use the new one.

## Response `201`

Bank account created

- BankAccount
  - `id` string, uuid, required
  - `name` string, required
  - `iban` string, nullable
  - `bic` string, nullable
  - `currency` 'CHF' | 'EUR' | 'USD' | 'GBP' | 'JPY' | 'CAD' | 'AUD' | 'SEK' | 'NOK' | 'DKK' | 'HUF', required: ISO 4217 code of a currency the API converts (ESTV/BAZG rates). The same list applies to every currency field of the API.
  - `chartAccountId` string, uuid, nullable: Posting account of this bank account
  - `chartAccountCurrency` 'CHF' | 'EUR' | 'USD' | 'GBP' | 'JPY' | 'CAD' | 'AUD' | 'SEK' | 'NOK' | 'DKK' | 'HUF': ISO 4217 code of a currency the API converts (ESTV/BAZG rates). The same list applies to every currency field of the API.
  - `bank_name` string, nullable
  - `account_number` string, nullable: Chart-of-accounts account number linked to this bank account
  - `created_at` string, date-time, required

## Other responses

- `400`: Validation error
- `401`: Invalid or missing API key
- `403`: Subscription required or read-only key on a write endpoint
- `429`: Rate limit exceeded
- `500`: Internal server error

---

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