> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.paywithatoa.co.uk/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**

<ParamField path="accountAuthId" type="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](/accounts)
</ParamField>

**Response**

Returns an array of bank account objects, each containing:

<ResponseField name="accountId" type="string">
  The ID of the user's bank account.
</ResponseField>

<ResponseField name="bankName" type="string">
  The name of the bank associated with the account. Useful for display purposes
  or internal logging.
</ResponseField>

<ResponseField name="accountNumber" type="string">
  The bank account number for which the user has provided consent.
</ResponseField>

<ResponseField name="sortCode" type="string">
  The sort code linked to the bank account.
</ResponseField>

<ResponseExample>
  ```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": "[]"
  }
  ```
</ResponseExample>
