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.
API Domain and Value
| api_domain | Value |
|---|---|
| IN pod | api.in.kaleyra.io |
| SG Pod | api.ap.kaleyra.io |
| EU Pod | api.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:
| Parameter | Data Type | Description | Applicable | Mandatory | Example |
|---|---|---|---|---|---|
sid | String | Parent account SID (Security Identifier). | Always applicable. | Yes | HXXXXXXX071IN |
content-type | String | The format in which the data is sent. | Always applicable. | Yes | application/json |
api-key | String | Parent account API key. | Always applicable. | Yes | Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3 |
Note:The
ip_config_namein 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.
Updated 17 days ago

