---
title: "Point a Plaid connection at the account it feeds"
method: POST
path: "/api/v1/banking/plaid/link"
tags: ["Money"]
---

# Point a Plaid connection at the account it feeds

`POST /api/v1/banking/plaid/link`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/banking/plaid/link`
- Auth: API key in cookie `better-auth.session_token`

Checks the account is one Plaid actually shares and is in the same currency, then turns the portfolio account’s own feed into a bank feed rather than adding a second one. Linking the same pair again changes nothing; re-pointing either side of an existing pair is refused until it is disconnected, so nothing is left reading, or billed, without the owner knowing. Where both sides carry an IBAN and they differ, the pair is refused unless `correctIban` writes the bank’s onto the portfolio account, with an audit line; an account Plaid shares without an IBAN is paired on the owner’s own choice. While bank accounts are charged, a pair that adds an account takes an owner on screen and a plan in trial or active, and one past the accounts the plan includes also takes `agreed` at the team’s current price. Owners only.

## Request body

- object
  - `connectionId` string, required: Stable record id, e.g. `lse_012`.
  - `bankAccountId` string, required: The account in the portfolio.
  - `externalAccountId` string, required: Plaid’s own id for the account, from `/plaid/exchange`.
  - `correctIban` boolean: Where the two IBANs differ, true writes the bank’s IBAN onto the portfolio account, with an audit line, and links them.
  - `agreed` object
    - `priceId` string, required
    - `unitAmount` number, required
    - `currency` string, required

## Response `200`

The pair, and the feed it wrote.

- object
  - `ok` unknown, required
  - `data` object, required
    - `connectionId` string, required: Stable record id, e.g. `lse_012`.
    - `bankFeedId` string, required: Stable record id, e.g. `lse_012`.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `400`: The bank does not share that account, or the currencies differ, or the two IBANs do.
- `404`: No such connection or bank account on this team.
- `409`: Either side is already connected to something else, or the plan connects no more bank accounts.

---

[API](https://skmtc.dev/dardaris/apis/dardaris-api.md) · [All operations](https://skmtc.dev/dardaris/apis/dardaris-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dardaris/apis/dardaris-api/revisions/4aff33835c73?raw)
