Updates the account object by setting the values to the parameters passed. Parameters that are not provided remain unchanged.

API Endpoint

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

Path parameters

auth_id
required
string

auth_id of the main account

subauth_id
required
string

auth_id of the subaccount

Arguments

name
required
string

Name of the Subaccount.

enabled
boolean

Specifies whether the Subaccount should be enabled. Takes a value of true or false.

Returns

Returns a confirmation that the object is updated.

Request

import plivo

client = plivo.RestClient('<auth_id>','<auth_token>')
response = client.subaccounts.update(
    auth_id='SA2025RK4E639VJFZAMM',
    name='Updated Subaccount Name', )
print(response)

# Or, you can use the subaccount object directly
subaccount_details = client.subaccounts.get(
    'SA2025RK4E639VJFZAMM', )
response = subaccount_details.update(
    name='Updated Subaccount Name', )
print(response)

Response

{
  "message": "changed",
  "api_id": "5a9fcb68-523d-11e1-86da-6ff39efcb949"
}