If you're managing multiple customers via subaccounts, you can change the subaccount status to "closed" to irreversibly close it. If a subaccount is closed, this means that:
- Twilio will release all phone numbers in the subaccount.
- You will not be able to use this subaccount to make and receive phone calls or send and receive SMS messages.
- It cannot be opened again.
- It will be shown as "closed" in your management dashboard when you log in to your Twilio Account
- It will appear in your Accounts List via the API, and you will still have access to historical data for that subaccount unless automatic deletion of closed subaccounts is enabled. If you have enabled automatic deletion of closed subaccounts through the Console Subaccounts settings page, we will delete all subaccount data 30 days after closure. This includes previously closed subaccounts, which will no longer appear on the Console.
- Twilio has automatically enabled this setting for all new projects created after July 5, 2018, as well as all projects without any subaccounts.
- For all other projects, project owners can turn this setting on through the Console Subaccounts settings page.
Table of Contents
Note: If you want to temporarily suspend one of your subaccounts, you can change its status to "suspended" instead of "closed."
Currently, bulk subaccount management must be done via the REST API. To close a subaccount, you'll want to make an HTTP POST request to that subaccount's Account Instance resource.
If you have a small number of subaccounts to manage, you can use Twilio's Twilio Console.
Warnings: This is a destructive procedure, so please be sure that you have the correct Account SID. You are also going to want to double check that you are, in fact, not using that subaccount, since setting the status to "Closed" will release any numbers that you have in that subaccount, and will also make any of the UI logs that are part of that subaccount inaccessible.
Close A Subaccount from the Console
Note: Only users with the Account Owner role can close subaccounts from Console. If you are not the account owner, please work with them to close your subaccounts using this process.
- Visit the Manage Subacconts page in the Console.
- Click on the Subaccount name you'd like to close, this will take you to the subaccount itself.
- Browse to the General Settings of the subaccount.
- Confirm that the name and the SID of the subaccount are the matching the subaccount you want closed off.
- Click the Close subaccount link in the lower part of the Console:
- Go through the checklist and select that you acknowledge the results of the subaccount closure, then click on the Close subaccount button.
Steps to Close A Subaccount via API or cURL Command:
Note: This step requires cURL installed on your system. On Linux and MacOS it is likely installed by default. On Windows, download an installer from the cURL site. You can alternatively close subaccounts using other programming languages. Please find our API documentation with sample code here: https://www.twilio.com/docs/iam/api/subaccounts#closing-subaccounts.
From your terminal or command prompt, run the following command to make the request. Ensure to replace the placeholder values with your parent account Subaccount SID, Account SID, and Auth Token.
Note: If you want to temporarily suspend one of your subaccounts, you can change its status to "suspended" instead of "closed."
curl -X POST https://api.twilio.com/2010-04-01/Accounts/YOUR SUBACCOUNT SID.json \
--data-urlencode "Status=closed" \
-u <INSERT YOUR PARENT ACCOUNT SID>:$INSERT YOUR PARENT AUTH TOKEN