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 retrieved by its 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
Resource Properties in REST API format | |
---|---|
date_updated
|
The date and time in GMT that this resource was last updated, specified in RFC 2822 format. |
current_size
|
The number of calls currently in the queue. |
friendly_name
|
A string that you assigned to describe this resource. |
uri
|
The URI of this resource, relative to |
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. |
sid
|
The unique string that that we created to identify this Queue resource. |
date_created
|
The date and time in GMT that this resource was created specified in RFC 2822 format. |
max_size
|
The maximum number of calls that can be in the queue. The default is 100 and the maximum is 5000. |
Create a Queue resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Queues.json
パラメーター
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that will create the resource. |
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 100. The maximum is 5000. |
例 1
Fetch a Queue resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json
パラメーター
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the Queue resource to fetch. |
sid
Path
|
The Twilio-provided string that uniquely identifies the Queue resource to fetch |
例 1
Read multiple Queue resources
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Queues.json
パラメーター
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the Queue resources to read. |
例 1
Update a Queue resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json
パラメーター
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the Queue resource to update. |
sid
Path
|
The Twilio-provided string that uniquely identifies the Queue resource to update |
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 100. The maximum is 5000. |
例 1
Delete a Queue resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json
パラメーター
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the Queue resource to delete. |
sid
Path
|
The Twilio-provided string that uniquely identifies the Queue resource to delete |
例 1
ヘルプが必要ですか?
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。