If you have customers of your own, Twilio Subaccounts are a great way to distinguish different groups or numbers and usage on your project. Each subaccount has it's own numbers and usage reporting, as well as unique Account SID and Auth Token credentials, but is billed to the same Twilio project balance.
View or Switch Between Subaccounts
- Login to your project at www.twilio.com/console.
- From the Console Dashboard, click Settings > Subaccounts.
- Click the View Subaccount next to the desired Subaccount to view it's unique dashboard, including the Account SID and Auth Token.
Exit a Subaccount View in Console
To exit a subaccount and return to the project in console, click the project name drop-down menu, and then select the project name labeled master.
Create a New Subaccount from Console
- Login to your account at www.twilio.com/console.
- From the Console Dashboard, click Settings > Subaccounts.
- Click Create new Subaccount, or the
icon.
- Enter the desired subaccount name, and then click Create.
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).