> 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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: management-api
  version: 1.0.0
paths:
  /GetChildrenAccounts:
    post:
      operationId: get-children-accounts
      summary: GetChildrenAccounts
      description: |-
        Gets the info about all children accounts.

        Allowed roles: `Owner`.

        **Example request:** Get the specified children.
      tags:
        - subpackage_accounts
      parameters:
        - name: child_account_id
          in: query
          description: >-
            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`
          required: false
          schema:
            type: array
            items:
              type: integer
        - name: child_account_name
          in: query
          description: >-
            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`
          required: false
          schema:
            type: string
        - name: child_account_email
          in: query
          description: >-
            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`
          required: false
          schema:
            type: string
        - name: active
          in: query
          description: Whether the filter is active
          required: false
          schema:
            type: boolean
        - name: frozen
          in: query
          description: Whether the filter is frozen
          required: false
          schema:
            type: boolean
        - name: ignore_invalid_accounts
          in: query
          description: Whether to ignore the invalid 'child_account_id' items
          required: false
          schema:
            type: boolean
            default: false
        - name: brief_output
          in: query
          description: Whether to output the account_id only
          required: false
          schema:
            type: boolean
            default: false
        - name: medium_output
          in: query
          description: Whether to output the account_id, account_name, account_email only
          required: false
          schema:
            type: boolean
            default: false
        - name: count
          in: query
          description: The max returning record count
          required: false
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: The first **N** records are skipped in the output
          required: false
          schema:
            type: integer
            default: 0
        - name: order_by
          in: query
          description: >-
            The following values are available: 'child_account_id',
            'child_account_name' and 'child_account_email'
          required: false
          schema:
            type: string
            default: child_account_name
        - name: return_live_balance
          in: query
          description: Whether to get the user live balance
          required: false
          schema:
            type: boolean
            default: true
        - name: Authorization
          in: header
          description: >-
            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.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/accounts_GetChildrenAccounts_Response_200'
servers:
  - url: https://api.voximplant.com/platform_api
components:
  schemas:
    BillingLimitInfoType:
      type: object
      properties:
        min_amount:
          type: number
          format: double
          description: The minimum amount
        currency:
          type: string
          description: The currency
      description: The payment limit info.
      title: BillingLimitInfoType
    BankCardBillingLimitInfoType:
      type: object
      properties:
        min_amount:
          type: number
          format: double
          description: The minimum amount
        currency:
          type: string
          description: The currency
        max_day_payment:
          type: number
          format: double
      description: The payment limit info.
      title: BankCardBillingLimitInfoType
    BillingLimitsType:
      type: object
      properties:
        robokassa:
          $ref: '#/components/schemas/BillingLimitInfoType'
          description: The Robokassa limits
        bank_card:
          $ref: '#/components/schemas/BankCardBillingLimitInfoType'
          description: The bank card limits
        invoice:
          $ref: '#/components/schemas/BillingLimitInfoType'
          description: The invoice limits
      description: >-
        The payments limits applicable to each payment method. Payments that are
        beyond limits are declined.
      title: BillingLimitsType
    AccountInfoType:
      type: object
      properties:
        account_id:
          type: integer
          description: The account's ID
        account_name:
          type: string
          description: The account's name
        account_email:
          type: string
          description: The account's email
        api_key:
          type: string
          description: >-
            The account API key. Use password or api_key authentication to show
            the api_key
        account_first_name:
          type: string
          description: The first name
        account_last_name:
          type: string
          description: The last name
        created:
          type: string
          description: |-
            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:
          type: string
          description: >-
            The notification language code (2 symbols, ISO639-1). Examples: en,
            ru
        location:
          type: string
          description: >-
            The account location (timezone). Examples: America/Los_Angeles,
            Etc/GMT-8, Etc/GMT+10
        min_balance_to_notify:
          type: number
          format: double
          description: The min balance value to notify by email or SMS
        account_notifications:
          type: boolean
          description: Whether Voximplant notifications are required
        tariff_changing_notifications:
          type: boolean
          description: Whether Voximplant plan changing notifications are required
        news_notifications:
          type: boolean
          description: Whether Voximplant news notifications are required
        billing_address_name:
          type: string
          description: The company or businessman name
        billing_address_country_code:
          type: string
          description: >-
            The billing address country code (2 symbols, ISO 3166-1 alpha-2).
            Examples: US, RU, GB
        billing_address_address:
          type: string
          description: The office address
        billing_address_zip:
          type: string
          description: The office ZIP
        billing_address_phone:
          type: string
          description: The office phone number
        billing_address_state:
          type: string
          description: >-
            The office state (US) or province (Canada), up to 100 characters.
            Examples: California, Illinois, British Columbia
        active:
          type: boolean
          description: Whether the account is active
        frozen:
          type: boolean
          description: Whether account is blocked by Voximplant admins
        balance:
          type: number
          format: double
          description: The account's money
        credit_limit:
          type: number
          format: double
          description: The account's credit limit
        currency:
          type: string
          description: The currency code (USD, RUR, EUR, ...)
        support_robokassa:
          type: boolean
          description: Whether Robokassa payments are allowed
        support_bank_card:
          type: boolean
          description: Whether Bank card payments are allowed
        support_invoice:
          type: boolean
          description: Whether Bank invoices are allowed
        account_custom_data:
          type: string
          description: The custom data
        access_entries:
          type: array
          items:
            type: string
          description: The allowed access entries (the API function names)
        with_access_entries:
          type: boolean
          default: false
          description: Whether the admin user permissions are granted
        callback_url:
          type: string
          description: >-
            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:
          type: string
          description: >-
            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:
          type: boolean
          description: Whether to send an email when a JS error occurs
        billing_limits:
          $ref: '#/components/schemas/BillingLimitsType'
          description: The payments limits applicable to each payment method
        a2p_sms_enabled:
          type: boolean
          description: Whether to activate one-way SMS
        max_sip_registrations:
          type: integer
        fixed_balance:
          type: number
          format: double
        money_on_hold:
          type: number
          format: double
        bank_card_provider:
          type: string
        enabled_3ds:
          type: boolean
        record_storage_id:
          type: integer
        mobile_phone:
          type: string
        allow_invoice:
          type: boolean
        is_bank_card_auto_charge_prohibited:
          type: boolean
        taxpayer_type:
          type: string
        custom_pricing:
          type: boolean
        grace_credit:
          type: integer
        record_storage_name:
          type: string
        credit_limit_aware_balance_notifications:
          type: boolean
        live_balance:
          type: number
          format: double
      description: The [GetAccountInfo] function result.
      title: AccountInfoType
    accounts_GetChildrenAccounts_Response_200:
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/AccountInfoType'
        total_count:
          type: integer
          description: The total found user count
        count:
          type: integer
          description: The returned user count
      title: accounts_GetChildrenAccounts_Response_200
  securitySchemes:
    JwtAuth:
      type: http
      scheme: bearer
      description: >-
        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.

```

## SDK Code Examples

```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()
```