NAME

Twilio::Rest::Api::V2010::Account - The Account resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

my $account = $client->api->accounts->create(\%options);
for my $account ($client->api->accounts->read({}, 20)) {
  ...
}
my $account = $client->api->accounts($sid)->fetch;
$client->api->accounts($sid)->update(\%options);

DESCRIPTION

Twilio accounts (aka Project) or subaccounts

This file holds AccountList, AccountPage, AccountContext and AccountInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

AccountList

Returned by $client->api->accounts. See also Twilio::ListResource.

create

my $account = $client->api->accounts->create(\%options);

Create a new Twilio Subaccount from the account making the request. Returns a AccountInstance.

The options are:

friendly_name

A human readable description of the account to create, defaults to SubAccount Created at {YYYY-MM-DD HH:MM meridian}

read

my @records = $client->api->accounts->read(\%options, $limit, $page_size);

Retrieves a collection of Accounts belonging to the account used to make the request. Returns the records as a list, fetching as many pages as it needs.

The options are:

friendly_name

Only return the Account resources with friendly names that exactly match this name.

status

Only return Account resources with the given status. Can be closed, suspended or active. One of active, suspended or closed.

stream

my $stream = $client->api->accounts->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->api->accounts->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->api->accounts->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->api->accounts->get_context($sid);

Returns a AccountContext, and makes no request.

AccountPage

A Twilio::Page of AccountInstance objects.

records_key

build_instance

Used by Twilio::Page.

AccountContext

Returned by $client->api->accounts($sid). It makes no request until one of these methods is called.

fetch

my $account = $client->api->accounts($sid)->fetch;

Fetch the account specified by the provided Account Sid. Returns a AccountInstance.

update

my $account = $client->api->accounts($sid)->update(\%options);

Modify the properties of a given Account. Returns a AccountInstance.

The options are:

friendly_name

Update the human-readable description of this Account

status

One of active, suspended or closed.

addresses

my $list = $object->addresses;

my $context = $object->addresses($sid);

See Twilio::Rest::Api::V2010::Account::Address.

applications

my $list = $object->applications;

my $context = $object->applications($sid);

See Twilio::Rest::Api::V2010::Account::Application.

authorized_connect_apps

my $list = $object->authorized_connect_apps;

my $context = $object->authorized_connect_apps($connect_app_sid);

See Twilio::Rest::Api::V2010::Account::AuthorizedConnectApp.

available_phone_numbers

my $list = $object->available_phone_numbers;

my $context = $object->available_phone_numbers($country_code);

See Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry.

balance

my $list = $object->balance;

See Twilio::Rest::Api::V2010::Account::Balance.

calls

my $list = $object->calls;

my $context = $object->calls($sid);

See Twilio::Rest::Api::V2010::Account::Call.

conferences

my $list = $object->conferences;

my $context = $object->conferences($sid);

See Twilio::Rest::Api::V2010::Account::Conference.

connect_apps

my $list = $object->connect_apps;

my $context = $object->connect_apps($sid);

See Twilio::Rest::Api::V2010::Account::ConnectApp.

incoming_phone_numbers

my $list = $object->incoming_phone_numbers;

my $context = $object->incoming_phone_numbers($sid);

See Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber.

keys

my $list = $object->keys;

my $context = $object->keys($sid);

See Twilio::Rest::Api::V2010::Account::Key.

messages

my $list = $object->messages;

my $context = $object->messages($sid);

See Twilio::Rest::Api::V2010::Account::Message.

new_keys

my $list = $object->new_keys;

See Twilio::Rest::Api::V2010::Account::NewKey.

new_signing_keys

my $list = $object->new_signing_keys;

See Twilio::Rest::Api::V2010::Account::NewSigningKey.

notifications

my $list = $object->notifications;

my $context = $object->notifications($sid);

See Twilio::Rest::Api::V2010::Account::Notification.

outgoing_caller_ids

my $list = $object->outgoing_caller_ids;

my $context = $object->outgoing_caller_ids($sid);

See Twilio::Rest::Api::V2010::Account::OutgoingCallerId.

queues

my $list = $object->queues;

my $context = $object->queues($sid);

See Twilio::Rest::Api::V2010::Account::Queue.

recordings

my $list = $object->recordings;

my $context = $object->recordings($sid);

See Twilio::Rest::Api::V2010::Account::Recording.

short_codes

my $list = $object->short_codes;

my $context = $object->short_codes($sid);

See Twilio::Rest::Api::V2010::Account::ShortCode.

signing_keys

my $list = $object->signing_keys;

my $context = $object->signing_keys($sid);

See Twilio::Rest::Api::V2010::Account::SigningKey.

sip

my $list = $object->sip;

See Twilio::Rest::Api::V2010::Account::Sip.

tokens

my $list = $object->tokens;

See Twilio::Rest::Api::V2010::Account::Token.

transcriptions

my $list = $object->transcriptions;

my $context = $object->transcriptions($sid);

See Twilio::Rest::Api::V2010::Account::Transcription.

usage

my $list = $object->usage;

See Twilio::Rest::Api::V2010::Account::Usage.

validation_requests

my $list = $object->validation_requests;

See Twilio::Rest::Api::V2010::Account::ValidationRequest.

AccountInstance

See also Twilio::InstanceResource.

It has fetch, update, addresses, applications, authorized_connect_apps, available_phone_numbers, balance, calls, conferences, connect_apps, incoming_phone_numbers, keys, messages, new_keys, new_signing_keys, notifications, outgoing_caller_ids, queues, recordings, short_codes, signing_keys, sip, tokens, transcriptions, usage and validation_requests, which work as they do on the context.

Its fields are:

auth_token

The authorization token for this account. This token should be kept a secret, so no sharing.

date_created

The date that this account was created, in GMT in RFC 2822 format A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date that this account was last updated, in GMT in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

friendly_name

A human readable description of this account, up to 64 characters long. By default the FriendlyName is your email address.

owner_account_sid

The unique 34 character id that represents the parent of this account. The OwnerAccountSid of a parent account is it's own sid.

sid

A 34 character string that uniquely identifies this resource.

status

One of active, suspended or closed.

subresource_uris

A Map of various subresources available for the given Account Instance

type

One of Trial or Full.

uri

The URI for this resource, relative to https://api.twilio.com

CONSTRUCTORS

new

Objects here come from the methods above, so there is no need to call new directly.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.