---
title: "Remove confirmed duplicate posted transactions"
method: POST
path: "/bank-transactions/remove-duplicates"
tags: ["Banking"]
---

# Remove confirmed duplicate posted transactions

`POST /bank-transactions/remove-duplicates`

## Request

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

One user approval covers undoing the identified duplicate journals and excluding their source rows. Each pair is atomic and safely retryable; the retained posting and completed reconciliation remain unchanged. Requires bank_transactions:read_write plus manage:banking and void:entries permissions. Reconciled duplicates, shared journals, mismatched accounts/amounts/currencies, changed retained entries and closed fiscal years are protected. Matching date/amount alone is not duplicate evidence.

## Request body

- object
  - `pairs` object[], required
    - `duplicateTransactionId` string, uuid, required: Exact approved unreconciled posted duplicate to remove
    - `keepTransactionId` string, uuid, required: Valid posted transaction to preserve
  - `reason` string, required: Statement/source evidence establishing duplication
  - `confirm` true, required: User approved removal of these exact duplicates, including undo and exclusion

## Response `200`

Per-pair result: removed, already_removed or blocked. requested/removed/alreadyRemoved/failed counts and receipts; HTTP 200 does not imply all pairs succeeded.

- object
  - `requested` integer, required
  - `removed` integer, required
  - `alreadyRemoved` integer, required
  - `failed` integer, required
  - `results` object[], required
    - `duplicateTransactionId` string, uuid, required
    - `keepTransactionId` string, uuid, required
    - `status` 'removed' | 'already_removed' | 'blocked', required
    - `amountCents` integer: Signed original duplicate amount in cents; present for newly removed rows
    - `currencyCode` string
    - `voidedJournalEntryId` string, uuid
    - `reason` string
  - `guidance` string

## Other responses

- `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)
