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.
An Account instance resource represents a single Twilio account.
/2010-04-01/Accounts/{AccountSid}
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. |
Returns a representation of an account, including the properties above.
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.
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. |
Suspend a subaccount by POSTing 'Status' = 'suspended':
Re-activate a subaccount that was previously suspended by POSTing 'Status' = 'active':
Permanently close a subaccount by POSTing 'Status' = 'closed':
Not supported. You can't delete an account using the REST API.
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.
/2010-04-01/Accounts
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.
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. |
List all accounts:
List all accounts that are currently 'active':
Create a new Account instance resource as a subaccount of the one used to make the request. See Creating Subaccounts for more information.
Not supported
Not Supported