---
title: "Get all sub-accounts with their REST API tokens associated with a specified app name"
method: POST
path: "/api/v2/subaccounts/tokens/list"
tags: ["User Subaccounts"]
---

# Get all sub-accounts with their REST API tokens associated with a specified app name

`POST /api/v2/subaccounts/tokens/list`

<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Sub-Accounts/getSubaccountsWithTokens" target="_blank">Try in sandbox</a><br>Get all sub-accounts with their REST API tokens associated with specified app name. When more than one token related to app name, last key will be returned.

## Query parameters

- `page` number
- `limit` integer

## Request body

- object
  - `appName` string, required — Application name.
  - `password` string, required — Your account password.

## Response `200`

Returned when successful.

- SubaccountWithToken[]
  - `id` integer, required — Sub-account ID.
  - `username` string, required — Username.
  - `firstName` string, required — Account first name.
  - `lastName` string, required — Account last name.
  - `email` string, required — Account Email address.
  - `status` 'A' | 'T', required — Current account status: * **A** for Active; * **T** for Trial.
  - `balance` number, double, required — Account balance (in account currency).
  - `phone` string, required — Contact phone number.
  - `company` string, required — Account company name.
  - `currency` Currency, required
    - `id` string, required — The 3-letter ISO currency ID.
    - `unicodeSymbol` string, required — Unicode-compatible currency symbol.
    - `htmlSymbol` string, required — HTML-compatible currency symbol.
  - `country` Country, nullable, required
    - `id` string, required — The 2-letter ISO country ID.
    - `name` string, required — Full country name.
  - `timezone` Timezone, required
    - `id` integer, required — Internal timezone ID.
    - `area` string, required — Timezone area.
    - `dst` integer, required — Is daylight saving time used in this timezone?
    - `offset` integer, required — Offset from UTC time in seconds. In this example, it is 21600/60/60=6 hours.
    - `timezone` string, required — User-friendly timezone name (with spaces replaced by underscores).
  - `subaccountType` 'A' | 'U', required — Type of account: * **A** for Administrator sub-account; * **U** for Regular User.
  - `emailAccepted` boolean, required — Does the account have a confirmed Email?.
  - `phoneAccepted` boolean, required — Does the account have a confirmed Phone Number?.
  - `avatar` UserImage, nullable, required
    - `href` string, required — The URI of a user avatar.
  - `token` string, required — Access token of account.

## Other responses

- `400` — Bad request.
- `401` — Unauthorized request.
- `403` — Returned when user has no enough rights to perform this action.

---

[API](https://skmtc.net/textmagic/apis/textmagic-api.md) · [All operations](https://skmtc.net/textmagic/apis/textmagic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/textmagic/textmagic-api/revisions/3e4029d19684/schema)
