> ## Documentation Index
> Fetch the complete documentation index at: https://docs.capital.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Linked banks and contacts

Banks are linked in the app, the first time you [deposit](https://docs.capital.ai/app/deposit.md#first-time-only-connect-your-bank) or withdraw. Contacts are the recipients you've sent money to. The API reads both.

## Linked banks

`GET /api/v1/linked-accounts` · scope `read`

Your own bank accounts, linked for deposits. Returns an array of:

| Field | Type | Description |
| - | - | - |
| `id` | string | Use it as `linkedAccountId` when [depositing](https://docs.capital.ai/funding/deposits.md), or as `toContactAccountId` in an `ach` [quote](https://docs.capital.ai/funding/deposits.md#quote-a-transfer). |
| `name` | string | Account name. |
| `mask` | string | Last four digits. |
| `institutionName` | string \| null | The bank. |
| `institutionLogo` | string \| null | The bank's logo, a base64 PNG. |
| `createdAt` | string \| null | When it was linked. |

```bash REST theme={null}
curl "$CAPITALAI_API_URL/api/v1/linked-accounts" \
  -H "Authorization: Bearer $CAPITALAI_API_KEY"
```

```ts TypeScript theme={null}
const res = await fetch(`${process.env.CAPITALAI_API_URL}/api/v1/linked-accounts`, {
  headers: { Authorization: `Bearer ${process.env.CAPITALAI_API_KEY}` },
});
console.log(await res.json());
```

## Contacts

`GET /api/v1/contacts` · scope `read`

People and businesses you send money to, each with one or more accounts. Returns an array of:

| Field | Type | Description |
| - | - | - |
| `id` | string | Contact ID. |
| `name` | string | Name. |
| `accounts` | `ContactAccount[]` | Where they receive money. |
| `lastTransactionAt` | string \| null | Most recent transfer to them. |
| `createdAt` | string | When they were added. |

`ContactAccount`:

| Field | Type | Description |
| - | - | - |
| `id` | string | For a `wallet` account, use it as `toContactAccountId` in a `blockchain` [quote](https://docs.capital.ai/funding/deposits.md#quote-a-transfer). |
| `kind` | `domestic_bank` \| `wallet` | Bank account or wallet. |
| `bankName`, `routingNumber`, `accountLastFour`, `accountType` | | `domestic_bank` only. `accountType` is `checking` or `savings`. Only the last four digits of the account number are stored. |
| `address`, `network`, `custodian` | | `wallet` only. |
| `createdAt` | string | When it was added. |

```bash REST theme={null}
curl "$CAPITALAI_API_URL/api/v1/contacts" \
  -H "Authorization: Bearer $CAPITALAI_API_KEY"
```

```ts TypeScript theme={null}
const res = await fetch(`${process.env.CAPITALAI_API_URL}/api/v1/contacts`, {
  headers: { Authorization: `Bearer ${process.env.CAPITALAI_API_KEY}` },
});
console.log(await res.json());
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.