> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# GetChildrenAccounts

POST https://api.voximplant.com/platform_api/GetChildrenAccounts

Gets the info about all children accounts.

Allowed roles: `Owner`.

**Example request:** Get the specified children.

Reference: https://docs.voximplant.ai/api-reference/management-api/reference/accounts/get-children-accounts

## Authentication

- `Authorization` header (bearer token, required) — Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the `Authorization` header as a Bearer value: ``` Authorization: Bearer $VOXIMPLANT_TOKEN ``` See [Authorization](/api-reference/management-api/authorization) for ready-to-copy snippets in bash, Python, Node.js and Go that turn your `credentials.json` into a token.

## Request

### Query parameters

- `child_account_id` (list of integer, optional) — The account ID list separated by semicolons (;). You need to specify at least one of the following parameters: `child_account_id`, `child_account_name`, `child_account_email`
- `child_account_name` (string, optional) — The child account name to filter. You need to specify at least one of the following parameters: `child_account_id`, `child_account_name`, `child_account_email`
- `child_account_email` (string, optional) — The child account email to filter. You need to specify at least one of the following parameters: `child_account_id`, `child_account_name`, `child_account_email`
- `active` (boolean, optional) — Whether the filter is active
- `frozen` (boolean, optional) — Whether the filter is frozen
- `ignore_invalid_accounts` (boolean, optional, default: false) — Whether to ignore the invalid 'child_account_id' items
- `brief_output` (boolean, optional, default: false) — Whether to output the account_id only
- `medium_output` (boolean, optional, default: false) — Whether to output the account_id, account_name, account_email only
- `count` (integer, optional, default: 20) — The max returning record count
- `offset` (integer, optional, default: 0) — The first **N** records are skipped in the output
- `order_by` (string, optional, default: child_account_name) — The following values are available: 'child_account_id', 'child_account_name' and 'child_account_email'
- `return_live_balance` (boolean, optional, default: true) — Whether to get the user live balance

## Response

### 200

Successful response

- `result` (list of AccountInfoType, optional)
- `total_count` (integer, optional) — The total found user count
- `count` (integer, optional) — The returned user count

## Types

### AccountInfoType

The [GetAccountInfo] function result.

- `account_id` (integer, optional) — The account's ID
- `account_name` (string, optional) — The account's name
- `account_email` (string, optional) — The account's email
- `api_key` (string, optional) — The account API key. Use password or api_key authentication to show the api_key
- `account_first_name` (string, optional) — The first name
- `account_last_name` (string, optional) — The last name
- `created` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The UTC account created time in 24-h format: YYYY-MM-DD HH:mm:ss
- `language_code` (string, optional) — The notification language code (2 symbols, ISO639-1). Examples: en, ru
- `location` (string, optional) — The account location (timezone). Examples: America/Los_Angeles, Etc/GMT-8, Etc/GMT+10
- `min_balance_to_notify` (double, optional) — The min balance value to notify by email or SMS
- `account_notifications` (boolean, optional) — Whether Voximplant notifications are required
- `tariff_changing_notifications` (boolean, optional) — Whether Voximplant plan changing notifications are required
- `news_notifications` (boolean, optional) — Whether Voximplant news notifications are required
- `billing_address_name` (string, optional) — The company or businessman name
- `billing_address_country_code` (string, optional) — The billing address country code (2 symbols, ISO 3166-1 alpha-2). Examples: US, RU, GB
- `billing_address_address` (string, optional) — The office address
- `billing_address_zip` (string, optional) — The office ZIP
- `billing_address_phone` (string, optional) — The office phone number
- `billing_address_state` (string, optional) — The office state (US) or province (Canada), up to 100 characters. Examples: California, Illinois, British Columbia
- `active` (boolean, optional) — Whether the account is active
- `frozen` (boolean, optional) — Whether account is blocked by Voximplant admins
- `balance` (double, optional) — The account's money
- `credit_limit` (double, optional) — The account's credit limit
- `currency` (string, optional) — The currency code (USD, RUR, EUR...)
- `support_robokassa` (boolean, optional) — Whether Robokassa payments are allowed
- `support_bank_card` (boolean, optional) — Whether Bank card payments are allowed
- `support_invoice` (boolean, optional) — Whether Bank invoices are allowed
- `account_custom_data` (string, optional) — The custom data
- `access_entries` (list of string, optional) — The allowed access entries (the API function names)
- `with_access_entries` (boolean, optional, default: false) — Whether the admin user permissions are granted
- `callback_url` (string, optional) — If URL is specified, Voximplant cloud makes HTTP POST requests to it when something happens. For a full list of reasons see the **type** field of the [AccountCallback] structure. The HTTP request has a JSON-encoded body that conforms to the [AccountCallbacks] structure
- `callback_salt` (string, optional) — If salt string is specified, each HTTP request made by the Voximplant cloud toward the **callback_url** has a **salt** field set to MD5 hash of account information and salt. That hash can be used be a developer to ensure that HTTP request is made by the Voximplant cloud
- `send_js_error` (boolean, optional) — Whether to send an email when a JS error occurs
- `billing_limits` (BillingLimitsType, optional) — The payments limits applicable to each payment method
- `a2p_sms_enabled` (boolean, optional) — Whether to activate one-way SMS
- `max_sip_registrations` (integer, optional)
- `fixed_balance` (double, optional)
- `money_on_hold` (double, optional)
- `bank_card_provider` (string, optional)
- `enabled_3ds` (boolean, optional)
- `record_storage_id` (integer, optional)
- `mobile_phone` (string, optional)
- `allow_invoice` (boolean, optional)
- `is_bank_card_auto_charge_prohibited` (boolean, optional)
- `taxpayer_type` (string, optional)
- `custom_pricing` (boolean, optional)
- `grace_credit` (integer, optional)
- `record_storage_name` (string, optional)
- `credit_limit_aware_balance_notifications` (boolean, optional)
- `live_balance` (double, optional)

### BillingLimitsType

The payments limits applicable to each payment method. Payments that are beyond limits are declined.

- `robokassa` (BillingLimitInfoType, optional) — The Robokassa limits
- `bank_card` (BankCardBillingLimitInfoType, optional) — The bank card limits
- `invoice` (BillingLimitInfoType, optional) — The invoice limits

### BillingLimitInfoType

The payment limit info.

- `min_amount` (double, optional) — The minimum amount
- `currency` (string, optional) — The currency

### BankCardBillingLimitInfoType

The payment limit info.

- `min_amount` (double, optional) — The minimum amount
- `currency` (string, optional) — The currency
- `max_day_payment` (double, optional)

## Examples

**Response**

```json
{
  "result": [
    {
      "account_id": 414877,
      "account_name": "myparent-child-1",
      "account_email": "child-1@myparent.com",
      "api_key": "12345678-1234-1234-1234-aaaaaabbbbbb",
      "created": "2016-04-08 11:01:30",
      "language_code": "ru",
      "location": "Etc/GMT",
      "min_balance_to_notify": 68.5598,
      "account_notifications": false,
      "tariff_changing_notifications": false,
      "news_notifications": false,
      "active": true,
      "frozen": false,
      "balance": 0.4,
      "credit_limit": 0,
      "currency": "RUR",
      "support_robokassa": false,
      "support_bank_card": true,
      "support_invoice": true,
      "send_js_error": false,
      "a2p_sms_enabled": false,
      "fixed_balance": 0.4,
      "money_on_hold": 0,
      "allow_invoice": false,
      "is_bank_card_auto_charge_prohibited": false,
      "taxpayer_type": "default",
      "custom_pricing": false,
      "live_balance": 0.4
    },
    {
      "account_id": 464478,
      "account_name": "myparent-child-2",
      "account_email": "child-2@myparent.com",
      "api_key": "123aaa78-1234-1234-1234-aaa345567bbb",
      "created": "2016-04-11 06:09:45",
      "language_code": "ru",
      "location": "Etc/GMT",
      "min_balance_to_notify": 68.5598,
      "account_notifications": false,
      "tariff_changing_notifications": false,
      "news_notifications": false,
      "active": true,
      "frozen": false,
      "balance": 0,
      "credit_limit": 0,
      "currency": "RUR",
      "support_robokassa": false,
      "support_bank_card": true,
      "support_invoice": true,
      "send_js_error": false,
      "a2p_sms_enabled": false,
      "fixed_balance": 0,
      "money_on_hold": 0,
      "allow_invoice": false,
      "is_bank_card_auto_charge_prohibited": false,
      "taxpayer_type": "default",
      "custom_pricing": false,
      "live_balance": 0
    }
  ],
  "total_count": 530350,
  "count": 2
}
```

**SDK Code**

```python Children accounts
import requests

url = "https://api.voximplant.com/platform_api/GetChildrenAccounts"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Children accounts
const url = 'https://api.voximplant.com/platform_api/GetChildrenAccounts';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Children accounts
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.voximplant.com/platform_api/GetChildrenAccounts"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Children accounts
require 'uri'
require 'net/http'

url = URI("https://api.voximplant.com/platform_api/GetChildrenAccounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Children accounts
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.voximplant.com/platform_api/GetChildrenAccounts")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Children accounts
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.voximplant.com/platform_api/GetChildrenAccounts', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Children accounts
using RestSharp;

var client = new RestClient("https://api.voximplant.com/platform_api/GetChildrenAccounts");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Children accounts
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.voximplant.com/platform_api/GetChildrenAccounts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```