> 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-accounts.md).

# Listing accounts

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

Returns your master accounts and subaccounts, including current balances. Results are paginated.

### Example request

Use the base URL for your environment. See [Environments](/getting-setup/readme.md).

{% code title="curl" %}

```bash
curl -X GET "https://api.sandbox.txn.io/api/public/v1/accounts?page=1&per_page=50" \
  -H "Content-Type: application/vnd.api+json" \
  -H "Authorization: Bearer <api_key>"
```

{% endcode %}

Authentication details: [Authenticating the API](/api-basics/authenticating-the-api.md).

**Headers**

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

**URL Parameters**

| Name       | Type   | Description                            |
| ---------- | ------ | -------------------------------------- |
| `per_page` | number | Number of accounts to return per page. |
| `page`     | number | Page number to return.                 |

**Response**

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

```json
{
  "data": [
    {
      "id": "adb0f9c4-c7fd-4989-a273-1bd11ad5847b",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "EUR",
        "label": "EUR_4",
        "bankReference": "BDR0154632342411086",
        "balance": "26.16",
        "totalBalance": "26.16",
        "bankWithdrawalAvailable": true,
        "bankDepositAvailable": true,
        "transferAvailable": true,
        "currencyType": "fiat"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        },
        "txnBankCredentials": {
          "data": [
            {
              "type": "txnBankCredential",
              "id": "3808e047-3479-4ba9-88dc-31729b4666d5"
            }
          ]
        }
      }
    },
    {
      "id": "c569b222-6de4-4783-a3c1-8d2b8a1bb980",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDC",
        "label": "USDC_1",
        "bankReference": "BDR0804588056382376",
        "balance": "0.00",
        "totalBalance": "0.00",
        "bankWithdrawalAvailable": false,
        "bankDepositAvailable": false,
        "transferAvailable": true,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        },
        "txnBankCredentials": {
          "data": []
        }
      }
    },
    {
      "id": "1d5a3601-76b7-4426-b5fb-3e434c17803e",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "EUR",
        "label": "EUR_5",
        "bankReference": "BDR0354788360836433",
        "balance": "33.35",
        "totalBalance": "33.35",
        "bankWithdrawalAvailable": true,
        "bankDepositAvailable": true,
        "transferAvailable": true,
        "currencyType": "fiat"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        },
        "txnBankCredentials": {
          "data": [
            {
              "type": "txnBankCredential",
              "id": "3808e047-3479-4ba9-88dc-31729b4666d5"
            }
          ]
        }
      }
    },
    {
      "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,
        "bankDepositAvailable": false,
        "transferAvailable": true,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        },
        "txnBankCredentials": {
          "data": []
        }
      }
    },
    {
      "id": "d5415da2-b193-4445-aab1-a654ad77cd79",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "EUR",
        "label": "Sub-account Callum Abbott",
        "bankReference": "BDR0812434002530431",
        "balance": "8.44",
        "totalBalance": "8.44",
        "bankWithdrawalAvailable": true,
        "bankDepositAvailable": true,
        "transferAvailable": true,
        "currencyType": "fiat"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        },
        "txnBankCredentials": {
          "data": [
            {
              "type": "txnBankCredential",
              "id": "3808e047-3479-4ba9-88dc-31729b4666d5"
            }
          ]
        }
      }
    }
  ],
  "included": [
    {
      "id": "3808e047-3479-4ba9-88dc-31729b4666d5",
      "type": "txnBankCredential",
      "attributes": {
        "currencyCode": "EUR",
        "beneficiaryName": "Acme Commerce Ltd",
        "iban": "DE89370400440532013000",
        "bic": "COBADEFFXXX",
        "bankName": "Commerzbank",
        "bankAddress": "Kaiserplatz, 60311 Frankfurt am Main, Germany"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 5,
    "total": 39
  },
  "jsonapi": {
    "version": "1.0"
  }
}
```

{% endtab %}
{% endtabs %}

**Response Body**

| Name                                                            | Type    | Description                                                                                                                        |
| --------------------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `data[].id`                                                     | string  | Account ID.                                                                                                                        |
| `data[].type`                                                   | string  | Entity type returned. Always `accounts`.                                                                                           |
| `data[].attributes`                                             | object  | Account attributes.                                                                                                                |
| `data[].attributes.master`                                      | boolean | If `true`, the account is a master account. If `false`, the account is a subaccount.                                               |
| `data[].attributes.currencyCode`                                | string  | Account currency code. See [Supported currencies](/api-basics/supported-currencies.md).                                            |
| `data[].attributes.currencyType`                                | string  | Currency type. Either `fiat` or `crypto`.                                                                                          |
| `data[].attributes.label`                                       | string  | Account label. Master accounts use `master`. Subaccounts use a user-defined label.                                                 |
| `data[].attributes.bankReference`                               | string  | Unique bank deposit reference (when applicable). Example: `BDR6421088115176062`.                                                   |
| `data[].attributes.balance`                                     | string  | Account balance. Returned as a string for decimal precision.                                                                       |
| `data[].attributes.totalBalance`                                | string  | For master accounts only. Total balance across the master account and its subaccounts.                                             |
| `data[].attributes.bankWithdrawalAvailable`                     | boolean | If `true`, bank withdrawals can be initiated from this account. If `false`, they are restricted.                                   |
| `data[].attributes.bankDepositAvailable`                        | boolean | If `true`, bank deposits can be made to this account. If `false`, they are restricted.                                             |
| `data[].attributes.transferAvailable`                           | boolean | If `true`, transfers between this account and other accounts are allowed. If `false`, they are restricted.                         |
| `data[].relationships.txnBankCredentials.data[].type`           | string  | Entity type of a linked bank credential. Always `txnBankCredential`.                                                               |
| `data[].relationships.txnBankCredentials.data[].id`             | string  | ID of a linked bank credential, expanded under `included`. The array is populated for fiat accounts and empty for crypto accounts. |
| `included[].type(txnBankCredential).attributes`                 | object  | Bank deposit credentials for a fiat account. Use these details to fund the account by bank transfer.                               |
| `included[].type(txnBankCredential).attributes.currencyCode`    | string  | Currency of the bank credential.                                                                                                   |
| `included[].type(txnBankCredential).attributes.beneficiaryName` | string  | Name of the beneficiary on the bank account.                                                                                       |
| `included[].type(txnBankCredential).attributes.iban`            | string  | Beneficiary IBAN.                                                                                                                  |
| `included[].type(txnBankCredential).attributes.bic`             | string  | Beneficiary bank BIC/SWIFT code.                                                                                                   |
| `included[].type(txnBankCredential).attributes.bankName`        | string  | Name of the beneficiary's bank.                                                                                                    |
| `included[].type(txnBankCredential).attributes.bankAddress`     | string  | Address of the beneficiary's bank.                                                                                                 |
| `meta.page`                                                     | number  | Current page number.                                                                                                               |
| `meta.per_page`                                                 | number  | Page size used for the response.                                                                                                   |
| `meta.total`                                                    | number  | Total number of accounts available.                                                                                                |
| `jsonapi.version`                                               | string  | JSON:API version.                                                                                                                  |

### Errors

* `401 Unauthorized` if the API key is missing or invalid. See [Authenticating the API](/api-basics/authenticating-the-api.md).
* `429 Too Many Requests` if you hit rate limits. See [Rate limits](/api-basics/rate-limits.md).

### Related endpoints

* [Read account](/accounts/reading-account.md)
* [Accounts concept](/accounts/accounts-concept.md)


---

# 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:

```
GET https://docs.txn.io/accounts/listing-accounts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
