Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Queue Resource

The Queue resource describes a call queue that contains individual calls, which are described by the queue's Member resources. Your account can have more than one call queue. Each queue can be retreived by it's sid directly using fetch. Alternately, you can read the list of Queues and filter by friendly_name or any other property you prefer.

Call queues are created when you enqueue a call to a queue that doesn't exist and when you call the create action.

For information about enqueing calls to a call queue, see Queueing Calls.

Queue properties

average_wait_time
integer Not PII

The average wait time of the members of this queue in seconds. This is calculated at the time of the request.

current_size
integer Not PII

The count of calls currently in the queue.

friendly_name
string Not PII

A user-provided string that identifies this queue.

max_size
integer Not PII

The upper limit of calls allowed to be in the queue. The default is 100. The maximum is 1000.

sid
sid<QU> Not PII

A 34 character string that uniquely identifies this queue.

Create a Queue resource

post
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Queues.json
Parameters
FriendlyName
Required
post string Not PII

A user-provided string that identifies this queue.

MaxSize
Optional
post integer Not PII

The upper limit of calls allowed to be in the queue. The default is 100. The maximum is 1000.

Example
Loading Code Sample...
      
      
      
      

      Fetch a Queue resource

      get
      https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json
      Parameters
      Sid
      Required
      get sid<QU> Not PII

      The queue Sid that uniquely identifies this resource

      Example
      Loading Code Sample...
          
          
          
          

          Read multiple Queue resources

          get
          https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Queues.json
          Example
          Loading Code Sample...
              
              
              
              

              Update a Queue resource

              post
              https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json
              Parameters
              FriendlyName
              Optional
              post string Not PII

              A human readable description of the queue

              MaxSize
              Optional
              post integer Not PII

              The maximum number of members that can be in the queue at a time

              Example
              Loading Code Sample...
                  
                  
                  
                  

                  Delete a Queue resource

                  delete
                  https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json
                  Parameters
                  Sid
                  Required
                  delete sid<QU> Not PII

                  The queue Sid that uniquely identifies this resource

                  Example
                  Loading Code Sample...
                      
                      
                      
                      

                      Need some help?

                      We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

                      Loading Code Sample...