---
title: "Sync settled activity from an external assistant"
method: POST
path: "/bank-transactions/external-sync"
tags: ["Banking"]
---

# Sync settled activity from an external assistant

`POST /bank-transactions/external-sync`

## Request

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

Atomically maps an external account to an existing register and upserts by stable source and transaction IDs. Signed integer cents: money in positive, money out negative. Retries do not duplicate activity. Posted/reconciled corrections or removals return 409 without changing the batch. The assistant owns its provider connection; no provider credentials are accepted.

## Request body

- object
  - `bankAccountId` string, uuid, required
  - `source` string, required
  - `externalAccountId` string, required
  - `connectionStatus` 'connected' | 'attention' | 'disconnected'
  - `transactions` object[]
    - `externalId` string, required
    - `date` string, date, required
    - `description` string, required
    - `amountCents` integer, required
  - `removedExternalIds` string[]

## Response `200`

Sync receipt with inserted, updated, unchanged, removed counts; transaction IDs; connection status; rule application outcome

## Other responses

- `409`: Mapping conflict or posted activity requires review
- `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)
