Skip to main content
The Account object lets you perform actions on your Plivo account. You can retrieve and update account details using this API. API Endpoint
https://api.plivo.com/v1/Account/{auth_id}/

The Account Object

Attributes

account_type
string
Account type. Values: standard for paid accounts, developer for free trial.
address
string
Postal address of the account, displayed on invoices.
auth_id
string
Auth ID of the account.
auto_recharge
boolean
Whether automatic recharge is enabled when credits fall below threshold.
billing_mode
string
Billing mode. Values: prepaid or postpaid.
cash_credits
string
Account credits in USD.
city
string
City of the account holder.
name
string
Name of the account holder.
resource_uri
string
URI of the account resource.
state
string
State or region of the account.
timezone
string
Time zone used in the Plivo dashboard. See IANA Time Zone Database.

Example Object

{
  "account_type": "standard",
  "address": "Wayne Enterprises Inc.",
  "api_id": "150892a0-922a-11e7-b6f4-061564b78b75",
  "auth_id": "MA2025RK4E639VJFZAGV",
  "auto_recharge": false,
  "billing_mode": "prepaid",
  "cash_credits": "1.80900",
  "city": "Gotham",
  "name": "Bruce Wayne",
  "resource_uri": "/v1/Account/MA2025RK4E639VJFZAGV/",
  "state": "NY",
  "timezone": "America/New_York"
}

Retrieve Account Details

Retrieves the details of your account.
GET https://api.plivo.com/v1/Account/{auth_id}/

Arguments

No arguments required.

Example

import plivo

client = plivo.RestClient('<auth_id>', '<auth_token>')
response = client.account.get()
print(response)

Response

{
  "account_type": "standard",
  "address": "Wayne Enterprises Inc.",
  "api_id": "150892a0-922a-11e7-b6f4-061564b78b75",
  "auth_id": "MA2025RK4E639VJFZAGV",
  "auto_recharge": false,
  "billing_mode": "prepaid",
  "cash_credits": "1.80900",
  "city": "Gotham",
  "name": "Bruce Wayne",
  "resource_uri": "/v1/Account/MA2025RK4E639VJFZAGV/",
  "state": "NY",
  "timezone": "America/New_York"
}

Update Account Details

Updates the Account object. Parameters not provided remain unchanged.
POST https://api.plivo.com/v1/Account/{auth_id}/

Arguments

address
string
Postal address of the account, displayed on invoices.
name
string
Name of the account holder.
city
string
City of the account holder.
state
string
State or region of the account.
timezone
string
Time zone for the Plivo dashboard. See IANA Time Zone Database.

Example

import plivo

client = plivo.RestClient('<auth_id>', '<auth_token>')

response = client.account.update(
    name='Lucius Fox',
    city='New York',
    address='Times Square')
print(response)

Response

{
  "api_id": "02bbdbaa-9303-11e7-8bc8-065f6a74a84a",
  "message": "changed"
}