Objective
Twilio users can create subaccounts to help separate Twilio account usage into different buckets. Subaccounts are commonly created to separate usage by team, product, customer, and more. This guide explains how to use subaccounts to customize your Twilio account.
Twilio subaccounts are a great way to distinguish between usage on your account from different regions, phone numbers, customers, or whatever other sorting needs you have. Each subaccount has its own phone numbers, usage reporting, and unique Account SID and Auth Token credentials, but it's still billed to the same main Twilio account balance.
Procedure
View or switch between subaccounts
- Access the Subaccounts page in Console.
- Click on the desired subaccount's Account Name to view its unique dashboard, including the Account SID and Auth Token.
Return to the main account view in Console
When viewing a subaccount in Console, you can return to your main project by clicking on the account name. If a drop-down is displayed, select the account again.
Create a new subaccount from Console
Note: Only Account Owners and Admins can create subaccounts through the Console.
- Access the Subaccounts page in Console.
- Click the Create subaccount button located in the upper right corner.
- Enter the desired subaccount name, and then click Create subaccount.
Note: Only Account Owners and Admins can create subaccounts trough the Console
Create a new subaccount from the REST API
To programmatically create a subaccount, make an HTTP POST request to Twilio's Accounts List REST API resource. Here’s an example cURL script:
curl -X POST https://api.twilio.com/2010-04-01/Accounts.json \
--data-urlencode "FriendlyName=newSubaccount" \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
This example will create a new subaccount called newSubaccount
under the project ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
. To make this script work for you, make the following updates, and then paste it into a terminal window:
- Line 2 update with the desired subaccount name, or remove this line to automatically name your subaccount the date and time of the API request
- Line 3 update with your Account SID and Auth Token.
For full details on creating, suspending, and deleting subaccounts, including Helper Library (SDK) code samples, please see REST API: Subaccounts (Twilio Docs).