---
title: "Delete a chart account"
method: DELETE
path: "/accounts/{accountId}"
tags: ["Accounting"]
---

# Delete a chart account

`DELETE /accounts/{accountId}`

## Request

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

Permanently deletes a chart account with no journal lines. A linked bank register must be empty (no bank transactions, statements, reconciliations, or live feed); removeEmptyRegister=true deletes it with the account, otherwise 409 code linked_register_empty. Registers with activity return 409 linked_register_has_activity; merge them instead. dryRun=true returns the account and register that would be deleted without saving.

## Path parameters

- `accountId` string, uuid, required

## Query parameters

- `dryRun` boolean
- `removeEmptyRegister` boolean

## Response `200`

Deleted, or the dry-run plan: account, register (or null), deleted

## Other responses

- `409`: Journal activity, a non-empty or unconfirmed linked register, or other records still use the account
- `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)
