# List queues

> The live queues of the workspace in one region, newest first.

Source: https://docs.stacksync.com/api-reference/queues/list_queues

`GET https://api.stacksync.com/v1/workspaces/{workspace_id}/queues`

- Operation: `list_queues`
- Resource: Queues
- Access: read-only

## Authentication

- `Authorization: Bearer <key>`: A workspace API key (workspace_…, created by a workspace owner under Workspace settings > Stacksync API) acts with editor rights on that workspace only; a user API key (user_…, created under Profile > Stacksync API) acts as that user in every workspace they belong to. POST, PUT and PATCH requests must send Content-Type: application/json. Every authentication failure answers 403.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | integer | Yes | The workspace. List the ones your key can reach with GET /v1/workspaces. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer, 1 to 200, default 50 | No | Maximum number of items returned, at most 200 |
| `offset` | integer, at least 0, default 0 | No | Number of items skipped before the first one returned |
| `region` | string (besg \| usnv) | Yes | Data region of the resources: besg (Europe) or usnv (United States), as GET /v1/regions lists them. |

## Returns

### 200 OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | array of object (Queue) | Yes |  |
| `data[].queue_id` | string | Yes |  |
| `data[].queue_name` | string | Yes |  |
| `data[].queue_resource_id` | string | Yes |  |
| `data[].status` | string (running \| paused) | Yes |  |
| `data[].consumer_workflow_id` | string \| null | Yes | The workflow that receives the flushed records, if any |
| `data[].flush_batch_size` | integer | Yes | Records sent to the consumer workflow per flush |
| `data[].flush_record_max_age` | integer \| null | Yes | Seconds a record may wait before the queue flushes |
| `data[].flush_rate_limit_max_flush_count` | integer \| null | Yes | Maximum flushes per rate limit window |
| `data[].flush_rate_limit_time_window` | integer \| null | Yes | The rate limit window, in seconds |
| `data[].flush_strategy` | string (fifo \| lifo) | Yes | fifo sends the oldest records first, lifo the newest |
| `data[].parent_folder_id` | string \| null | Yes |  |
| `data[].created_time` | string (date-time) | Yes |  |
| `data[].last_modified_time` | string (date-time) | Yes |  |
| `data[].region` | string (besg \| usnv) | Yes |  |
| `has_more` | boolean | Yes | Whether more items follow this page: request the next one with offset + limit |
| `limit` | integer | Yes |  |
| `offset` | integer | Yes |  |

## Example request

```bash
curl -X GET "https://api.stacksync.com/v1/workspaces/{workspace_id}/queues?region=besg" \
  -H "Authorization: Bearer $STACKSYNC_API_KEY"
```

## Example response (200)

```json
{
  "data": [
    {
      "queue_id": "<queue_id>",
      "queue_name": "<queue_name>",
      "queue_resource_id": "<queue_resource_id>",
      "status": "running",
      "consumer_workflow_id": "<consumer_workflow_id>",
      "flush_batch_size": 0,
      "flush_record_max_age": 0,
      "flush_rate_limit_max_flush_count": 0,
      "flush_rate_limit_time_window": 0,
      "flush_strategy": "fifo",
      "parent_folder_id": "<parent_folder_id>",
      "created_time": "2027-01-15T09:00:00Z",
      "last_modified_time": "2027-01-15T09:00:00Z",
      "region": "besg"
    }
  ],
  "has_more": false,
  "limit": 0,
  "offset": 0
}
```

## Errors

| Status | Meaning | Body |
| --- | --- | --- |
| 400 | Bad Request | `{ "error": string, "msg": string, "field": string \| null }` |
| 403 | Forbidden | `{ "error": string, "msg": string, "field": string \| null }` |

## Related

- [API Reference overview](https://docs.stacksync.com/api-reference): base URLs, regions, pagination, idempotency and errors
- [Authentication](https://docs.stacksync.com/api-reference/authentication): API keys and the 403 answers
- OpenAPI document: https://docs.stacksync.com/openapi.json
- [List a queue's waiting records](https://docs.stacksync.com/api-reference/queues/list_queue_records)
- [Get a queue](https://docs.stacksync.com/api-reference/queues/get_queue)
- [Create a queue](https://docs.stacksync.com/api-reference/queues/create_queue)
- [Update a queue](https://docs.stacksync.com/api-reference/queues/update_queue)
- [Delete a queue](https://docs.stacksync.com/api-reference/queues/delete_queue)
- [Flush a queue](https://docs.stacksync.com/api-reference/queues/flush_queue)
- [Clear a queue's waiting records](https://docs.stacksync.com/api-reference/queues/clear_queue_records)