Skip to content

Call Center API

This API is used for configuring queues in the Call Center app and updating the membership of recipients in queues.

API Calls

Parameters

The table shows the possible parameters and actions available for call center queue API calls.

Key Description Type Min/Max/Default/Values
agent_wrapup_time Indicates the wait period (in seconds) that is applied after an agent handles a customer call. integer 0
force_away_on_reject If set to true, and a recipient rejects a call, they will be forced to away state. boolean false
hold_treatment The ID, or media URI, of the media that should play while caller is on hold. string
name A friendly name for the queue. string 1-128 characters
queue_router The queue router used for routing and delivering calls to recipients. string route_round_robin
queue_type The type of queue. string queue_basic
ring_timeout The amount of time (in seconds) that Call Center waits for the agent to successfully answer a call. integer min=1, default=20
tick_time The time between delivery ticks in milliseconds. integer min=250, default=1000
timeout The maximum amount of time in seconds that a call will wait in queue. integer min=10, default= 600
timeout_if_size_exceeds If set to a non-zero value the queue will immediately time out any call entering the queue over the size. integer 0
timeout_immediately_if_empty If set to true and a call enters the queue while it has no logged in agents, the call will time out. boolean false
timeout_redirect The ID of a queue that the call will be sent to in the event of a timeout. string N/A
active-session-count Count of currently active sessions in the queue. integer N/A
recipient-count Count of total configured recipients for the queue. integer N/A
active-recipient-count Count of currently active recipients (logged in). N/A
available-recipient-count Count of currently available recipients (ready to take a call). integer N/A
estimated-wait The currently estimated wait time for a session in queue. integer N/A
average-wait The DAILY average wait time for all sessions. integer N/A
total-sessions The DAILY total session count for the queue. integer N/A
missed-sessions The DAILY total count of missed sessions (sessions that timed out without being handled). integer N/A
abandoned-sessions The DAILY total count of abandoned sessions (session left queue prior to being handled). integer N/A
node The node that the queue process is running on. integer N/A
add Adds the list of ID's to queue membership. N/A N/A
remove Removes the list of ID's from queue membership. N/A N/A
set Sets the membership to exactly the list of ID's provided . N/A N/A

List queues

Lists all queues that are configured for the specified account.

Method and endpoint

GET /v2/accounts/{ACCOUNT_ID}/qubicle_queues

Request

curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues

Response

    {
        "page_size":{RESULT_COUNT},
        "data":[
            {
                "id": "{QUEUE_ID}",
                "name": "{QUEUE_NAME}"
            }
        ],
        "request_id":"{REQUEST_ID}",
        "status":"success",
        "auth_token":"{AUTH_TOKEN}"
    }

Queue status

Returns the status of the queue.

Method and endpoint

GET /v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/status

Request

curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/status

Response

    {
        "data": {
                "active_recipient_count": {ACTIVE_RECIPIENT_COUNT},
                "available_recipient_count": {AVAILABLE_RECIPIENT_COUNT},
                "stats": {
                    "estimated_wait": {EST_WAIT_TIME},
                    "average_wait": {AVG_WAIT_TIME},
                    "recipient_count": {RECIPIENT_COUNT},
                    "active_session_count": {ACTIVE_SESSION_COUNT},
                    "total_sessions": {TOTAL_SESSION_COUNT},
                    "missed_sessions": {MISSED_COUNT},
                    "abandoned_sessions": {ABANDONED_COUNT}
                },
                "node": {RUNNING_ON_NODE}
        },
        "request_id":"{REQUEST_ID}",
        "status":"success",
        "auth_token":"{AUTH_TOKEN}"
    }

Queue List Status

Returns the status for the listed queues

Method and endpoint

GET /v2/accounts/{ACCOUNT_ID}/qubicle_queues/status

Request

curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/status -d

Response

     '{"data":{"queue_ids":[{QUEUE_ID_1},{QUEUE_ID_2}]}}'

    {
        "data":{
            {QUEUE_ID_1}: {
                "active_recipient_count": {ACTIVE_RECIPIENT_COUNT},
                "available_recipient_count": {AVAILABLE_RECIPIENT_COUNT},
                "stats": {
                    "estimated_wait": {EST_WAIT_TIME},
                    "average_wait": {AVG_WAIT_TIME},
                    "recipient_count": {RECIPIENT_COUNT},
                    "active_session_count": {ACTIVE_SESSION_COUNT},
                    "total_sessions": {TOTAL_SESSION_COUNT},
                    "missed_sessions": {MISSED_COUNT},
                    "abandoned_sessions": {ABANDONED_COUNT}
                },
                "node": {RUNNING_ON_NODE}
            },
            {QUEUE_ID_2}: {
                "active_recipient_count": {ACTIVE_RECIPIENT_COUNT},
                "available_recipient_count": {AVAILABLE_RECIPIENT_COUNT},
                "stats": {
                    "estimated_wait": {EST_WAIT_TIME},
                    "average_wait": {AVG_WAIT_TIME},
                    "recipient_count": {RECIPIENT_COUNT},
                    "active_session_count": {ACTIVE_SESSION_COUNT},
                    "total_sessions": {TOTAL_SESSION_COUNT},
                    "missed_sessions": {MISSED_COUNT},
                    "abandoned_sessions": {ABANDONED_COUNT}
                },
                "node": {RUNNING_ON_NODE}
            }
        },
        "request_id":"{REQUEST_ID}",
        "status":"success",
        "auth_token":"{AUTH_TOKEN}"
    }

Queue information

Returns all configuration data for a specific queue.

Method and endpoint

GET /v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}

Request

curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}

Response

    {
        "data":{
            "name":"{QUEUE_NAME}",
            "queue_type":"queue_basic",
            "queue_router":"{ROUTER_TYPE}",
            "timeout":{TIMEOUT},
            "hold_treatment":"{MEDIA_ID_FOR_HOLD_TREATMENT}",
            "agent_wrapup_time":{AGENT_WRAPUP},
            "tick_time":1000,
            "members":{
                {MEMBERS_LIST}
            },
            "id":"{QUEUE_ID}",
        },
        "request_id":"{REQUEST_ID}",
        "status":"success",
        "auth_token":"{AUTH_TOKEN}"
    }

The {MEMBERS_LIST} for a queue consists of a list of key value mappings where the key is the ID of a Call Center enabled user (recipient) and the value is an empty string.

      "members":{
          "{USER_ID}":"",
          "{USER2_ID}":""
      }

Create a queue

Creates a queue.

Method and endpoint

PUT /v2/accounts/{ACCOUNT_ID}/qubicle_queues/

Request

curl -v -X PUT -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues -d '{"data":{"name":"{QUEUE_NAME}"}}'

Response

  {
      "data":{
          "name":"{QUEUE_NAME}",
          "agent_connect_timeout":15,
          "agent_wrapup_time":2,
          "queue_router":"route_round_robin",
          "queue_timeout":3600,
          "queue_type":"queue_basic",
          "tick_time":1000,
          "id":"{QUEUE_ID}"
      },
      "request_id":"{REQUEST_ID}",
      "status":"success",
      "auth_token":"{AUTH_TOKEN}"
  }

Modify a queue

Modifies the queue configuration with a PATCH request as follows:

Method and endpoint

PATCH /v2/accounts/{ACCOUNT_ID}/qubicle/queues/{QUEUE_ID}

Request

curl -v -X PATCH -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID} -d '{"data":{"queue_timeout":"2000"}}'

Response

    {
        "data":{
            "name":"{QUEUE_NAME}",
            "agent_connect_timeout":{AGENT_CONNECT_TIMEOUT},
            "agent_wrapup_time":{AGENT_WRAPUP_TIME},
            "queue_router":{QUEUE_ROUTER},
            "queue_timeout":2000,
            "queue_type":{QUEUE_TYPE},
            "tick_time":1000,
            "id":"{QUEUE_ID}"
        },
        "request_id":"{REQUEST_ID}",
        "status":"success",
        "auth_token":"{AUTH_TOKEN}"
    }

List queue sessions

Lists all sessions that are in the queue currently.

Method and endpoint

GET /v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/sessions

Request

curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/sessions

Response

    {
        "data": [
            {
                "queue_id":"{QUEUE_ID}",
                "session_list": [{SESSION1}, {SESSION2}]
            }
        ],
        "request_id":"{REQUEST_ID}",
        "status":"success",
        "auth_token":"{AUTH_TOKEN}"
    }

List queue recipients

Lists all recipients that are in the queue currently, as well as their permissions.

Method and endpoint

GET /v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/recipients

Request

curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/recipients

Response

  {
      "data": [
          {
              "id":{RECIP_1_ID},
              "permission_roles": {RECIP_1_ROLES},
              "permissions": [{RECIP_1_PERMISSIONS}]
          }
      ],
      "request_id":"{REQUEST_ID}",
      "status":"success",
      "auth_token":"{AUTH_TOKEN}"
  }

Set the queue membership

Modifies the membership of a queue.

Method and endpoint

POST /v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/recipients

Request

curl -v -X POST -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/recipients -d '{"data": {"action": {ACTION}, "members":["{USER_ID_1}", "{USER_ID_2}"]}}'

Response

    {
        "data":{
            "name":"{QUEUE_NAME}",
            "queue_type":"queue_basic",
            "queue_router":"route_round_robin",
            "timeout":{TIMEOUT},
            "agent_connect_timeout":15,
            "hold_treatment":"{MEDIA_ID}",
            "agent_wrapup_time":2,
            "tick_time":1000,
            "members":{
                {USER_ID_1}:"",
                {USER_ID_2}:""
            },
            "id":"{QUEUE_ID}"
        },
        "request_id":"{REQUEST_ID}",
        "status":"success",
        "auth_token":"{AUTH_TOKEN}"
    }

NOTE: Members is a list of user ID's.

Clear a queue membership

Deletes queue memberships.

Method and endpoint

DELETE /v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/recipients

Request

curl -v -X DELETE -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/recipients

Response

    {
        "data":{
            "name":"{QUEUE_NAME}",
            "queue_type":"queue_basic",
            "queue_router":"route_round_robin",
            "timeout":{TIMEOUT},
            "agent_connect_timeout":15,
            "hold_treatment":"{MEDIA_ID}",
            "agent_wrapup_time":2,
            "tick_time":1000,
            "members":{
            },
            "id":"{QUEUE_ID}"
        },
        "request_id":"{REQUEST_ID}",
        "status":"success",
        "auth_token":"{AUTH_TOKEN}"
    }