Objective
When you're using Twilio's Voice APIs, you can run into a situation where you have outbound calls in the 'queued' status which you need to cancel (e.g. you accidentally executed a runaway script or there was some incident / failure which resulted in your calls stuck in the 'queued' status).
Note: This article is referring to outbound calls with a status of 'queued' as discussed in our /Call Resource doc (i.e. outbound calls created by sending an HTTP POST request to the Calls resource). This is not the same as calls placed into a hold queue with the <Enqueue> TwiML. When operating normally, your calls will only receive the 'queued' status when you submit requests beyond your account's CPS limit, and the calls will execute at your CPS rate. For more details about CPS see How fast can I place or receive phone calls with Twilio.
In many cases this can be a very large number of calls, so cancelling quickly is critical to minimize the damage (i.e. reduce cost).
Product
Programmable Voice
Procedure
The best option in most situations is for you to use the API to cancel the calls. Twilio Support also has the ability to cancel these calls by temporarily suspending your account, but this stops all services on the account including any other products you may be using, and your account may also require internal approval which can cause delays.
If you're up to try the API, it's actually pretty straight forward. Below is a sample script using the Twilio NodeJS helper library which would sets all your queued calls before 12:53pm Central Time on October 20th, 2025 to completed. You can follow the same logic below with any of our helper libraries to cancel calls with your preferred language.
Note: the startTimeBefore parameter below is 5:53pm UTC, which is 12:53pm US Central Time.
See the Query Parameters Reference.
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = require('twilio')(accountSid, authToken);
// Get calls
client.calls.list({
// Set status to 'queued' or 'in-progress'
status: 'queued',
// comment the line below if you'd like to cancel all queued calls in your account
startTimeBefore: new Date("2025-10-20 17:53:00"),
})
.then(calls => calls.forEach(c => {
client.calls(c.sid)
// Update status to completed (i.e. cancel)
.update({status: 'completed'})
.then(call => console.log("Cancelled call: " + call.sid));
}));Additional Information
Any calls you were able to successfully cancel will not be charged against your account. When you set a queued call to the 'completed' status, you are actually cancelling a call which was not yet initiated, and therefore, the final call status will be 'cancelled' instead of 'completed'. You are only charged for calls with a 'completed' status.
When you cancel calls that are in the "Queued" state, those calls are not immediately removed from Twilio’s internal rate queue. Instead, they must still progress through the queue at your current Calls Per Second (CPS) rate even though they are marked as cancelled. This is expected behavior within Twilio’s backend system.
As a result, after cancelling queued calls, there may still be a delay before new calls begin processing. The queue must fully drain before new calls can be originated. If your CPS is set to 1, this process can take significant time depending on how many calls were previously queued. If there were a large number of cancelled calls in the queue, it could take several hours for the queue to clear before new calls are processed. Unfortunately, support does not have visibility into the internal rate queue or the ability to clear it from our end. Currently, no public facing API is available to clear this queue.
Additionally, calls may be subject to timeouts imposed by carrier partners. This means that if a call remains in a queued or unconnected state for too long, the carrier may automatically cancel or fail the call due to their own timeout policies.