latestSwagger 2.02026-08-101561322.2 MB

3e4029d19684

User Subaccounts

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

<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.

post/api/v2/subaccounts/tokens/list

Query parameters

pagenumber

Fetch specified results page.

limitinteger

The number of results per page.

Request body

appNamestring required

Application name.

passwordstring required

Your account password.

Example request

{
  "appName": "sample app",
  "password": "strongPassword"
}

Response

Returned when successful.

idinteger required

Sub-account ID.

usernamestring required

Username.

firstNamestring required

Account first name.

lastNamestring required

Account last name.

emailstring required

Account Email address.

status'A' | 'T' required

Current account status:

  • A for Active;
  • T for Trial.
balancenumber double required

Account balance (in account currency).

phonestring required

Contact phone number.

companystring required

Account company name.

subaccountType'A' | 'U' required

Type of account:

  • A for Administrator sub-account;
  • U for Regular User.
emailAcceptedboolean required

Does the account have a confirmed Email?.

phoneAcceptedboolean required

Does the account have a confirmed Phone Number?.

tokenstring required

Access token of account.

Example response

[
  {
    "id": 1,
    "username": "charles.conway",
    "firstName": "Charles",
    "lastName": "Conway",
    "email": "charles@example.com",
    "balance": 208.64,
    "phone": "447860021130",
    "company": "Example Ltd.",
    "currency": {
      "id": "GBP",
      "unicodeSymbol": "£",
      "htmlSymbol": "&pound;"
    },
    "country": {
      "id": "US",
      "name": "India"
    },
    "timezone": {
      "id": 55,
      "area": "Europe",
      "dst": 1,
      "offset": 10800,
      "timezone": "Europe\\/Tallinn"
    },
    "subaccountType": "U",
    "emailAccepted": true,
    "phoneAccepted": true,
    "avatar": {
      "href": "avatars/lav5d8de21d89971646555094.png"
    },
    "token": "RANDOM_TOKEN"
  }
]