---
title: "Start a bank connection (get the consent link)"
method: POST
path: "/bank/connect"
tags: ["Bank Connections"]
---

# Start a bank connection (get the consent link)

`POST /bank/connect`

Starts a bank connection for the authenticated user and returns the `authorizationUri` you must open in the user's browser so they can log into their bank and grant consent.

Flow: (1) call this with the `providerId` chosen from `GET /bank/providers`; (2) redirect/open the returned `authorizationUri` — the user authenticates and consents at their own bank (we never see their bank credentials); (3) after they return, call `POST /bank/fetch`, which confirms the consent and returns their transactions.

A pending connection record is stored immediately; it becomes `active` on the first successful fetch. `providerId` defaults to the SIX test simulator when omitted.

## Request body

- object
  - `providerId` string — Bank id from GET /bank/providers. Defaults to the SIX test simulator if omitted.
  - `scope` string — bLink consent scope. Defaults to `urn:blink:xs2a:ais` (read account information).

## Response `201`

Connection started; redirect the user to `authorizationUri`

- SuccessEnvelope
  - `data` unknown
  - `success` true, required

## Other responses

- `400` — Bad Request
- `401` — Invalid API key
- `500` — Internal Server Error
- `502` — bLink could not create the consent

---

[API](https://skmtc.dev/vocal/apis/magic-heidi-invoicing-software-api.md) · [All operations](https://skmtc.dev/vocal/apis/magic-heidi-invoicing-software-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vocal/magic-heidi-invoicing-software-api/revisions/591ae048f0a0/schema)
