Get All Subaccounts Detail

GET Method

Kaleyra.io offers an API that enables you to get detail of all the sub-accounts associated with a parent account.

Base URL

https://<api_domain>/v1/<SID>

API Domain and Value

api_domainValue
IN podapi.in.kaleyra.io
SG Podapi.ap.kaleyra.io
EU Podapi.eu.kaleyra.io

API request to get all the subaccounts of your parent account

To get all the sub-accounts detail associated with a parent account, use the /subaccounts endpoint with the following request method:

Request Format

curl --location --request GET 'https://<api_domain>/api/v1/<sid>/subaccounts' \
--header 'Content-Type: <content-type>' \
--header 'api-key: <api-key>' \
--data-raw ''

The following table describes the parameter used for getting all the sub-accounts detail:

ParameterData TypeDescriptionApplicableMandatoryExample
sidStringParent account SID (Security Identifier).Always applicable.YesHXXXXXXX071IN
content-typeStringThe format in which the data is sent.Always applicable.Yesapplication/json
api-keyStringParent account API key.Always applicable.YesAxxxxxxxxxxxxxxxxxxxxxxxxxxxx3
📘

Note:

The ip_config_name in the response is the IP configuration that is being applied to the sub-account api_key as a whitelisted IP addresses/ranges. It could be shared by Parent account or could be created by sub-account itself.

Sample Request

The following is the sample request:

curl --location --request GET 'https://api.in.kaleyra.io/api/v1/HXXXXXXX071IN/subaccounts' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'api-key: Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3' \
--data-raw ''

Sample Success Response

The following is the sample success response for getting all the sub-accounts detail:

{
    "code": "RBC103",
    "message": "Request successfully executed!",
    "data": [
        {
            "account_name": "John Doe",
            "balance": 0,
            "channels": [
                "sms"
            ],
            "email": "[email protected]",
            "ip_config_name": "Demo",
            "ip_config_names": [
                "demo1",
                "Demo_test"
            ],
            "low_balance_alert": true,
            "low_balance_emails": "[email protected]",
            "low_balance_limit": 1,
            "sid": "HXAXXXXXXXXXX4GL_117866",
            "status": "active",
            "subaccount_credit_type": "assigned"
        },
        {
            "account_name": "Jean Doe",
            "balance": 0,
            "channels": [
                "sms"
            ],
            "email": "[email protected]",
            "ip_config_name": "demo0509",
            "low_balance_alert": false,
            "sid": "HXAXXXXXXXXXX4GL_117865",
            "status": "active",
            "subaccount_credit_type": "assigned"
        },
        {
            "account_name": "Jonny Doe",
            "balance": 0,
            "channels": [
                "sms"
            ],
            "email": "[email protected]",
            "low_balance_alert": false,
            "sid": "HXAXXXXXXXXXX4GL_117864",
            "status": "active",
            "subaccount_credit_type": "assigned"
        },
        {
            "account_name": "Bean Doe",
            "balance": 0,
            "channels": [
                "sms"
            ],
            "email": "[email protected]",
            "low_balance_alert": false,
            "sid": "HXAXXXXXXXXXX4GL_117863",
            "status": "active",
            "subaccount_credit_type": "shared"
        },
        {
            "account_name": "Jerry Doe",
            "balance": 0,
            "channels": [
                "sms"
            ],
            "email": "[email protected]",
            "low_balance_alert": false,
            "monthly_limit": 5,
            "sid": "HXAXXXXXXXXXX4GL_117862",
            "status": "active",
            "subaccount_credit_type": "shared"
        }
    ],
    "error": {},
    "total": 305,
    "limit": 5,
    "offset": 2,
    "status": 200
}

Sample Failure Response

The following is a sample failure response:

{
    "code": "RBC422",
    "message": "Access Denied! Unauthorized action!",
    "data": {},
    "error": {},
    "status": 401
}

For more information about response codes and statuses for getting all sub-accounts detail, see Response Codes and Statuses for Getting All Subaccounts Detail.


Did this page help you?



© 2026 Kaleyra Inc. All rights reserved.
Trademarks, logos and service marks displayed on this site are registered and unregistered trademarks of Kaleyra Inc.