Creates a new Subaccount object.

API Endpoint

POST
https://api.plivo.com/v1/Account/{auth_id}/Subaccount/

Arguments

name
required
string

A human-readable name for the subaccount.

enabled
boolean

Specifies whether the subaccount should be enabled. Takes a value of true or false. Defaults to false.

Request

import plivo

client = plivo.RestClient('<auth_id>','<auth_token>')
response = client.subaccounts.create(
    name='Wayne Enterprises Subaccount',
    enabled=True, )
print(response)

Response

HTTP Status Code: 201
{
"api_id": "324a7dd8-0db2-11e4-8a4a-123140008edf",
"auth_id": "SA2025RK4E639VJFZAMM",
"auth_token": "MTZjYWM0YzVjNjMwZmVmODFiNWJjNPJmOGJjZjgw",
"message": "created"
}