# Call Queues

Manage your call queues.

## List call queue servers

> List call queue servers.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queue_servers":{"get":{"tags":["Call Queue"],"operationId":"listCallQueueServers","summary":"List call queue servers","description":"List call queue servers.\n","parameters":[{"name":"filter","in":"query","schema":{"type":"string"},"description":"Use the `filter` query parameter to retrieve just a subset of a collection.\n"},{"name":"search","in":"query","schema":{"type":"string"},"description":"Use the `search` query parameter to restrict the results of a request to match a search criterion.\n"},{"name":"orderby","in":"query","schema":{"type":"string"},"description":"Use the `orderby` query parameter to specify the sort order of the items returned from server.  \nThe default order is ascending order.\n"},{"name":"skip","in":"query","schema":{"type":"integer","format":"int32","minimum":0,"default":0},"description":"Use the `skip` query parameter to set the number of items to skip at the start of a collection.\n"},{"name":"top","in":"query","schema":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":100},"description":"Use the `top` query parameter to specify the page size of the result set.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue server.\n"},"name":{"type":"string","minLength":1,"maxLength":64,"description":"The name of call queue server.\n"},"enabled":{"type":"boolean","default":true,"description":"The activate status or deactivated status.\n"},"type":{"type":"string","enum":["INTERNAL","EXTERNAL"],"readOnly":true,"description":"Every PortSIP PBX has a built-in call queue server marked as `INTERNAL`;   \nNewly added call queue servers will be marked as \"EXTERNAL\".\n"},"ipv4":{"type":"string","description":"Host IPV4 address.\n"},"ipv6":{"type":"string","description":"Host IPV6 address.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Create a call queue server

> Create a call queue server.  \
> Please note that: at least one of ipv4 or ipv6 must be specified.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queue_servers":{"post":{"tags":["Call Queue"],"operationId":"createCallQueueServer","summary":"Create a call queue server","description":"Create a call queue server.  \nPlease note that: at least one of ipv4 or ipv6 must be specified.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"The name of call queue server.\n"},"enabled":{"type":"boolean","default":true,"description":"The activate status or deactivated status.\n"},"ipv4":{"type":"string","description":"Host IPV4 address.\n"},"ipv6":{"type":"string","description":"Host IPV6 address.\n"}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue server.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Retrieve a call queue server

> Retrieve a call queue server.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queue_servers/{id}":{"get":{"tags":["Call Queue"],"operationId":"showCallQueueServer","summary":"Retrieve a call queue server","description":"Retrieve a call queue server.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue server.\n"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue server.\n"},"name":{"type":"string","minLength":1,"maxLength":64,"description":"The name of call queue server.\n"},"enabled":{"type":"boolean","default":true,"description":"The activate status or deactivated status.\n"},"ipv4":{"type":"string","description":"Host IPV4 address.\n"},"ipv6":{"type":"string","description":"Host IPV6 address.\n"},"type":{"type":"string","enum":["INTERNAL","EXTERNAL"],"readOnly":true,"description":"Every PortSIP PBX has a built-in call queue server marked as `INTERNAL`;   \nNewly added call queue servers will be marked as \"EXTERNAL\".\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update a call queue server

> Update a call queue server.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queue_servers/{id}":{"post":{"tags":["Call Queue"],"operationId":"updateCallQueueServer","summary":"Update a call queue server","description":"Update a call queue server.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue server.\n"},"description":"The unique ID of the call queue server."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"The activate status or deactivated status.\n"}}}}},"required":true},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## Query call queue server status

> Retrieve a call queue server's status.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queue_servers/{id}/status":{"get":{"tags":["Call Queue"],"operationId":"getCallQueueServerStatus","summary":"Query call queue server status","description":"Retrieve a call queue server's status.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue server.\n"},"description":"The unique ID of the call queue server."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","readOnly":true,"properties":{"cpu_usage":{"type":"integer","description":"CPU usage.\n"},"memory_usage":{"type":"integer","description":"Memory usage.\n"},"status":{"type":"string","enum":["ONLINE","OFFLINE"],"description":"Call queue's status:   \n- `ONLINE`: The call queue is online.\n- `OFFLINE`: The call queue is offline.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Delete a call queue server

> Delete a call queue server<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queue_servers/{id}/destroy":{"post":{"tags":["Call Queue"],"operationId":"deleteCallQueueServer","summary":"Delete a call queue server","description":"Delete a call queue server\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue server.\n"},"description":"The unique ID of the call queue server."}],"responses":{"204":{"description":"No Content"},"400":{"description":"Invalid server id supplied"},"404":{"description":"Server not found"}}}}}}
```

## List call queues

> Retrieve a collection of call queues<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queues":{"get":{"tags":["Call Queue"],"operationId":"listQueues","summary":"List call queues","description":"Retrieve a collection of call queues\n","parameters":[{"name":"filter","in":"query","schema":{"type":"string"},"description":"Use the `filter` query parameter to retrieve just a subset of a collection.\n"},{"name":"search","in":"query","schema":{"type":"string"},"description":"Use the `search` query parameter to restrict the results of a request to match a search criterion.\n"},{"name":"orderby","in":"query","schema":{"type":"string"},"description":"Use the `orderby` query parameter to specify the sort order of the items returned from server.  \nThe default order is ascending order.\n"},{"name":"skip","in":"query","schema":{"type":"integer","format":"int32","minimum":0,"default":0},"description":"Use the `skip` query parameter to set the number of items to skip at the start of a collection.\n"},{"name":"top","in":"query","schema":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":100},"description":"Use the `top` query parameter to specify the page size of the result set.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue.\n"},"name":{"type":"string","minLength":1,"maxLength":64,"description":"The name of call queue.\n"},"extension_number":{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"},"ring_time":{"type":"integer","format":"int32","minimum":1,"maximum":65535,"default":20,"description":"Duration that each extension will ring, in seconds.\n"},"polling_strategy":{"type":"string","enum":["RING_SIMULTANEOUSLY","PRIORITIZED_HUNT","CYCLIC_HUNT","LEAST_WORKED_HUNT","SKILL_BASED_ROUTING_PRIORITIZED_HUNT","SKILL_BASED_ROUTING_CYCLIC_HUNT","SKILL_BASED_ROUTING_LEAST_WORKED_HUNT"],"default":"RING_SIMULTANEOUSLY","description":"Polling strategy:   \nCan be either:   \n- `RING_SIMULTANEOUSLY`: Ring all available agents of the queue simultaneously.\n- `PRIORITIZED_HUNT`: Ring each available agent of the queue serially in the configured order.\n- `CYCLIC_HUNT`: Ring each available agent of the queue serially, \n    ring the agent that hasn't been rang from a call from this queue in the longest amount of time first.\n- `LEAST_WORKED_HUNT`: Ring each available agent of the queue serially, \n    ring the agent that hasn't answered a call from this queue in the longest amount of time first.\n- `SKILL_BASED_ROUTING_PRIORITIZED_HUNT`: The call assign to the agents in the level \"1\" skill group first,   \n    and move on to the less experienced agents in subsequent skill groups, if the call is not answered in current skill group.   \n    Ring each available agent of the queue serially in the configured order.\n- `SKILL_BASED_ROUTING_CYCLIC_HUNT`: The call assign to the agents in the level \"1\" skill group first,   \n    and move on to the less experienced agents in subsequent skill groups, if the call is not answered in current skill group.   \n    Ring each available agent of the queue serially,   \n    ring the agent that hasn't been rang from a call from this queue in the longest amount of time first.\n- `SKILL_BASED_ROUTING_LEAST_WORKED_HUNT`: The call assign to the agents in the level \"1\" skill group first,   \n    and move on to the less experienced agents in subsequent skill groups, if the call is not answered in current skill group.   \n    Ring each available agent of the queue serially,   \n    ring the agent that hasn't answered a call from this queue in the longest amount of time first.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Create a call queue

> Add a new call queue.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queues":{"post":{"tags":["Call Queue"],"operationId":"createQueue","summary":"Create a call queue","description":"Add a new call queue.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"The name of call queue.\n"},"extension_number":{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"},"polling_strategy":{"type":"string","enum":["RING_SIMULTANEOUSLY","PRIORITIZED_HUNT","CYCLIC_HUNT","LEAST_WORKED_HUNT","SKILL_BASED_ROUTING_PRIORITIZED_HUNT","SKILL_BASED_ROUTING_CYCLIC_HUNT","SKILL_BASED_ROUTING_LEAST_WORKED_HUNT"],"default":"RING_SIMULTANEOUSLY","description":"Polling strategy:   \nCan be either:   \n- `RING_SIMULTANEOUSLY`: Ring all available agents of the queue simultaneously.\n- `PRIORITIZED_HUNT`: Ring each available agent of the queue serially in the configured order.\n- `CYCLIC_HUNT`: Ring each available agent of the queue serially, \n    ring the agent that hasn't been rang from a call from this queue in the longest amount of time first.\n- `LEAST_WORKED_HUNT`: Ring each available agent of the queue serially, \n    ring the agent that hasn't answered a call from this queue in the longest amount of time first.\n- `SKILL_BASED_ROUTING_PRIORITIZED_HUNT`: The call assign to the agents in the level \"1\" skill group first,   \n    and move on to the less experienced agents in subsequent skill groups, if the call is not answered in current skill group.   \n    Ring each available agent of the queue serially in the configured order.\n- `SKILL_BASED_ROUTING_CYCLIC_HUNT`: The call assign to the agents in the level \"1\" skill group first,   \n    and move on to the less experienced agents in subsequent skill groups, if the call is not answered in current skill group.   \n    Ring each available agent of the queue serially,   \n    ring the agent that hasn't been rang from a call from this queue in the longest amount of time first.\n- `SKILL_BASED_ROUTING_LEAST_WORKED_HUNT`: The call assign to the agents in the level \"1\" skill group first,   \n    and move on to the less experienced agents in subsequent skill groups, if the call is not answered in current skill group.   \n    Ring each available agent of the queue serially,   \n    ring the agent that hasn't answered a call from this queue in the longest amount of time first.\n"},"ring_time":{"type":"integer","format":"int32","minimum":1,"maximum":65535,"default":20,"description":"Duration that each extension will ring, in seconds.\n"},"max_callers":{"type":"integer","format":"int32","minimum":0,"description":"The maximum number of callers allowed in queue.\n"},"moh_prompt_file_id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of the file.\n"},"intro_type":{"type":"string","enum":["DISABLE","NORMAL","FULL"],"default":"DISABLE","description":"Introductory tone:\n- `DISABLE`: disable introductory tone\n- `NORMAL`: play normal introductory tone.\n- `FULL`: play full introductory tone.\n"},"intro_prompt_file_id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of the file.\n"},"max_waiting_time":{"type":"integer","format":"int32","minimum":15,"maximum":65535,"default":300,"description":"The maximum time limit for waiting in the queue, in seconds. \nAfter this time interval, the call will be handled as pre-configured.\n"},"wait_when_no_agents_online":{"type":"boolean","default":false,"description":"Queue will waiting when no agent online.\n"},"inform_position":{"type":"string","enum":["DISABLE","PERIODICALLY","ON_CONNECTED"],"default":"DISABLE","description":"Queue will announce the actual position of the caller who's currently waiting in the queue.  \nCallback mode can be either:  \n- `DISABLE`: Disable informing waiting position.\n- `PERIODICALLY`: Inform waiting position periodically.\n- `ON_CONNECTED`: Inform waiting position once caller connected and then play periodically.\n"},"inform_position_interval":{"type":"integer","format":"int32","minimum":10,"maximum":1800,"default":10,"description":"Time interval for repeating announcement of the waiting position, in seconds.   \nThis parameter will be available only if `inform_position` is `PERIODICALLY` or `ON_CONNECTED`.\n"},"agent_auto_ready":{"type":"boolean","default":true,"description":"Automatically set agent status to `Ready` \nafter logging in to a queue or completing a call (ACD call or non AC call).\n"},"agent_auto_not_ready_after_non_acd_call":{"type":"boolean","default":true,"description":"Automatically set agent status to `Not Ready` after completing a non-ACD call.   \nThis option will be ignored if `agent_auto_ready` is enabled.\n"},"sla_time":{"type":"integer","format":"int32","minimum":0,"maximum":65536,"default":0,"description":"The SLA time of call queue in seconds.\n"},"language":{"type":"string","description":"BCP 47 Language Tags (The Internet Best Current Practices (BCP) for language tags).\nA language tag is composed of a sequence of one or more subtags such as language, region, variant and script subtags.\nWhen a language tag is comprised of more than one subtag, the subtag values are separated by the \"-\" character.\nYou will most commonly find language tags written with 2 subtags - language and region. For example: en-US.\n"},"no_answer_forward_rule":{"type":"object","properties":{"action":{"type":"string","enum":["FORWARD_TO_NUMBER","FORWARD_TO_VOICEMAIL","HANGUP"],"description":"Forward action includes:\n- `FORWARD_TO_NUMBER`:\n- `FORWARD_TO_VOICEMAIL`:\n- `HANGUP`: finish call\n"},"number":{"type":"string","description":"Specify the forwarding destination number.  \nCan be either:  \n- Extension number: The extension number of PortSIP PBX.\n- External number: The numeric sequence of numbers, with or without a plus sign at the beginning.\n"}}},"night_mode_forward_rule":{"type":"object","properties":{"action":{"type":"string","enum":["FORWARD_TO_NUMBER","FORWARD_TO_VOICEMAIL","HANGUP"],"description":"Forward action includes:\n- `FORWARD_TO_NUMBER`:\n- `FORWARD_TO_VOICEMAIL`:\n- `HANGUP`: finish call\n"},"number":{"type":"string","description":"Specify the forwarding destination number.  \nCan be either:  \n- Extension number: The extension number of PortSIP PBX.\n- External number: The numeric sequence of numbers, with or without a plus sign at the beginning.\n"}}},"enable_callback":{"type":"boolean","default":false,"description":"Enable callback feature or not.\n"},"callback_mode":{"type":"string","enum":["ACTIVE","TIMEOUT"],"default":"ACTIVE","description":"Callback mode includes:\n- `ACTIVE`: Triggered on user request (Press 3).\n- `TIMEOUT`: Offered to caller after timeout.\n"},"callback_timeout":{"type":"integer","format":"int32","minimum":0,"default":600,"description":"Offered to caller after timeout in seconds.\n"},"callback_outbound_prefix":{"type":"string","description":"Callback outbound prefix.\n"},"outbound_caller_ids":{"type":"array","items":{"type":"object","properties":{"provider_id":{"allOf":[{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of trunk.\n"}],"description":"The unique ID of trunk.\n"},"caller_id":{"allOf":[{"type":"string","minLength":1,"maxLength":64,"description":"Outbound caller id.\n"}],"description":"The caller ID.\n"},"description":{"type":"string","maxLength":1024,"description":"The descriptive information about this outbound caller id.\n"}}},"description":"A collection of outbound caller IDs.\n"},"enable_sticky_routing":{"type":"boolean","default":true,"description":"When a customer calls the queue, \nif the customer has communicated with an agent before and the agent is currently in the ready state, \nthen this agent will have priority to answer the call.\n"},"sticky_routing_duration":{"type":"integer","format":"int32","minimum":1,"maximum":365,"default":30,"description":"The duration of sticky routing in days.\n"},"enable_paid":{"type":"boolean","default":false,"description":"Whether to add call queue information into `P-Asserted-Identity` header.\n"},"enable_prid":{"type":"boolean","default":false,"description":"Whether to add call queue information into `Remote-Party-ID` header.\n"},"extension_number_as_to_header":{"type":"boolean","default":false,"description":"Whether to user extension number as invite `To` header.\n"}},"required":["name","extension_number","polling_strategy"]}}}},"responses":{"200":{"description":"Created call queue","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Retrieve a call queue

> Retrieve call queue<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queues/{id}":{"get":{"tags":["Call Queue"],"operationId":"showQueue","summary":"Retrieve a call queue","description":"Retrieve call queue\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue.\n"},"description":"The unique ID of the call queue."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue.\n"},"name":{"type":"string","minLength":1,"maxLength":64,"description":"The name of call queue.\n"},"extension_number":{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"},"polling_strategy":{"type":"string","enum":["RING_SIMULTANEOUSLY","PRIORITIZED_HUNT","CYCLIC_HUNT","LEAST_WORKED_HUNT","SKILL_BASED_ROUTING_PRIORITIZED_HUNT","SKILL_BASED_ROUTING_CYCLIC_HUNT","SKILL_BASED_ROUTING_LEAST_WORKED_HUNT"],"default":"RING_SIMULTANEOUSLY","description":"Polling strategy:   \nCan be either:   \n- `RING_SIMULTANEOUSLY`: Ring all available agents of the queue simultaneously.\n- `PRIORITIZED_HUNT`: Ring each available agent of the queue serially in the configured order.\n- `CYCLIC_HUNT`: Ring each available agent of the queue serially, \n    ring the agent that hasn't been rang from a call from this queue in the longest amount of time first.\n- `LEAST_WORKED_HUNT`: Ring each available agent of the queue serially, \n    ring the agent that hasn't answered a call from this queue in the longest amount of time first.\n- `SKILL_BASED_ROUTING_PRIORITIZED_HUNT`: The call assign to the agents in the level \"1\" skill group first,   \n    and move on to the less experienced agents in subsequent skill groups, if the call is not answered in current skill group.   \n    Ring each available agent of the queue serially in the configured order.\n- `SKILL_BASED_ROUTING_CYCLIC_HUNT`: The call assign to the agents in the level \"1\" skill group first,   \n    and move on to the less experienced agents in subsequent skill groups, if the call is not answered in current skill group.   \n    Ring each available agent of the queue serially,   \n    ring the agent that hasn't been rang from a call from this queue in the longest amount of time first.\n- `SKILL_BASED_ROUTING_LEAST_WORKED_HUNT`: The call assign to the agents in the level \"1\" skill group first,   \n    and move on to the less experienced agents in subsequent skill groups, if the call is not answered in current skill group.   \n    Ring each available agent of the queue serially,   \n    ring the agent that hasn't answered a call from this queue in the longest amount of time first.\n"},"ring_time":{"type":"integer","format":"int32","minimum":1,"maximum":65535,"default":20,"description":"Duration that each extension will ring, in seconds.\n"},"max_callers":{"type":"integer","format":"int32","minimum":0,"description":"The maximum number of callers allowed in queue.\n"},"moh_prompt_file_name":{"type":"string","description":"The name of the file.\n"},"moh_prompt_file_size":{"type":"integer","format":"int64","minimum":0,"description":"The file size in bytes.\n"},"moh_prompt_file_url":{"type":"string","readOnly":true,"description":"The relative path to file url for file downloading.\n"},"intro_type":{"type":"string","enum":["DISABLE","NORMAL","FULL"],"default":"DISABLE","description":"Introductory tone:\n- `DISABLE`: disable introductory tone\n- `NORMAL`: play normal introductory tone.\n- `FULL`: play full introductory tone.\n"},"intro_prompt_file_name":{"type":"string","description":"The name of the file.\n"},"intro_prompt_file_size":{"type":"integer","format":"int64","minimum":0,"description":"The file size in bytes.\n"},"intro_prompt_file_url":{"type":"string","readOnly":true,"description":"The relative path to file url for file downloading.\n"},"max_waiting_time":{"type":"integer","format":"int32","minimum":15,"maximum":65535,"default":300,"description":"The maximum time limit for waiting in the queue, in seconds. \nAfter this time interval, the call will be handled as pre-configured.\n"},"wait_when_no_agents_online":{"type":"boolean","default":false,"description":"Queue will waiting when no agent online.\n"},"inform_position":{"type":"string","enum":["DISABLE","PERIODICALLY","ON_CONNECTED"],"default":"DISABLE","description":"Queue will announce the actual position of the caller who's currently waiting in the queue.  \nCallback mode can be either:  \n- `DISABLE`: Disable informing waiting position.\n- `PERIODICALLY`: Inform waiting position periodically.\n- `ON_CONNECTED`: Inform waiting position once caller connected and then play periodically.\n"},"inform_position_interval":{"type":"integer","format":"int32","minimum":10,"maximum":1800,"default":10,"description":"Time interval for repeating announcement of the waiting position, in seconds.   \nThis parameter will be available only if `inform_position` is `PERIODICALLY` or `ON_CONNECTED`.\n"},"agent_auto_ready":{"type":"boolean","default":true,"description":"Automatically set agent status to `Ready` \nafter logging in to a queue or completing a call (ACD call or non AC call).\n"},"agent_auto_not_ready_after_non_acd_call":{"type":"boolean","default":true,"description":"Automatically set agent status to `Not Ready` after completing a non-ACD call.   \nThis option will be ignored if `agent_auto_ready` is enabled.\n"},"sla_time":{"type":"integer","format":"int32","minimum":0,"maximum":65536,"default":0,"description":"The SLA time of call queue in seconds.\n"},"language":{"type":"string","description":"BCP 47 Language Tags (The Internet Best Current Practices (BCP) for language tags).\nA language tag is composed of a sequence of one or more subtags such as language, region, variant and script subtags.\nWhen a language tag is comprised of more than one subtag, the subtag values are separated by the \"-\" character.\nYou will most commonly find language tags written with 2 subtags - language and region. For example: en-US.\n"},"no_answer_forward_rule":{"type":"object","properties":{"action":{"type":"string","enum":["FORWARD_TO_NUMBER","FORWARD_TO_VOICEMAIL","HANGUP"],"description":"Forward action includes:\n- `FORWARD_TO_NUMBER`:\n- `FORWARD_TO_VOICEMAIL`:\n- `HANGUP`: finish call\n"},"number":{"type":"string","description":"Specify the forwarding destination number.  \nCan be either:  \n- Extension number: The extension number of PortSIP PBX.\n- External number: The numeric sequence of numbers, with or without a plus sign at the beginning.\n"}}},"night_mode_forward_rule":{"type":"object","properties":{"action":{"type":"string","enum":["FORWARD_TO_NUMBER","FORWARD_TO_VOICEMAIL","HANGUP"],"description":"Forward action includes:\n- `FORWARD_TO_NUMBER`:\n- `FORWARD_TO_VOICEMAIL`:\n- `HANGUP`: finish call\n"},"number":{"type":"string","description":"Specify the forwarding destination number.  \nCan be either:  \n- Extension number: The extension number of PortSIP PBX.\n- External number: The numeric sequence of numbers, with or without a plus sign at the beginning.\n"}}},"enable_callback":{"type":"boolean","default":false,"description":"Enable callback feature or not.\n"},"callback_mode":{"type":"string","enum":["ACTIVE","TIMEOUT"],"default":"ACTIVE","description":"Callback mode includes:\n- `ACTIVE`: Triggered on user request (Press 3).\n- `TIMEOUT`: Offered to caller after timeout.\n"},"callback_timeout":{"type":"integer","format":"int32","minimum":0,"default":600,"description":"Offered to caller after timeout in seconds.\n"},"callback_outbound_prefix":{"type":"string","description":"Callback outbound prefix.\n"},"outbound_caller_ids":{"type":"array","items":{"type":"object","properties":{"provider_id":{"allOf":[{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of trunk.\n"}],"description":"The unique ID of trunk.\n"},"caller_id":{"allOf":[{"type":"string","minLength":1,"maxLength":64,"description":"Outbound caller id.\n"}],"description":"The caller ID.\n"},"description":{"type":"string","maxLength":1024,"description":"The descriptive information about this outbound caller id.\n"}}},"description":"A collection of outbound caller IDs.\n"},"enable_sticky_routing":{"type":"boolean","default":true,"description":"When a customer calls the queue, \nif the customer has communicated with an agent before and the agent is currently in the ready state, \nthen this agent will have priority to answer the call.\n"},"sticky_routing_duration":{"type":"integer","format":"int32","minimum":1,"maximum":365,"default":30,"description":"The duration of sticky routing in days.\n"},"enable_paid":{"type":"boolean","default":false,"description":"Whether to add call queue information into `P-Asserted-Identity` header.\n"},"enable_prid":{"type":"boolean","default":false,"description":"Whether to add call queue information into `Remote-Party-ID` header.\n"},"extension_number_as_to_header":{"type":"boolean","default":false,"description":"Whether to user extension number as invite `To` header.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update a call queue

> Update call queue properties by it's unique ID.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queues/{id}":{"post":{"tags":["Call Queue"],"operationId":"updateQueue","summary":"Update a call queue","description":"Update call queue properties by it's unique ID.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue.\n"},"description":"The unique ID of the call queue."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"The name of call queue.\n"},"polling_strategy":{"type":"string","enum":["RING_SIMULTANEOUSLY","PRIORITIZED_HUNT","CYCLIC_HUNT","LEAST_WORKED_HUNT","SKILL_BASED_ROUTING_PRIORITIZED_HUNT","SKILL_BASED_ROUTING_CYCLIC_HUNT","SKILL_BASED_ROUTING_LEAST_WORKED_HUNT"],"default":"RING_SIMULTANEOUSLY","description":"Polling strategy:   \nCan be either:   \n- `RING_SIMULTANEOUSLY`: Ring all available agents of the queue simultaneously.\n- `PRIORITIZED_HUNT`: Ring each available agent of the queue serially in the configured order.\n- `CYCLIC_HUNT`: Ring each available agent of the queue serially, \n    ring the agent that hasn't been rang from a call from this queue in the longest amount of time first.\n- `LEAST_WORKED_HUNT`: Ring each available agent of the queue serially, \n    ring the agent that hasn't answered a call from this queue in the longest amount of time first.\n- `SKILL_BASED_ROUTING_PRIORITIZED_HUNT`: The call assign to the agents in the level \"1\" skill group first,   \n    and move on to the less experienced agents in subsequent skill groups, if the call is not answered in current skill group.   \n    Ring each available agent of the queue serially in the configured order.\n- `SKILL_BASED_ROUTING_CYCLIC_HUNT`: The call assign to the agents in the level \"1\" skill group first,   \n    and move on to the less experienced agents in subsequent skill groups, if the call is not answered in current skill group.   \n    Ring each available agent of the queue serially,   \n    ring the agent that hasn't been rang from a call from this queue in the longest amount of time first.\n- `SKILL_BASED_ROUTING_LEAST_WORKED_HUNT`: The call assign to the agents in the level \"1\" skill group first,   \n    and move on to the less experienced agents in subsequent skill groups, if the call is not answered in current skill group.   \n    Ring each available agent of the queue serially,   \n    ring the agent that hasn't answered a call from this queue in the longest amount of time first.\n"},"ring_time":{"type":"integer","format":"int32","minimum":1,"maximum":65535,"default":20,"description":"Duration that each extension will ring, in seconds.\n"},"max_callers":{"type":"integer","format":"int32","minimum":0,"description":"The maximum number of callers allowed in queue.\n"},"moh_prompt_file_id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of the file.\n"},"intro_type":{"type":"string","enum":["DISABLE","NORMAL","FULL"],"default":"DISABLE","description":"Introductory tone:\n- `DISABLE`: disable introductory tone\n- `NORMAL`: play normal introductory tone.\n- `FULL`: play full introductory tone.\n"},"intro_prompt_file_id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of the file.\n"},"max_waiting_time":{"type":"integer","format":"int32","minimum":15,"maximum":65535,"default":300,"description":"The maximum time limit for waiting in the queue, in seconds. \nAfter this time interval, the call will be handled as pre-configured.\n"},"wait_when_no_agents_online":{"type":"boolean","default":false,"description":"Queue will waiting when no agent online.\n"},"inform_position":{"type":"string","enum":["DISABLE","PERIODICALLY","ON_CONNECTED"],"default":"DISABLE","description":"Queue will announce the actual position of the caller who's currently waiting in the queue.  \nCallback mode can be either:  \n- `DISABLE`: Disable informing waiting position.\n- `PERIODICALLY`: Inform waiting position periodically.\n- `ON_CONNECTED`: Inform waiting position once caller connected and then play periodically.\n"},"inform_position_interval":{"type":"integer","format":"int32","minimum":10,"maximum":1800,"default":10,"description":"Time interval for repeating announcement of the waiting position, in seconds.   \nThis parameter will be available only if `inform_position` is `PERIODICALLY` or `ON_CONNECTED`.\n"},"agent_auto_ready":{"type":"boolean","default":true,"description":"Automatically set agent status to `Ready` \nafter logging in to a queue or completing a call (ACD call or non AC call).\n"},"agent_auto_not_ready_after_non_acd_call":{"type":"boolean","default":true,"description":"Automatically set agent status to `Not Ready` after completing a non-ACD call.   \nThis option will be ignored if `agent_auto_ready` is enabled.\n"},"sla_time":{"type":"integer","format":"int32","minimum":0,"maximum":65536,"default":0,"description":"The SLA time of call queue in seconds.\n"},"language":{"type":"string","description":"BCP 47 Language Tags (The Internet Best Current Practices (BCP) for language tags).\nA language tag is composed of a sequence of one or more subtags such as language, region, variant and script subtags.\nWhen a language tag is comprised of more than one subtag, the subtag values are separated by the \"-\" character.\nYou will most commonly find language tags written with 2 subtags - language and region. For example: en-US.\n"},"no_answer_forward_rule":{"type":"object","properties":{"action":{"type":"string","enum":["FORWARD_TO_NUMBER","FORWARD_TO_VOICEMAIL","HANGUP"],"description":"Forward action includes:\n- `FORWARD_TO_NUMBER`:\n- `FORWARD_TO_VOICEMAIL`:\n- `HANGUP`: finish call\n"},"number":{"type":"string","description":"Specify the forwarding destination number.  \nCan be either:  \n- Extension number: The extension number of PortSIP PBX.\n- External number: The numeric sequence of numbers, with or without a plus sign at the beginning.\n"}}},"night_mode_forward_rule":{"type":"object","properties":{"action":{"type":"string","enum":["FORWARD_TO_NUMBER","FORWARD_TO_VOICEMAIL","HANGUP"],"description":"Forward action includes:\n- `FORWARD_TO_NUMBER`:\n- `FORWARD_TO_VOICEMAIL`:\n- `HANGUP`: finish call\n"},"number":{"type":"string","description":"Specify the forwarding destination number.  \nCan be either:  \n- Extension number: The extension number of PortSIP PBX.\n- External number: The numeric sequence of numbers, with or without a plus sign at the beginning.\n"}}},"enable_callback":{"type":"boolean","default":false,"description":"Enable callback feature or not.\n"},"callback_mode":{"type":"string","enum":["ACTIVE","TIMEOUT"],"default":"ACTIVE","description":"Callback mode includes:\n- `ACTIVE`: Triggered on user request (Press 3).\n- `TIMEOUT`: Offered to caller after timeout.\n"},"callback_timeout":{"type":"integer","format":"int32","minimum":0,"default":600,"description":"Offered to caller after timeout in seconds.\n"},"callback_outbound_prefix":{"type":"string","description":"Callback outbound prefix.\n"},"outbound_caller_ids":{"type":"array","items":{"type":"object","properties":{"provider_id":{"allOf":[{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of trunk.\n"}],"description":"The unique ID of trunk.\n"},"caller_id":{"allOf":[{"type":"string","minLength":1,"maxLength":64,"description":"Outbound caller id.\n"}],"description":"The caller ID.\n"},"description":{"type":"string","maxLength":1024,"description":"The descriptive information about this outbound caller id.\n"}}},"description":"A collection of outbound caller IDs.\n"},"enable_sticky_routing":{"type":"boolean","default":true,"description":"When a customer calls the queue, \nif the customer has communicated with an agent before and the agent is currently in the ready state, \nthen this agent will have priority to answer the call.\n"},"sticky_routing_duration":{"type":"integer","format":"int32","minimum":1,"maximum":365,"default":30,"description":"The duration of sticky routing in days.\n"},"enable_paid":{"type":"boolean","default":false,"description":"Whether to add call queue information into `P-Asserted-Identity` header.\n"},"enable_prid":{"type":"boolean","default":false,"description":"Whether to add call queue information into `Remote-Party-ID` header.\n"},"extension_number_as_to_header":{"type":"boolean","default":false,"description":"Whether to user extension number as invite `To` header.\n"}}}}}},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## Query call queue's status

> Query call queue's status by it's unique ID.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queues/{id}/status":{"get":{"tags":["Call Queue"],"operationId":"getQueueStatus","summary":"Query call queue's status","description":"Query call queue's status by it's unique ID.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue.\n"},"description":"The unique ID of the call queue."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ONLINE","OFFLINE"],"description":"Status of queue:\n- `ONLINE`:\n- `OFFLINE`:\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Delete a call queue

> Destroy call queue<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queues/{id}/destroy":{"post":{"tags":["Call Queue"],"operationId":"deleteQueue","summary":"Delete a call queue","description":"Destroy call queue\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue.\n"},"description":"The unique ID of the call queue."}],"responses":{"204":{"description":"No Content"},"400":{"description":"Invalid call queue ID supplied"},"404":{"description":"User not found"}}}}}}
```

## List caller sequence of a call queue

> Retrieve a collection of call queue's waiting sequence<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queues/{id}/waiting":{"get":{"tags":["Call Queue"],"operationId":"getQueueWaitingList","summary":"List caller sequence of a call queue","description":"Retrieve a collection of call queue's waiting sequence\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue.\n"},"description":"The unique ID of the call queue."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"session_id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of session in call queue.\n"},"extension_number":{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"},"display_name":{"type":"string","description":"The display name of caller.\n"},"waiting_time":{"type":"integer","format":"uint32","description":"The waiting time (seconds) of caller in the queue.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Answer specified call

> Call queue Answer specified call<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queues/{id}/waiting/{session_id}/pickup":{"post":{"tags":["Call Queue"],"operationId":"pickupQueueWaiting","summary":"Answer specified call","description":"Call queue Answer specified call\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue.\n"},"description":"The unique ID of the call queue."},{"name":"session_id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of session in call queue.\n"}}],"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## List call queue agents

> Retrieve a collection of call queue agents.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queues/{id}/agents":{"get":{"tags":["Call Queue"],"operationId":"listQueueAgents","summary":"List call queue agents","description":"Retrieve a collection of call queue agents.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue.\n"},"description":"The unique ID of the call queue."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"extension_number":{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of agent.\n"},"display_name":{"allOf":[{"type":"string","maxLength":1024,"description":"The display name of user.\n"}],"description":"The display name of agent.\n"},"skill_level":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":1,"description":"The skill level of agent in queue.   \nOnly valid when `polling_strategy` is skill based.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update call queue agent list

> Update call queue agent list.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queues/{id}/agents":{"post":{"tags":["Call Queue"],"operationId":"updateQueueAgentList","summary":"Update call queue agent list","description":"Update call queue agent list.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue.\n"},"description":"The unique ID of call queue."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"extension_number":{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of agent.\n"},"skill_level":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":1,"description":"The skill level of agent in queue.   \nOnly valid when `polling_strategy` is skill based.\n"}}},"description":"Collection of agents.\n"}}}}}},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## Retrieve call queue agent

> Retrieve information of call queue agent.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queues/{id}/agents/{agent_number}":{"get":{"tags":["Call Queue"],"operationId":"showQueueAgent","summary":"Retrieve call queue agent","description":"Retrieve information of call queue agent.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue.\n"},"description":"The unique ID of the call queue."},{"name":"agent_number","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"},"description":"The extension number of the agent."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"extension_number":{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of agent.\n"},"display_name":{"allOf":[{"type":"string","maxLength":1024,"description":"The display name of user.\n"}],"description":"The display name of agent.\n"},"skill_level":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":1,"description":"The skill level of agent in queue.   \nOnly valid when `polling_strategy` is skill based.\n"},"status":{"type":"string","enum":["READY","NOT_READY","QUEUE_CALL","OTHER_CALL","WRAP_UP","BREAK","LUNCH","LOGGED_OUT","OFFLINE"],"readOnly":true,"description":"Current status of agent: \n- `READY`:  \n- `NOT_READY`:  \n- `QUEUE_CALL`:  \n- `OTHER_CALL`:  \n- `WRAP_UP`:  \n- `BREAK`:  \n- `LUNCH`:  \n- `TRANSFER`:   \n- `CONSULT_TRANSFER`:   \n- `ON_HOLD`:   \n- `LOGGED_OUT`:  \n- `OFFLINE`:\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Set call queue agent status

> Set call queue agent status.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Queue","description":"Manage your call queues.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_queues/{id}/agents/{agent_number}":{"post":{"tags":["Call Queue"],"operationId":"setQueueAgentStatus","summary":"Set call queue agent status","description":"Set call queue agent status.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call queue.\n"},"description":"The unique ID of call queue."},{"name":"agent_number","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"},"description":"The extension number of the agent."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["READY","NOT_READY","WRAP_UP","BREAK","LUNCH","LOGGED_IN","LOGGED_OUT"],"description":"Change call queue agent status to one of the following: \n- `READY`:  \n- `NOT_READY`:  \n- `WRAP_UP`:  \n- `BREAK`:  \n- `LUNCH`:   \n- `LOGGED_IN`:   \n- `LOGGED_OUT`:\n"}}}}}},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```
