---
title: "Begin a Plaid connection for one account"
method: POST
path: "/api/v1/banking/plaid/link-token"
tags: ["Money"]
---

# Begin a Plaid connection for one account

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

## Request

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

Mints the short-lived token Plaid Link opens on. The token reaches no account of its own: the owner signs in at their bank inside Plaid’s own widget and what comes back to the browser is a public token worth one exchange, which `/plaid/exchange` turns into something that reads. Where the linkability check named the bank, Link opens on it rather than on a search box. `connectionId` puts the owner back into a bank that needs them instead of adding a second connection, and asks for no new consent. While bank accounts are charged, connecting an account this team does not read yet takes an owner on screen and a plan in trial or active; the price of one past the accounts the plan includes is agreed at `/plaid/link`. Nothing is connected by calling this. Owners only.

## Request body

- object
  - `bankAccountId` string: The account in the portfolio the owner is connecting. Left out when they picked a bank from the list and the account will be made from what that bank shares.
  - `bankId` string: The bank they picked, from `/banking/banks`. Link then opens on it rather than on a search box.
  - `connectionId` string: Set to put the owner back into a bank that needs them, rather than adding a connection.

## Response `200`

What Link opens on.

- object
  - `ok` unknown, required
  - `data` object, required
    - `linkToken` string, required: Hand this to Plaid Link in the browser. It expires within hours and opens nothing on its own.
    - `expiration` string, required: When the token stops working, as an ISO timestamp.
    - `institutionId` string
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `400`: The account belongs to the worked example, so a real bank account is never paired with it.
- `403`: Owners only, and on screen.
- `404`: No such bank account on this team.
- `409`: Plaid is switched off here or this deployment holds no Plaid credentials, or the team’s 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)
