> ## Documentation Index
> Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Account API

> Retrieve and update your Plivo account details

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](https://www.iana.org/time-zones).

### Example Object

```json theme={null}
{
  "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

> [!NOTE]
>
> No arguments required.

### Example

```python Python theme={null}
import plivo

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

```javascript Node.js theme={null}
const plivo = require('plivo');

const client = new plivo.Client('<auth_id>', '<auth_token>');

client.accounts.get()
    .then(response => console.log(response));
```

```ruby Ruby theme={null}
require 'plivo'

client = Plivo::RestClient.new('<auth_id>', '<auth_token>')

response = client.account.details
puts response
```

```php PHP theme={null}
<?php
require 'vendor/autoload.php';
use Plivo\RestClient;

$client = new RestClient('<auth_id>', '<auth_token>');

$response = $client->accounts->get();
print_r($response);
```

```java Java theme={null}
import com.plivo.api.Plivo;
import com.plivo.api.models.account.Account;

Plivo.init("<auth_id>", "<auth_token>");

Account response = Account.getter().get();
System.out.println(response);
```

```csharp .NET theme={null}
using Plivo;

var api = new PlivoApi("<auth_id>", "<auth_token>");

var response = api.Account.Get();
Console.WriteLine(response);
```

```go Go theme={null}
package main

import (
    "fmt"
    "github.com/plivo/plivo-go/v7"
)

func main() {
    client, _ := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})

    response, _ := client.Accounts.Get()
    fmt.Println(response)
}
```

```bash cURL theme={null}
curl -i --user AUTH_ID:AUTH_TOKEN \
    https://api.plivo.com/v1/Account/{auth_id}/
```

### Response

**account\_type** `string`

Account type. Values: `standard` for paid accounts, `developer` for free trial.

**address** `string`

Postal address of the account, displayed on invoices.

**api\_id** `string`

Unique identifier for the API request.

**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](https://www.iana.org/time-zones).

```json theme={null}
{
  "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](https://www.iana.org/time-zones).

### Example

```python Python theme={null}
import plivo

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

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

```javascript Node.js theme={null}
const plivo = require('plivo');

const client = new plivo.Client('<auth_id>', '<auth_token>');

client.accounts.update({
    name: 'Lucius Fox',
    city: 'New York',
    address: 'Times Square'
}).then(response => console.log(response));
```

```ruby Ruby theme={null}
require 'plivo'

client = Plivo::RestClient.new('<auth_id>', '<auth_token>')

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

```php PHP theme={null}
<?php
require 'vendor/autoload.php';
use Plivo\RestClient;

$client = new RestClient('<auth_id>', '<auth_token>');

$response = $client->accounts->update(
    'Lucius Fox',
    'New York',
    'Times Square');
print_r($response);
```

```java Java theme={null}
import com.plivo.api.Plivo;
import com.plivo.api.models.account.Account;

Plivo.init("<auth_id>", "<auth_token>");

AccountUpdateResponse response = Account.updater()
    .name("Lucius Fox")
    .city("New York")
    .address("Times Square")
    .update();
System.out.println(response);
```

```csharp .NET theme={null}
using Plivo;

var api = new PlivoApi("<auth_id>", "<auth_token>");

var response = api.Account.Update(
    city: "New York",
    name: "Lucius Fox",
    address: "Times Square");
Console.WriteLine(response);
```

```go Go theme={null}
package main

import (
    "fmt"
    "github.com/plivo/plivo-go/v7"
)

func main() {
    client, _ := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})

    response, _ := client.Accounts.Update(plivo.AccountUpdateParams{
        Name:    "Lucius Fox",
        City:    "New York",
        Address: "Times Square",
    })
    fmt.Println(response)
}
```

```bash cURL theme={null}
curl -i --user AUTH_ID:AUTH_TOKEN \
    -H "Content-Type: application/json" \
    -d '{"name": "Lucius Fox", "city": "New York", "address": "Times Square"}' \
    https://api.plivo.com/v1/Account/{auth_id}/
```

### Response

**api\_id** `string`

Unique identifier for the API request.

**message** `string`

Status of the request. Returns `changed` on a successful update.

```json theme={null}
{
  "api_id": "02bbdbaa-9303-11e7-8bc8-065f6a74a84a",
  "message": "changed"
}
```
