Routing Queues

List routing queues

Retrieve list of routing queues

GET/workspaces/{workspaceId}/inbox/routing-queues
Authorization
Path parameters
workspaceId*string
Query parameters
Response

OK

Body
results*array of RoutingQueue (object)
nextPageTokenstring

The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display.

totalinteger

The total number of results across all pages.

Request
const response = await fetch('/workspaces/{workspaceId}/inbox/routing-queues', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "description": "text",
      "priority": 0,
      "teams": [
        {
          "type": "primary",
          "ids": [
            "123e4567-e89b-12d3-a456-426614174000"
          ]
        }
      ],
      "queuedItems": {
        "email": [
          {
            "rootItemId": "123e4567-e89b-12d3-a456-426614174000",
            "capacityType": "text",
            "QueuedAt": "2024-12-21T12:00:46.732Z"
          }
        ],
        "messaging": [
          {
            "rootItemId": "123e4567-e89b-12d3-a456-426614174000",
            "capacityType": "text",
            "QueuedAt": "2024-12-21T12:00:46.732Z"
          }
        ],
        "voice": [
          {
            "rootItemId": "123e4567-e89b-12d3-a456-426614174000",
            "capacityType": "text",
            "QueuedAt": "2024-12-21T12:00:46.732Z"
          }
        ]
      },
      "createdAt": "2024-12-21T12:00:46.732Z",
      "updatedAt": "2024-12-21T12:00:46.732Z"
    }
  ],
  "nextPageToken": "text",
  "total": 0
}

Create a routing queue

Create a new routing queue

POST/workspaces/{workspaceId}/inbox/routing-queues
Authorization
Path parameters
workspaceId*string
Body
name*string
descriptionstring
priority*integer
teams*array of RoutingQueueTeam (object)
Response

created

Body
id*string (uuid)
workspaceId*string (uuid)
name*string
description*string
priority*integer
teams*array of RoutingQueueTeam (object)
queuedItemsobject
createdAtstring (date-time)
updatedAtstring (date-time)
Request
const response = await fetch('/workspaces/{workspaceId}/inbox/routing-queues', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer jwt",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text",
      "priority": 0,
      "teams": [
        {
          "type": "primary",
          "ids": [
            "123e4567-e89b-12d3-a456-426614174000"
          ]
        }
      ]
    }),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "priority": 0,
  "teams": [
    {
      "type": "primary",
      "ids": [
        "123e4567-e89b-12d3-a456-426614174000"
      ]
    }
  ],
  "queuedItems": {
    "email": [
      {
        "rootItemId": "123e4567-e89b-12d3-a456-426614174000",
        "capacityType": "text",
        "QueuedAt": "2024-12-21T12:00:46.732Z"
      }
    ],
    "messaging": [
      {
        "rootItemId": "123e4567-e89b-12d3-a456-426614174000",
        "capacityType": "text",
        "QueuedAt": "2024-12-21T12:00:46.732Z"
      }
    ],
    "voice": [
      {
        "rootItemId": "123e4567-e89b-12d3-a456-426614174000",
        "capacityType": "text",
        "QueuedAt": "2024-12-21T12:00:46.732Z"
      }
    ]
  },
  "createdAt": "2024-12-21T12:00:46.732Z",
  "updatedAt": "2024-12-21T12:00:46.732Z"
}

Get routing queue

Retrieves Routing queue.

GET/workspaces/{workspaceId}/inbox/routing-queues/{routingQueueId}
Authorization
Path parameters
workspaceId*string
routingQueueId*string
Response

ok

Body
id*string (uuid)
workspaceId*string (uuid)
name*string
description*string
priority*integer
teams*array of RoutingQueueTeam (object)
queuedItemsobject
createdAtstring (date-time)
updatedAtstring (date-time)
Request
const response = await fetch('/workspaces/{workspaceId}/inbox/routing-queues/{routingQueueId}', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "priority": 0,
  "teams": [
    {
      "type": "primary",
      "ids": [
        "123e4567-e89b-12d3-a456-426614174000"
      ]
    }
  ],
  "queuedItems": {
    "email": [
      {
        "rootItemId": "123e4567-e89b-12d3-a456-426614174000",
        "capacityType": "text",
        "QueuedAt": "2024-12-21T12:00:46.732Z"
      }
    ],
    "messaging": [
      {
        "rootItemId": "123e4567-e89b-12d3-a456-426614174000",
        "capacityType": "text",
        "QueuedAt": "2024-12-21T12:00:46.732Z"
      }
    ],
    "voice": [
      {
        "rootItemId": "123e4567-e89b-12d3-a456-426614174000",
        "capacityType": "text",
        "QueuedAt": "2024-12-21T12:00:46.732Z"
      }
    ]
  },
  "createdAt": "2024-12-21T12:00:46.732Z",
  "updatedAt": "2024-12-21T12:00:46.732Z"
}

Update a Routing queue

Modify the details of a specific routing queue.

PATCH/workspaces/{workspaceId}/inbox/routing-queues/{routingQueueId}
Authorization
Path parameters
workspaceId*string
routingQueueId*string
Body
namestring
descriptionstring
priorityinteger
teamsarray of RoutingQueueTeam (object)
Response

Updated

Body
id*string (uuid)
workspaceId*string (uuid)
name*string
description*string
priority*integer
teams*array of RoutingQueueTeam (object)
queuedItemsobject
createdAtstring (date-time)
updatedAtstring (date-time)
Request
const response = await fetch('/workspaces/{workspaceId}/inbox/routing-queues/{routingQueueId}', {
    method: 'PATCH',
    headers: {
      "Authorization": "Bearer jwt",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "priority": 0,
  "teams": [
    {
      "type": "primary",
      "ids": [
        "123e4567-e89b-12d3-a456-426614174000"
      ]
    }
  ],
  "queuedItems": {
    "email": [
      {
        "rootItemId": "123e4567-e89b-12d3-a456-426614174000",
        "capacityType": "text",
        "QueuedAt": "2024-12-21T12:00:46.732Z"
      }
    ],
    "messaging": [
      {
        "rootItemId": "123e4567-e89b-12d3-a456-426614174000",
        "capacityType": "text",
        "QueuedAt": "2024-12-21T12:00:46.732Z"
      }
    ],
    "voice": [
      {
        "rootItemId": "123e4567-e89b-12d3-a456-426614174000",
        "capacityType": "text",
        "QueuedAt": "2024-12-21T12:00:46.732Z"
      }
    ]
  },
  "createdAt": "2024-12-21T12:00:46.732Z",
  "updatedAt": "2024-12-21T12:00:46.732Z"
}

Delete a Routing queue

Delete a Routing queue. Items on the queue will be un-queued, then queue will be deleted.

DELETE/workspaces/{workspaceId}/inbox/routing-queues/{routingQueueId}
Authorization
Path parameters
workspaceId*string
routingQueueId*string
Response

Deleted

Request
const response = await fetch('/workspaces/{workspaceId}/inbox/routing-queues/{routingQueueId}', {
    method: 'DELETE',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "code": "text",
  "message": "text"
}

Last updated