---
title: "linkAccountFromAggregator"
method: POST
path: "/v2/linkAccountFromAggregator"
tags: ["Bank Connection"]
---

# linkAccountFromAggregator

`POST /v2/linkAccountFromAggregator`

Associates a user bank account with their AeroPay account.

This call is to be made after a user goes through an aggregator bank connection flow leveraging the URL from `/v2/aggregatorCredentials` endpoint. You will receive the `connectionId` as response attributes from the aggregator widget.

<details>
<summary><strong>Error Glossary</strong> (click to expand)</summary>

| Code | HTTP Status | Message |
|------|-------------|-------------|
| `AP101` | 401 | No authenticated user |
| `AP300` | 200 | Unable to connect to bank |
| `AP403` | 200 | Bank not supported |
| `AP404` | 200 | Invalid routing number |
| `AP408` | 200 | Unknown aggregator |
| `AP409` | 200 | Invalid redirectURI |
| `AP410` | 200 | Error linking bank account |
| `AP411` | 200 | Invalid account type  -  connect a checking account |
| `AP414` | 200 | Maximum linked accounts reached |
| `AP415` | 200 | Bank account already linked |
| `AP700` | 400 | Missing or invalid required parameter |

</details>

## Headers

- `Content-Type` string, required
- `authorization` string, required

## Request body

- object — Body of linkAccountFromAggregator call
  - `connectionId` string, required — ConnectionId returned from Aerosync SDK
  - `aggregator` 'aerosync', required — aerosync

## Response `200`

Success or Connection Failure

- union
  - object
    - `userBankInfo` object
      - `bankAccountId` integer
      - `bankName` string
      - `accountLast4` string
      - `name` string
      - `externalBankAccountId` string
      - `isSelected` boolean
      - `accountType` string
      - `status` string
      - `createdDate` string
      - `accountHolderInfo` object[]
      - `canFetchBalance` boolean
      - `balance` integer
  - object
    - `success` boolean
    - `code` string
    - `error` string

---

[API](https://skmtc.net/aero/apis/aeropay-v2-api.md) · [All operations](https://skmtc.net/aero/apis/aeropay-v2-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aero/aeropay-v2-api/revisions/4700c4ceeaad/schema)
