The Member resource is a subresource of the Queue resource and represents a single call in a call queue.
All members in a call queue can be identified by their unique CallSid
, and the member at the front of the queue can be identified by the Front
sid.
The SID of the Call the Member resource is associated with.
^CA[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The date that the member was enqueued, given in RFC 2822 format.
The SID of the Queue the member is in.
^QU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json
You can address the member to fetch by its unique CallSid
or by the Front
sid to fetch the member at the front of the queue.
The SID of the Account that created the Member resource(s) to fetch.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Queue in which to find the members to fetch.
^QU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
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 fetchMember() {11const member = await client12.queues("QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.members("CallSid")14.fetch();1516console.log(member.callSid);17}1819fetchMember();
1{2"queue_sid": "QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"call_sid": "CallSid",4"date_enqueued": "Tue, 07 Aug 2012 22:57:41 +0000",5"position": 1,6"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues/QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",7"wait_time": 1438}
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 fetchMember() {11const member = await client12.queues("QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.members("Front")14.fetch();1516console.log(member.callSid);17}1819fetchMember();
1{2"queue_sid": "QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"call_sid": "Front",4"date_enqueued": "Tue, 07 Aug 2012 22:57:41 +0000",5"position": 1,6"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues/QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",7"wait_time": 1438}
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members.json
The SID of the Account that created the Member resource(s) to read.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Queue in which to find the members
^QU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
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 listMember() {11const members = await client12.queues("QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.members.list({ limit: 20 });1415members.forEach((m) => console.log(m.callSid));16}1718listMember();
1{2"end": 0,3"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues/QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members.json?PageSize=50&Page=0",4"next_page_uri": null,5"page": 0,6"page_size": 50,7"previous_page_uri": null,8"queue_members": [9{10"queue_sid": "QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",11"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",12"date_enqueued": "Mon, 17 Dec 2018 18:36:39 +0000",13"position": 1,14"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues/QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",15"wait_time": 12416}17],18"start": 0,19"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues/QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members.json?PageSize=50&Page=0"20}
POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json
Updating a Member resource dequeues the member to begin executing the TwiML document at that URL.
You can address the member to dequeue by its unique CallSid
or by the Front
sid.
If you successfully dequeue a member by its unique CallSid
, it will no longer be queued so a second update action on that same member will fail.
When dequeueing a member by using the Front
SID, that member will be dequeued and the next member in the queue will take its place.
The SID of the Account that created the Member resource(s) to update.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Queue in which to find the members to update.
^QU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
application/x-www-form-urlencoded
How to pass the update request data. Can be GET
or POST
and the default is POST
. POST
sends the data as encoded form data and GET
sends the data as query parameters.
GET
POST
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 updateMember() {11const member = await client12.queues("QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.members("CallSid")14.update({ url: "https://www.example.com" });1516console.log(member.callSid);17}1819updateMember();
1{2"queue_sid": "QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"call_sid": "CallSid",4"date_enqueued": "Thu, 06 Dec 2018 18:42:47 +0000",5"position": 1,6"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues/QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",7"wait_time": 1438}
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 updateMember() {11const member = await client12.queues("QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.members("Front")14.update({ url: "https://www.example.com" });1516console.log(member.callSid);17}1819updateMember();
1{2"queue_sid": "QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"call_sid": "Front",4"date_enqueued": "Thu, 06 Dec 2018 18:42:47 +0000",5"position": 1,6"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues/QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",7"wait_time": 1438}