# Routing Queues

## List routing queues

> Retrieve list of routing queues

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Manage routing queues","name":"routing_queue"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token","scheme":"AccessKey","type":"http"}},"parameters":{"pagination.param.limit":{"description":"Limits the number of results to return.","in":"query","name":"limit","schema":{"default":25,"maximum":100,"type":"integer"}},"pagination.param.pageToken":{"description":"The cursor that keeps track of the current position in the results.","in":"query","name":"pageToken","schema":{"type":"string"}},"pagination.param.reverse":{"description":"Reverses the order in which the results are returned.","in":"query","name":"reverse","schema":{"default":false,"type":"boolean"}}},"schemas":{"RoutingQueueList":{"type":"object","additionalProperties":false,"required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/RoutingQueue"}}}},"RoutingQueue":{"type":"object","additionalProperties":false,"required":["id","workspaceId","name","description","priority","teams"],"properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string"},"priority":{"type":"integer","minimum":0,"maximum":100},"teams":{"type":"array","items":{"$ref":"#/components/schemas/RoutingQueueTeam"}},"queuedItems":{"properties":{"email":{"type":"array","items":{"$ref":"#/components/schemas/QueueItem"}},"messaging":{"type":"array","items":{"$ref":"#/components/schemas/QueueItem"}},"voice":{"type":"array","items":{"$ref":"#/components/schemas/QueueItem"}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"RoutingQueueTeam":{"type":"object","additionalProperties":false,"required":["type","ids"],"properties":{"type":{"type":"string","description":"Type of the team","enum":["primary","secondary"]},"ids":{"type":"array","description":"List of Team IDs","items":{"type":"string","format":"uuid"}}}},"QueueItem":{"required":["rootItemId","capacityType","QueuedAt"],"properties":{"rootItemId":{"type":"string","format":"uuid"},"capacityType":{"type":"string"},"QueuedAt":{"type":"string","format":"date-time"}}},"pagination":{"properties":{"nextPageToken":{"description":"The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display.","type":"string"},"total":{"description":"The total number of results across all pages.","type":"integer"}},"type":"object"}}},"paths":{"/workspaces/{workspaceId}/inbox/routing-queues":{"get":{"description":"Retrieve list of routing queues","operationId":"listRoutingQueues","parameters":[{"$ref":"#/components/parameters/pagination.param.limit"},{"$ref":"#/components/parameters/pagination.param.pageToken"},{"$ref":"#/components/parameters/pagination.param.reverse"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RoutingQueueList"},{"$ref":"#/components/schemas/pagination"}]}}},"description":"OK"}},"summary":"List routing queues","tags":["routing_queue"]}}}}
```

## Create a routing queue

> Create a new routing queue

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Manage routing queues","name":"routing_queue"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token","scheme":"AccessKey","type":"http"}},"schemas":{"CreateRoutingQueue":{"type":"object","additionalProperties":false,"required":["name","priority","teams"],"properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string"},"priority":{"type":"integer","minimum":0,"maximum":100},"teams":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/RoutingQueueTeam"}}}},"RoutingQueueTeam":{"type":"object","additionalProperties":false,"required":["type","ids"],"properties":{"type":{"type":"string","description":"Type of the team","enum":["primary","secondary"]},"ids":{"type":"array","description":"List of Team IDs","items":{"type":"string","format":"uuid"}}}},"RoutingQueue":{"type":"object","additionalProperties":false,"required":["id","workspaceId","name","description","priority","teams"],"properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string"},"priority":{"type":"integer","minimum":0,"maximum":100},"teams":{"type":"array","items":{"$ref":"#/components/schemas/RoutingQueueTeam"}},"queuedItems":{"properties":{"email":{"type":"array","items":{"$ref":"#/components/schemas/QueueItem"}},"messaging":{"type":"array","items":{"$ref":"#/components/schemas/QueueItem"}},"voice":{"type":"array","items":{"$ref":"#/components/schemas/QueueItem"}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"QueueItem":{"required":["rootItemId","capacityType","QueuedAt"],"properties":{"rootItemId":{"type":"string","format":"uuid"},"capacityType":{"type":"string"},"QueuedAt":{"type":"string","format":"date-time"}}},"error.detailed":{"additionalProperties":false,"description":"An error returned from the API that includes additional details about the error. The `details` property can contain any additional information about the error that may be helpful for debugging or understanding the error.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":true,"description":"Any additional information about the error that may be helpful for debugging or understanding the error.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"DetailedError","type":"object"},"error.validation":{"additionalProperties":false,"description":"A validation error returned from the API. The `details` map keys are JSON paths\npointing into the request body / parameters; values are arrays of human-readable\nmessages describing each problem with that path.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"Per-field validation messages keyed by JSON path.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"ValidationError","type":"object"}},"responses":{"error.response.not_found":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"The requested resource was not found."},"error.response.invalid_request":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.validation"}}},"description":"The request contains invalid parameters or body fields."}}},"paths":{"/workspaces/{workspaceId}/inbox/routing-queues":{"post":{"description":"Create a new routing queue","operationId":"createRoutingQueue","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoutingQueue"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingQueue"}}},"description":"created"},"404":{"$ref":"#/components/responses/error.response.not_found"},"422":{"$ref":"#/components/responses/error.response.invalid_request"}},"summary":"Create a routing queue","tags":["routing_queue"]}}}}
```

## Get routing queue

> Retrieves Routing queue.

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Manage routing queues","name":"routing_queue"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token","scheme":"AccessKey","type":"http"}},"schemas":{"RoutingQueue":{"type":"object","additionalProperties":false,"required":["id","workspaceId","name","description","priority","teams"],"properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string"},"priority":{"type":"integer","minimum":0,"maximum":100},"teams":{"type":"array","items":{"$ref":"#/components/schemas/RoutingQueueTeam"}},"queuedItems":{"properties":{"email":{"type":"array","items":{"$ref":"#/components/schemas/QueueItem"}},"messaging":{"type":"array","items":{"$ref":"#/components/schemas/QueueItem"}},"voice":{"type":"array","items":{"$ref":"#/components/schemas/QueueItem"}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"RoutingQueueTeam":{"type":"object","additionalProperties":false,"required":["type","ids"],"properties":{"type":{"type":"string","description":"Type of the team","enum":["primary","secondary"]},"ids":{"type":"array","description":"List of Team IDs","items":{"type":"string","format":"uuid"}}}},"QueueItem":{"required":["rootItemId","capacityType","QueuedAt"],"properties":{"rootItemId":{"type":"string","format":"uuid"},"capacityType":{"type":"string"},"QueuedAt":{"type":"string","format":"date-time"}}},"error.detailed":{"additionalProperties":false,"description":"An error returned from the API that includes additional details about the error. The `details` property can contain any additional information about the error that may be helpful for debugging or understanding the error.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":true,"description":"Any additional information about the error that may be helpful for debugging or understanding the error.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"DetailedError","type":"object"}},"responses":{"error.response.not_found":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"The requested resource was not found."}}},"paths":{"/workspaces/{workspaceId}/inbox/routing-queues/{routingQueueId}":{"get":{"description":"Retrieves Routing queue.","operationId":"getRoutingQueue","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingQueue"}}},"description":"ok"},"404":{"$ref":"#/components/responses/error.response.not_found"}},"summary":"Get routing queue","tags":["routing_queue"]}}}}
```

## Update a Routing queue

> Modify the details of a specific routing queue.

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Manage routing queues","name":"routing_queue"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token","scheme":"AccessKey","type":"http"}},"schemas":{"UpdateRoutingQueue":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string"},"priority":{"type":"integer","minimum":0,"maximum":100},"teams":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/RoutingQueueTeam"}}}},"RoutingQueueTeam":{"type":"object","additionalProperties":false,"required":["type","ids"],"properties":{"type":{"type":"string","description":"Type of the team","enum":["primary","secondary"]},"ids":{"type":"array","description":"List of Team IDs","items":{"type":"string","format":"uuid"}}}},"RoutingQueue":{"type":"object","additionalProperties":false,"required":["id","workspaceId","name","description","priority","teams"],"properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string"},"priority":{"type":"integer","minimum":0,"maximum":100},"teams":{"type":"array","items":{"$ref":"#/components/schemas/RoutingQueueTeam"}},"queuedItems":{"properties":{"email":{"type":"array","items":{"$ref":"#/components/schemas/QueueItem"}},"messaging":{"type":"array","items":{"$ref":"#/components/schemas/QueueItem"}},"voice":{"type":"array","items":{"$ref":"#/components/schemas/QueueItem"}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"QueueItem":{"required":["rootItemId","capacityType","QueuedAt"],"properties":{"rootItemId":{"type":"string","format":"uuid"},"capacityType":{"type":"string"},"QueuedAt":{"type":"string","format":"date-time"}}},"error.detailed":{"additionalProperties":false,"description":"An error returned from the API that includes additional details about the error. The `details` property can contain any additional information about the error that may be helpful for debugging or understanding the error.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":true,"description":"Any additional information about the error that may be helpful for debugging or understanding the error.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"DetailedError","type":"object"},"error.validation":{"additionalProperties":false,"description":"A validation error returned from the API. The `details` map keys are JSON paths\npointing into the request body / parameters; values are arrays of human-readable\nmessages describing each problem with that path.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"Per-field validation messages keyed by JSON path.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"ValidationError","type":"object"}},"responses":{"error.response.not_found":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"The requested resource was not found."},"error.response.invalid_request":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.validation"}}},"description":"The request contains invalid parameters or body fields."}}},"paths":{"/workspaces/{workspaceId}/inbox/routing-queues/{routingQueueId}":{"patch":{"description":"Modify the details of a specific routing queue.","operationId":"updateRoutingQueue","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoutingQueue"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingQueue"}}},"description":"Updated"},"404":{"$ref":"#/components/responses/error.response.not_found"},"422":{"$ref":"#/components/responses/error.response.invalid_request"}},"summary":"Update a Routing queue","tags":["routing_queue"]}}}}
```

## Delete a Routing queue

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

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Manage routing queues","name":"routing_queue"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token","scheme":"AccessKey","type":"http"}},"responses":{"error.response.not_found":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"The requested resource was not found."}},"schemas":{"error.detailed":{"additionalProperties":false,"description":"An error returned from the API that includes additional details about the error. The `details` property can contain any additional information about the error that may be helpful for debugging or understanding the error.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":true,"description":"Any additional information about the error that may be helpful for debugging or understanding the error.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"DetailedError","type":"object"}}},"paths":{"/workspaces/{workspaceId}/inbox/routing-queues/{routingQueueId}":{"delete":{"description":"Delete a Routing queue. Items on the queue will be un-queued, then queue will be deleted.","operationId":"deleteRoutingQueue","responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/error.response.not_found"}},"summary":"Delete a Routing queue","tags":["routing_queue"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/api/collaborations-api/api-reference/routing-queues.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
