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

# GET /v1/banks/:bankId/accounts — List Bank Accounts

> List all accounts belonging to an in-game bank. Restricted to the bank owner and users with STAFF permission. Returns an array of account objects.

Use this endpoint to retrieve all accounts that belong to a specific bank. Each account object includes the account ID, the character it belongs to, and the current balance. Only the bank owner and users with the `STAFF` permission can access this list.

<Note>
  This endpoint returns every account in the bank in a single response. To view bank accounts belonging to a specific character, use the [character bank accounts endpoint](/api-reference/economy/get-wallet) instead.
</Note>

## Endpoint

```text theme={null}
GET https://api.cacolombia.com/v1/banks/:bankId/accounts
```

## Path Parameters

<ParamField path="bankId" type="string" required>
  The Snowflake ID of the bank whose accounts you want to list.
</ParamField>

## Response

A successful `200` response returns an object containing an array of account objects:

<ResponseField name="accounts" type="array">
  An array of account objects belonging to the bank. Returns an empty array if the bank has no accounts.

  <Expandable title="Account object fields">
    <ResponseField name="accountId" type="string">
      The unique Snowflake ID for this bank account.
    </ResponseField>

    <ResponseField name="bankId" type="string">
      The Snowflake ID of the bank this account belongs to.
    </ResponseField>

    <ResponseField name="characterId" type="string">
      The `characterId` of the character who owns this account.
    </ResponseField>

    <ResponseField name="balance" type="number">
      The account's current balance in in-game currency units.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp of when the account was opened.
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      ISO 8601 timestamp of when the account was last modified.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example Request

```bash theme={null}
curl -X GET "https://api.cacolombia.com/v1/banks/112233445566778800/accounts" \
  -H "Authorization: Bearer <your_token>"
```

## Example Response

```json theme={null}
{
  "accounts": [
    {
      "accountId": "223344556677889900",
      "bankId": "112233445566778800",
      "characterId": "998877665544332211",
      "balance": 45000,
      "createdAt": "2024-06-02T09:00:00.000Z",
      "updatedAt": "2024-06-07T16:20:00.000Z"
    },
    {
      "accountId": "334455667788990011",
      "bankId": "112233445566778800",
      "characterId": "111222333444555666",
      "balance": 12500,
      "createdAt": "2024-06-03T11:30:00.000Z",
      "updatedAt": "2024-06-07T10:05:00.000Z"
    }
  ]
}
```

## Error Responses

| Status | Description                                                                       |
| ------ | --------------------------------------------------------------------------------- |
| `401`  | You are not authenticated. Provide a valid authorization token with your request. |
| `403`  | You are not the bank owner and do not hold the `STAFF` permission.                |
| `404`  | No bank was found for the given `bankId`.                                         |
