latestSwagger 2.02026-08-101561322.2 MB
3e4029d19684
User Subaccounts
Request a new REST API token for sub-account
<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Sub-Accounts/requestNewSubaccountToken" target="_blank">Try in sandbox</a><br>Returning user object, key and app name.
post/api/v2/subaccounts/tokens
Request body
Example request
{
"userId": 1,
"password": "strongPassword",
"appName": "sample app"
}Response
Created Sub-account data returned with success.
Example response
{
"id": 305,
"displayTimeFormat": "24h",
"username": "charles.conway",
"firstName": "Charles",
"lastName": "Conway",
"email": "charles@example.com",
"status": "A",
"balance": 208.64,
"phone": "447860021130",
"company": "Example Ltd.",
"currency": {
"id": "GBP",
"unicodeSymbol": "£",
"htmlSymbol": "£"
},
"country": {
"id": "US",
"name": "India"
},
"timezone": {
"id": 55,
"area": "Europe",
"dst": 1,
"offset": 10800,
"timezone": "Europe\\/Tallinn"
},
"subaccountType": "P",
"emailAccepted": true,
"phoneAccepted": true,
"avatar": {
"href": "avatars/lav5d8de21d89971646555094.png"
}
}