---
title: "Map a connected account to a register"
method: POST
path: "/plaid/accounts/{plaidAccountId}/map"
tags: ["Bank Feeds"]
---

# Map a connected account to a register

`POST /plaid/accounts/{plaidAccountId}/map`

## Request

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

Points a connected Plaid account at an existing LedgerHQ bank account, or creates one on the fly. An account publishes feed activity only when import-enabled and mapped.

## Path parameters

- `plaidAccountId` string, uuid, required

## Request body

- union
  - object
    - `bankAccountId` string, uuid, required
    - `replaceExternalActivity` boolean: Owner confirmed replacement of assistant activity with the LedgerHQ feed
    - `importStartDate` string, date: First native feed date, strictly after existing assistant activity; required for source replacement
    - `expectedBankAccountId` string, uuid, nullable: Register the caller last saw mapped (null = unmapped). A different current mapping returns 409 mapping_changed and saves nothing.
  - object
    - `create` object, required: Create the register (and a linked bank/credit-card chart account named after the connection) server-side. All fields optional.
      - `accountName` string
      - `currencyCode` string
    - `confirmNewRegister` boolean: Create a new register even though an existing unfed register has the same last four digits. Without it that case returns 409 possible_existing_register with candidates.
    - `expectedBankAccountId` string, uuid, nullable: Register the caller last saw mapped (null = unmapped). A different current mapping returns 409 mapping_changed and creates nothing.

## Response `200`

Mapping saved

- object
  - `plaidAccountId` string, uuid
  - `bankAccountId` string, uuid

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