> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# GetQueues

POST https://api.voximplant.com/platform_api/GetQueues

Gets the ACD queues.

Allowed roles: `Owner`, `Admin`, `Developer`, `Supervisor`.

**Example request:** Get the two queues.

Reference: https://docs.voximplant.ai/api-reference/management-api/reference/queues/get-queues

## Authentication

- `Authorization` header (bearer token, required) — Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the `Authorization` header as a Bearer value: ``` Authorization: Bearer $VOXIMPLANT_TOKEN ``` See [Authorization](/api-reference/management-api/authorization) for ready-to-copy snippets in bash, Python, Node.js and Go that turn your `credentials.json` into a token.

## Request

### Query parameters

- `acd_queue_id` (integer, optional) — The ACD queue ID to filter
- `acd_queue_name` (string, optional) — The ACD queue name part to filter
- `application_id` (integer, optional) — The application ID to filter
- `skill_id` (integer, optional) — The skill ID to filter
- `excluded_skill_id` (integer, optional) — The excluded skill ID to filter
- `with_skills` (boolean, optional, default: false) — Whether to get the bound skills
- `showing_skill_id` (integer, optional) — The skill to show in the 'skills' field output
- `count` (integer, optional, default: 20) — The max returning record count
- `offset` (integer, optional, default: 0) — The first **N** records are skipped in the output
- `with_operatorcount` (boolean, optional, default: false) — Whether to include the number of agents bound to the queue

## Response

### 200

Successful response

- `result` (list of QueueInfoType, optional)
- `total_count` (integer, optional) — The total found queue count
- `count` (integer, optional) — The returned queue count

## Types

### QueueInfoType

The [GetQueues] function result item.

- `acd_queue_id` (integer, optional) — The ACD queue ID
- `acd_queue_name` (string, optional) — The queue name
- `application_id` (integer, optional) — The application ID
- `acd_queue_priority` (integer, optional) — The integer queue priority. The highest priority is 0
- `service_probability` (double, optional) — The value in the range of [0.5 ... 1.0]. The value 1.0 means the service probability 100% in challenge with a lower priority queue
- `auto_binding` (boolean, optional) — Whether to enable the auto binding of operators to a queue by skills comparing
- `max_waiting_time` (integer, optional) — The maximum predicted waiting time in minutes. When a call is going to be enqueued to the queue, its predicted waiting time should be less or equal to the maximum predicted waiting time; otherwise, a call would be rejected
- `max_queue_size` (integer, optional) — The maximum number of calls that can be enqueued into this queue
- `average_service_time` (integer, optional) — The average service time in seconds. Specify the parameter to correct or initialize the waiting time prediction
- `created` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The ACD queue creating UTC date in 24-h format: YYYY-MM-DD HH:mm:ss
- `modified` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The ACD queue editing UTC date in 24-h format: YYYY-MM-DD HH:mm:ss
- `deleted` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The ACD queue deleting UTC date in 24-h format: YYYY-MM-DD HH:mm:ss
- `users` (list of QueueUsers, optional) — The queue users info
- `skills` (list of QueueSkills, optional) — The queue skills info
- `sl_thresholds` (list of integer, optional) — The service level thresholds in seconds
- `operatorcount` (integer, optional) — Number of agents bound to the queue

### QueueUsers

The queue users info.

- `user_id` (integer, optional) — The user ID

### QueueSkills

The queue skills info.

- `skill_id` (integer, optional) — The skill ID
- `skill_name` (string, optional) — The skill name

## Examples

**Response**

```json
{
  "result": [
    {
      "acd_queue_id": 1,
      "acd_queue_name": "myqueue",
      "application_id": 1,
      "acd_queue_priority": 100,
      "service_probability": 1,
      "auto_binding": true,
      "modified": "2014-01-19 14:12:46"
    },
    {
      "acd_queue_id": 3,
      "acd_queue_name": "support",
      "application_id": 1,
      "acd_queue_priority": 1,
      "service_probability": 0.85,
      "auto_binding": true,
      "max_waiting_time": 5,
      "max_queue_size": 100,
      "average_service_time": 180,
      "modified": "2014-01-19 14:12:46"
    }
  ],
  "total_count": 17,
  "count": 1
}
```

**SDK Code**

```python Example 1
import requests

url = "https://api.voximplant.com/platform_api/GetQueues"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Example 1
const url = 'https://api.voximplant.com/platform_api/GetQueues';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example 1
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.voximplant.com/platform_api/GetQueues"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example 1
require 'uri'
require 'net/http'

url = URI("https://api.voximplant.com/platform_api/GetQueues")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Example 1
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.voximplant.com/platform_api/GetQueues")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Example 1
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.voximplant.com/platform_api/GetQueues', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Example 1
using RestSharp;

var client = new RestClient("https://api.voximplant.com/platform_api/GetQueues");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Example 1
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.voximplant.com/platform_api/GetQueues")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```