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

# Fetch All Accounts

> Retrieve all accounts via the Atoa Bank Feed API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.

Use this to fetch basic information about all linked bank accounts for a user.

### Authorization

Bearer `<token>`

**Request Body Schema**

**accountAuthId** `string` *required*

ID of the authorization/consent used to access the user's bank accounts. This
can be obtained from the redirect URL after [account linking](https://docs.paywithatoa.com/accounts.md)

**Response**

Returns an array of bank account objects, each containing:

**accountId** `string`

The ID of the user's bank account.

**bankName** `string`

The name of the bank associated with the account. Useful for display purposes
or internal logging.

**accountNumber** `string`

The bank account number for which the user has provided consent.

**sortCode** `string`

The sort code linked to the bank account.

```json 200 theme={null}
[
  {
    "accountId": "7d4c6e07-78e6-4ad4-8b08-7ac183a5e750",
    "bankName": "mock-sandbox-v1",
    "accountNumber": "50978130",
    "sortCode": "726908"
  }
]
```

```json 401 theme={null}
{
  "name": "UNAUTHORIZED",
  "message": "Unauthorized",
  "status": 401,
  "errors": "[]"
}
```

```json 404 theme={null}
{
  "name": "NOT FOUND",
  "message": "Consent not found",
  "status": 404,
  "errors": "[]"
}
```


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