> For the complete documentation index, see [llms.txt](https://docs.txn.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.txn.io/accounts/listing-subaccounts-for-master-account.md).

# Listing subaccounts for master account

<mark style="color:green;">`GET`</mark> `/api/public/v1/accounts/:account_id/subaccounts`

Returns all subaccounts of a master account, including their current balances. Results are paginated.

**Headers**

| Name          | Value                      |
| ------------- | -------------------------- |
| Content-Type  | `application/vnd.api+json` |
| Authorization | `Bearer <api_key>`         |

**Path Parameters**

| Name        | Type   | Description        |
| ----------- | ------ | ------------------ |
| account\_id | string | Master account ID. |

**URL Parameters**

<table><thead><tr><th width="183">Name</th><th width="92">Type</th><th>Description</th></tr></thead><tbody><tr><td>per_page</td><td>number</td><td>Number of accounts per page to return.</td></tr><tr><td>page</td><td>number</td><td>Page for which you want to return accounts.</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="HTTP 200" %}

```json
{
  "data": [
    {
      "id": "dc9c1c6e-3fa6-4fce-8c5f-714dfcecf3ee",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "Sub-account Adam Goodman",
        "bankReference": "BDR7013714686525702",
        "balance": "0.000000",
        "totalBalance": "0.000000",
        "bankWithdrawalAvailable": false,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "89a401e2-bd3b-4a87-95b0-6ff99c0a3b7c",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "5",
        "bankReference": "BDR4357564686428100",
        "balance": "0.000000",
        "totalBalance": "0.000000",
        "bankWithdrawalAvailable": false,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "468a0e31-d9e5-4ad8-86aa-6c4806d40a2d",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "USDT_4",
        "bankReference": "BDR8606155657480464",
        "balance": "12.392985",
        "totalBalance": "12.392985",
        "bankWithdrawalAvailable": false,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "c20dec56-10ce-49e0-ad00-916579f0c04a",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "USDT_3",
        "bankReference": "BDR3865252360837137",
        "balance": "10.301300",
        "totalBalance": "10.301300",
        "bankWithdrawalAvailable": false,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "2df68c92-b9dd-4ff4-b7f2-5aeb381bf6fc",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "USDT_2",
        "bankReference": "BDR0042354445442825",
        "balance": "31.434196",
        "totalBalance": "31.434196",
        "bankWithdrawalAvailable": false,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "fbae9123-59bb-49db-bc6b-0f766c189494",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "USDT_1",
        "bankReference": "BDR4654328482173537",
        "balance": "78.915973",
        "totalBalance": "78.915973",
        "bankWithdrawalAvailable": false,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 50,
    "total": 6
  },
  "jsonapi": {
    "version": "1.0"
  }
}
```

{% endtab %}
{% endtabs %}

**Response Body**

<table><thead><tr><th>Name</th><th width="102">Type</th><th>Description</th></tr></thead><tbody><tr><td>data[].id</td><td>string</td><td>Account ID.</td></tr><tr><td>data[].type</td><td>string</td><td>Entity type returned. Always <code>accounts</code>.</td></tr><tr><td>data[].attributes</td><td>object</td><td>A set of account attributes.</td></tr><tr><td>data[].attributes.master</td><td>boolean</td><td>If <code>true</code>, account is master. If <code>false</code>, account is subaccount.</td></tr><tr><td>data[].attributes.bankReference</td><td>string</td><td>Unique bank deposit reference for each account and subaccount. Example: <code>BDR6421088115176062</code>.</td></tr><tr><td>data[].attributes.currencyCode</td><td>string</td><td>Account currency code. Refer to the list of <a href="/pages/SA7q0b6VrvXO3W09TQfS">supported currencies</a>.</td></tr><tr><td>data[].attributes.balance</td><td>string</td><td>Account balance.</td></tr><tr><td>data[].attributes.totalBalance</td><td>string</td><td>Total balance across the master account and all subaccounts (applicable to master accounts).</td></tr><tr><td>data[].attributes.bankWithdrawalAvailable</td><td>boolean</td><td>If <code>true</code>, bank withdrawals can be initiated from this account. If <code>false</code>, they are restricted.</td></tr><tr><td>data[].attributes.currencyType</td><td>string</td><td>Account currency type. Can be either <code>fiat</code> or <code>crypto</code>.</td></tr><tr><td>data[].attributes.label</td><td>string</td><td>Account label. Master accounts use <code>master</code>. Subaccounts use a user-defined label.</td></tr><tr><td>data[].attributes.bankDepositAvailable</td><td>boolean</td><td>If <code>true</code>, bank deposits can be made to this account. If <code>false</code>, they are restricted.</td></tr><tr><td>data[].attributes.transferAvailable</td><td>boolean</td><td>If <code>true</code>, transfers between this account and other accounts are allowed. If <code>false</code>, they are restricted.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.txn.io/accounts/listing-subaccounts-for-master-account.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
