Update a Queue
Use this endpoint for the Queues method to modify the properties of a single call queue.
Parameters
Parameter | Description |
---|---|
FriendlyName Optional | Update the description that distinguishes a queue. |
MaxSize Optional | Update the maximum number of calls that are allowed to wait in a queue. |
Examples
Request
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}.json \
-X POST \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.queues('QueueSid')
.update()
.then(queue => console.log(queue.friendlyName))
.done();
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Api.V2010.Account;
class Program
{
static void Main(string[] args)
{
TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "{SPACE}.signalwire.com" });
var queue = QueueResource.Update(
pathSid: "QueueSid"
);
Console.WriteLine(queue.FriendlyName);
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
queue = client.queues('QueueSid') \
.update()
print(queue.friendly_name)
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
queue = @client.queues('QueueSid')
.update()
puts queue.friendly_name
Request: Update the Size of a Queue
Change the maximum size of a call queue to 200 queue members.
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}.json \
-X POST \
--data-urlencode "MaxSize=200" \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.queues('QueueSid')
.update({ maxSize: 200 })
.then(queue => console.log(queue.friendlyName))
.done();
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Api.V2010.Account;
class Program
{
static void Main(string[] args)
{
TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "{SPACE}.signalwire.com" });
var queue = QueueResource.Update(
maxSize: 200,
pathSid: "QueueSid"
);
Console.WriteLine(queue.FriendlyName);
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
queue = client.queues('QueueSid') \
.update(max_size=200)
print(queue.friendly_name)
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
queue = @client.queues('QueueSid')
.update(max_size: 200)
puts queue.friendly_name
Responses
200 OK
{
"account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
"average_wait_time": 0,
"current_size": 0,
"date_created": "Wed, 26 Sept 2018 18:00:00 +0000",
"date_updated": "Thur, 27 Sept 2018 19:00:00 +0000",
"friendly_name": "Queue1",
"max_size": 200,
"sid": "b3877c40-da60-4998-90ad-b792e98472qu",
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues/b3877c40-da60-4998-90ad-b792e98472qu.json"
}