---
title: "Add an account to the chart of accounts"
method: POST
path: "/chart-accounts"
tags: ["Chart of Accounts"]
---

# Add an account to the chart of accounts

`POST /chart-accounts`

## Request

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

Adds a custom account to the profile's Kontenplan, e.g. a liability account the default chart lacks (2270 Geschuldete Sozialversicherungen). The 4-digit code must match the type per Swiss Kontenrahmen KMU: 1xxx ASSET, 2000-2799 LIABILITY, 2800-2999 EQUITY, 3xxx REVENUE, 4xxx-7xxx EXPENSE. Codes are unique per profile. Permission `bookkeeping.create`; needs a read-write key.

## Request body

- ChartAccountWrite
  - `code` string, required: 4-digit account code; the range must match `type`
  - `name` string, required
  - `type` 'ASSET' | 'LIABILITY' | 'EQUITY' | 'REVENUE' | 'EXPENSE', required
  - `parentCode` string, nullable: Parent account code for grouping
  - `currency` '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.

## Response `201`

Account created

- ChartAccount
  - `id` string, uuid, required
  - `code` string, required: Swiss chart of accounts (Kontenplan KMU) account number
  - `name` string, required
  - `type` 'ASSET' | 'LIABILITY' | 'EQUITY' | 'REVENUE' | 'EXPENSE', required
  - `parentCode` string, nullable
  - `isSystem` boolean
  - `isActive` boolean
  - `currency` '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.
  - `createdAt` string, date-time
  - `balance` number, double, nullable: Only present when includeBalances=true (CHF)
  - `fwBalance` number, double, nullable: FW accounts with includeBalances=true only: the saldo in the account currency, over the requested fiscalYearId, else as of today over the fiscal year covering today (null when no year covers today).
  - `carryForwardMissing` boolean: FW accounts with includeBalances=true only: true when the previous fiscal year is still open, so the year holds no Saldovortrag and `balance` / `fwBalance` show only this year's movements.

## Other responses

- `400`: Validation error
- `401`: Invalid or missing API key
- `403`: Subscription required or read-only key on a write endpoint
- `409`: The code already exists for this profile (`DUPLICATE_ACCOUNT_CODE`)
- `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)
