> 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 the subaccounts of one master account with their current balances. Use it to enumerate the accounts you opened under a currency, for example one per client; the master account itself is not included. 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>label</td><td>string</td><td>Return only subaccounts whose label contains this text. The match is case-insensitive.</td></tr><tr><td>order</td><td>string</td><td>Field to sort by. Can be <code>created_at</code> or <code>updated_at</code>. Defaults to <code>created_at</code>.</td></tr><tr><td>order_type</td><td>string</td><td>Sort direction, <code>asc</code> or <code>desc</code>. Defaults to <code>desc</code>.</td></tr><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>

**cURL**

```bash
curl -G "https://api.sandbox.txn.io/api/public/v1/accounts/e289de2b-37bd-4eff-b832-f754c31a2d95/subaccounts" \
     -H 'Content-Type: application/vnd.api+json' \
     -H 'Authorization: Bearer <api_key>' \
     --data-urlencode 'per_page=50' \
     --data-urlencode 'page=1'
```

**Response**

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

```json
{
  "data": [
    {
      "id": "12a5d3fe-e064-4cd1-82d8-1c651af3ee48",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "Sub-account Bella Harper",
        "bankReference": "BDR1385562884236152",
        "balance": "0.000000",
        "totalBalance": "0.000000",
        "bankWithdrawalAvailable": false,
        "bankDepositAvailable": false,
        "transferAvailable": true,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        },
        "txnBankCredentials": {
          "data": []
        }
      }
    },
    {
      "id": "05b5226c-1a36-407f-a444-282822a792fe",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "USDT_7",
        "bankReference": "BDR2616020005044788",
        "balance": "0.000000",
        "totalBalance": "0.000000",
        "bankWithdrawalAvailable": false,
        "bankDepositAvailable": false,
        "transferAvailable": true,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        },
        "txnBankCredentials": {
          "data": []
        }
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 2,
    "total": 11
  },
  "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="https://docs.txn.io/api-basics/supported-currencies.md">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><tr><td>data[].relationships.company</td><td>object</td><td>Not expanded (<code>meta.included</code> is <code>false</code>).</td></tr><tr><td>data[].relationships.networks</td><td>object</td><td>Not expanded on this endpoint (<code>meta.included</code> is <code>false</code>). <a href="https://docs.txn.io/accounts/reading-account.md">Read the account</a> to get the networks it can receive deposits on.</td></tr><tr><td>data[].relationships.txnBankCredentials</td><td>array</td><td>Bank details for funding the account by bank transfer; <code>data[].type</code> is <code>txnBankCredential</code>. Populated when <code>bankDepositAvailable</code> is <code>true</code> and Txn holds bank credentials for the account currency, empty otherwise (always empty for crypto accounts). The entities are returned in <code>included[]</code>.</td></tr><tr><td>included[].type(txnBankCredential)</td><td>object</td><td>Bank deposit credentials of a fiat account. Use these details to fund the account by bank transfer.</td></tr><tr><td>included[].type(txnBankCredential).attributes.currencyCode</td><td>string</td><td>Currency of the bank credential.</td></tr><tr><td>included[].type(txnBankCredential).attributes.beneficiaryName</td><td>string</td><td>Name of the beneficiary on the bank account.</td></tr><tr><td>included[].type(txnBankCredential).attributes.iban</td><td>string</td><td>Beneficiary IBAN.</td></tr><tr><td>included[].type(txnBankCredential).attributes.bic</td><td>string</td><td>Beneficiary bank BIC/SWIFT code.</td></tr><tr><td>included[].type(txnBankCredential).attributes.bankName</td><td>string</td><td>Name of the beneficiary's bank.</td></tr><tr><td>included[].type(txnBankCredential).attributes.bankAddress</td><td>string</td><td>Address of the beneficiary's bank.</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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
