---
title: "Delete Ledger Account"
method: DELETE
path: "/ledger-accounts/{ledger_id}"
tags: ["accounting-settings"]
---

# Delete Ledger Account

`DELETE /ledger-accounts/{ledger_id}`

## Request

- Base URL: `https://app.zeno-works.ch` (the document declares no server; this is the origin it was published from)
- URL: `https://app.zeno-works.ch/ledger-accounts/{ledger_id}`
- Auth: none declared

Delete a ledger account (accountant, scoped). 409 if it has journal lines.

Deletes one fiscal year's ``gl_account`` row; the delete is guarded by
``account_has_journal_lines`` (409 ``ConflictError`` if the account is posted to).
Returns the deleted row.

## Path parameters

- `ledger_id` string, required

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Response `200`

Successful Response

- LedgerAccountResponse: ``POST/PUT /ledger-accounts/{id}`` → ``{"ledger_account": ...}``.
  - `ledger_account` LedgerAccountOut, required: One chart-of-accounts row.
    - `id` string, required
    - `company_id` string, required
    - `fiscal_year` integer, required
    - `account_number` string, required
    - `account_name` string, nullable
    - `category` 'asset' | 'liability' | 'equity' | 'income' | 'expense' | 'tax' | 'other' | 'unknown', required: The account-type axis of a ledger account (Swiss-KMU chart of accounts). Distinct from — but derived from — ``LineRole`` (the journal-line semantic role). ``unknown`` is the conservative default when classification can't decide; ``other`` covers genuinely ambiguous / closing (9xxx) accounts.
    - `is_profit_loss` boolean, required
    - `is_contra` boolean
    - `is_intentional` boolean
    - `account_number_guess` string, nullable
    - `first_seen_date` string, date, nullable
    - `last_seen_date` string, date, nullable
    - `journal_usage_count` integer, required
    - `sources` string[]
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

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