Manage unused resources
Learn to manage unused resources on your Twilio account. Regularly auditing your account for unused resources helps you optimize your Twilio usage, avoid unnecessary charges, and improve security.
You can use this guide to review and manage the most common sources of unnecessary costs on Twilio accounts, such as phone numbers, messaging services, call queues, and recordings. The guide also includes a list of less common resources that you should review to ensure you're not paying for features you don't use.
See Related reference documentation to learn more about the API resources used in this guide.
Each active Twilio phone number on your account incurs a recurring monthly charge. You can reduce your costs by releasing inactive phone numbers.
Releasing a number removes it from your account and stops the recurring charge immediately. You can release a number by using the Console or the API.
- In Twilio Console, go to Products & Services > Numbers & Senders > Overview.
The Phone Numbers tab's My inventory section lists all the phone numbers on your account. - Identify inactive phone numbers.
- To identify phone numbers that aren't configured for voice or messaging, review the Active Configuration column.
- To identify phone numbers that aren't receiving traffic, review the Traffic Status column.
- Check if any of the inactive numbers have an emergency address. If they do, remove the emergency address.
- Click a phone number.
- On the Configuration details tab, click Voice and emergency calling and scroll down to the Emergency address section.
- Click Remove emergency address and click Unlink address.
- On the Phone Numbers tab's My inventory section, for any inactive phone number you want to release, click
⋮(action menu) next to the number and select Release Number. - Type in the phone number you want to release to confirm and click Release.
On the Release numbers page, you can check the list of released numbers.
If you change your mind, you can restore a recently released number in Twilio Console or in the legacy Console within 10 days.
Messaging Services that no longer route traffic still appear in your account and can add noise to your configuration. If you have services created for old projects, pilots, or testing, delete them once you confirm they aren't in use.
Warning
You can't recover a Messaging Service after you delete it. Verify that no active phone numbers or applications depend on the service before you delete it.
You can delete Messaging Services by using the Console or the API.
- In Twilio Console, go to Products & Services > Messaging > Services.
The Messaging Services page lists all the messaging services on your account. - Click each Messaging Service and review its configuration and traffic.
- On the Messaging Services page, for any service you want to delete, click the
⋮(action menu) next to the service and select Delete Service. - Click Yes, delete permanently.
Call queues persist in your account indefinitely. Twilio recommends deleting inactive queues because idle queues increase the response time when retrieving queues using the API.
You can delete call queues by using the API.
- To retrieve all call queues on your account, make a
GETrequest to the Queues resource.1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listQueue() {11const queues = await client.queues.list({ limit: 20 });1213queues.forEach((q) => console.log(q.end));14}1516listQueue();Response
1{2"end": 0,3"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues.json?PageSize=1&Page=0",4"next_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues.json?PageSize=1&Page=1&PageToken=PAQUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"page": 0,6"page_size": 1,7"previous_page_uri": null,8"queues": [9{10"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",11"average_wait_time": 0,12"current_size": 0,13"date_created": "Tue, 04 Aug 2015 18:39:09 +0000",14"date_updated": "Tue, 04 Aug 2015 18:39:09 +0000",15"friendly_name": "0.361280134646222",16"max_size": 100,17"sid": "QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",18"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues/QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"19}20],21"start": 0,22"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues.json?PageSize=1&Page=0"23} - To delete a call queue, make a
DELETErequest to the Queue resource with the SID of the queue you want to delete.1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function deleteQueue() {11await client.queues("QUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").remove();12}1314deleteQueue();
Twilio bills you for the storage of recorded minutes. Twilio recommends deleting old or unused recordings that you no longer need for compliance, quality assurance, or other purposes to stop incurring storage charges.
If you must keep Voice recordings for compliance but want to reduce long-term costs, consider downloading them, storing them in a cheaper cold-storage solution (such as AWS S3 Glacier), and deleting them from Twilio.
Warning
You can't recover a recording after you delete it. The metadata is preserved for 40 days, during which time it is still visible in the Console and API.
-
To delete a bulk set of recordings, use the bulk deletion tool in the Console.
Twilio ConsoleLegacy Console- In Twilio Console, go to Products & Services > Voice > Logs > Call recordings.
- Use the filters to find recordings you want to delete. For example, you can filter by date or by the phone number that received the call.
- Select the recordings you want to delete and click Delete.
-
To delete an individual recording, use the Console or the API.
Twilio ConsoleLegacy ConsoleAPI- In Twilio Console, go to Products & Services > Voice > Logs > Call recordings.
- Click the recording you want to delete.
- Click Delete recording.
The following resource types are less common sources of unnecessary costs. If your account has been running for a while, review them periodically.
If you set up Elastic SIP trunking or Programmable Voice SIP domains for a past project or testing phase, they might still be costing you. While creating a SIP trunk is free, you are billed for any phone numbers associated with it and any termination or origination traffic. Leaving unused SIP endpoints open also poses a security risk that can lead to toll fraud.
Action:
- In Twilio Console, go to Products & Services > Elastic SIP Trunking and Products & Services > Voice > SIP Domains to review and delete your trunks and domains.
- In the legacy Console, go to Elastic SIP Trunking > Manage > Trunks and Voice > Manage > SIP domains to review and delete your trunks and domains.
- You can use the SIP trunks and SIP domains resources to manage your SIP trunks and domains programmatically.
If your organization uses Twilio Bring Your Own Carrier (BYOC) to route voice calls through your own telecom carrier, Twilio charges a small per-minute fee for each call. If a BYOC trunk is misconfigured or no longer used by your infrastructure, delete it to prevent accidental routing loops and stray connection fees.
Action:
- In Twilio Console, go to Products & Services > Voice > Bring your own carrier to review and delete your BYOC trunks.
- In the legacy Console, go to Voice > Manage > BYOC trunks to review and delete your BYOC trunks.
- You can use the ByocTrunk resource to manage your BYOC trunks programmatically.
TwiML Bins and Functions don't carry large direct storage fees, but any phone number still pointed at an unused Function will trigger execution charges each time it receives traffic.
Action:
- In Twilio Console, go to Develop > TwiML Bins and Develop > Functions & Assets > Overview to review your active TwiML Bins and Functions and their traffic. Delete any that are no longer in use.
- In the legacy Console, go to TwiML Bins and Functions and Assets > Services to review your active TwiML Bins and Functions and their traffic. Delete any that are no longer in use.
Some add-ons charge a flat monthly fee or a per-lookup fee. If an add-on is enabled but your workflows no longer use it, uninstall it to stop incurring unnecessary charges.
Action:
- In Twilio Console, go to Products & Services > Marketplace > Installed to review your add-ons and their usage. Uninstall any add-on that is no longer in use.
- In the legacy Console, go to Marketplace > Installed to review your add-ons and their usage. Uninstall any add-on that is no longer in use.
If you use Twilio's Public Key Encrypted Recordings, make sure you aren't paying a premium to store data you intended to delete. Delete any encrypted recordings you no longer need.
Action:
- In Twilio Console, go to Products & Services > Voice > Logs > Call recordings to review your recordings.
- In the legacy Console, go to Monitor > Logs > Call recordings to review your recordings.
- You can use the Recordings resource to review and delete your recordings programmatically.
Twilio Voice Insights gives you deep data on call quality, carrier performance, and drop rates. While basic dashboards are often included, advanced feature sets and extended data retention for logs can increase your bill.
Action:
- In Twilio Console, go to Products & Services > Voice > Insights to review your Voice Insights settings and usage.
- In the legacy Console, go to Monitor > Insights > Voice > Calls and Monitor > Insights > Voice > Settings to review your Voice Insights settings and usage.
- You can use the Voice Insights Settings resource to review and update your Voice Insights settings programmatically.
After following this guide, you have identified and removed unnecessary resources from your Twilio account, including inactive phone numbers, messaging services, call queues, and recordings. You can confirm this by reviewing your account inventory in Twilio Console or making a GET request to the relevant API resources to ensure the deleted SIDs are no longer returned.