Get Started

REST API: Accounts

When you first sign up with Twilio, you have just one account, your Master account. But you can also create more accounts... subaccounts are useful for things like segmenting phone numbers and usage data for your customers and controlling access to data. For more information on subaccounts see Using Subaccounts.

Account Instance Resource

An Account instance resource represents a single Twilio account.

Resource URI

/2010-04-01/Accounts/{AccountSid}

Resource Properties

An Account resource is represented by the following properties:

Property Description
Sid A 34 character string that uniquely identifies this account.
DateCreated The date that this account was created, in GMT in RFC 2822 format
DateUpdated The date that this account was last updated, in GMT in RFC 2822 format.
FriendlyName A human readable description of this account, up to 64 characters long. By default the FriendlyName is your email address.
Type The type of this account. Either Trial or Full if you've upgraded.
Status The status of this account. Usually active, but can be suspended or closed.
AuthToken The authorization token for this account. This token should be kept a secret, so no sharing.
Uri The URI for this resource, relative to https://api.twilio.com.
SubresourceUris The list of subresources under this account.
OwnerAccountSid The Sid of the parent account for this account. The OwnerAccountSid of a parent account is its own sid.

HTTP GET

Returns a representation of an account, including the properties above.

Example

HTTP POST and PUT

Allows you to modify the properties of an account.

See the Subaccounts reference for more information on suspending, unsuspending or closing subaccounts using the 'Status' parameter.

Optional Parameters

You may POST the following parameters:

Property Description
FriendlyName Update the human-readable description of this account.
Status Alter the status of this account: use closed to irreversibly close this account, suspended to temporarily suspend it, or active to reactivate it.
Example 1

Suspend a subaccount by POSTing 'Status' = 'suspended':

Example 2

Re-activate a subaccount that was previously suspended by POSTing 'Status' = 'active':

Example 3

Permanently close a subaccount by POSTing 'Status' = 'closed':

HTTP DELETE

Not supported. You can't delete an account using the REST API.

Accounts List Resource

The Accounts list resource represents the set of Accounts belonging to the Account used to make the API request. This list includes that account, along with any subaccounts belonging to it.

You can use the Accounts list resource to create subaccounts and retrieve the subaccounts that exist under your main account. See Subaccounts for more information.

Resource URI

/2010-04-01/Accounts

HTTP GET

Retrieve a list of the Account resources belonging to the account used to make the API request. This list will include that Account as well.

List Filters

The following query string parameters allow you to limit the list returned. Note, parameters are case-sensitive:

Parameter Description
FriendlyName 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.
Example 1

List all accounts:

Example 2

List all accounts that are currently 'active':

HTTP POST

Create a new Account instance resource as a subaccount of the one used to make the request. See Creating Subaccounts for more information.

HTTP PUT

Not supported

HTTP DELETE

Not Supported