NAME
Twilio::Rest::Api::V2010::Account::Queue - The Queue resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $queue = $client->queues->create($friendly_name, \%options);
for my $queue ($client->queues->read({}, 20)) {
...
}
my $queue = $client->queues($sid)->fetch;
$client->queues($sid)->update(\%options);
$client->queues($sid)->delete;
DESCRIPTION
Queues of calls
This file holds QueueList, QueuePage, QueueContext and QueueInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
QueueList
Returned by $client->queues. See also Twilio::ListResource.
create
my $queue = $client->queues->create($friendly_name, \%options);
Create a queue. Returns a QueueInstance.
The required values are:
$friendly_name-
A descriptive string that you created to describe this resource. It can be up to 64 characters long.
The options are:
max_size-
The maximum number of calls allowed to be in the queue. The default is 1000. The maximum is 5000.
read
my @records = $client->queues->read(\%options, $limit, $page_size);
Retrieve a list of queues belonging to the account used to make the request. Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->queues->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->queues->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->queues->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->queues->get_context($sid);
Returns a QueueContext, and makes no request.
QueuePage
A Twilio::Page of QueueInstance objects.
records_key
build_instance
Used by Twilio::Page.
QueueContext
Returned by $client->queues($sid). It makes no request until one of these methods is called.
fetch
my $queue = $client->queues($sid)->fetch;
Fetch an instance of a queue identified by the QueueSid. Returns a QueueInstance.
update
my $queue = $client->queues($sid)->update(\%options);
Update the queue with the new parameters. Returns a QueueInstance.
The options are:
friendly_name-
A descriptive string that you created to describe this resource. It can be up to 64 characters long.
max_size-
The maximum number of calls allowed to be in the queue. The default is 1000. The maximum is 5000.
delete
$client->queues($sid)->delete;
Remove an empty queue. Returns true.
members
my $list = $object->members;
my $context = $object->members($call_sid);
See Twilio::Rest::Api::V2010::Account::Queue::Member.
QueueInstance
See also Twilio::InstanceResource.
It has fetch, update, delete and members, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that created this Queue resource.
- average_wait_time
-
The average wait time in seconds of the members in this queue. This is calculated at the time of the request.
- current_size
-
The number of calls currently in the queue.
- date_created
-
The date and time in GMT that this resource was created specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- date_updated
-
The date and time in GMT that this resource was last updated, specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- friendly_name
-
A string that you assigned to describe this resource.
- max_size
-
The maximum number of calls that can be in the queue. The default is 1000 and the maximum is 5000.
- sid
-
The unique string that that we created to identify this Queue resource.
- uri
-
The URI of this resource, relative to
https://api.twilio.com.
CONSTRUCTORS
new
Objects here come from the methods above, so there is no need to call new directly.
LICENSE
Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.