# uip or queues

> Syntax and options for `uip or queues`, which manages Orchestrator queue containers for transactional work items.

Manage Orchestrator **queues** — containers for work items that automations process transactionally. Queues are folder-scoped. For per-item operations inside a queue, see [`uip or queue-items`](./uip-or-queue-items.md).

For the cross-resource conventions (auth, folder scoping, key types, output envelope), see the [`uip or` overview](./uip-or.md).

## Synopsis

```
uip or queues list         --folder-path <path> | --folder-key <key> [-n <name>] [-l <n>] [--offset <n>] [--sort-by <field>]
uip or queues get          <queue-key>
uip or queues create       <name> --folder-path <path> | --folder-key <key> [options below]
uip or queues update       <queue-key> [options as for create]
uip or queues delete       <queue-key> --yes [-f]
uip or queues get-stats    --key <queue-key> [--folder-path <path> | --folder-key <key>] [-n <name>] [--from <date>] [--to <date>] [--all-fields]
uip or queues get-folders  <queue-key>
uip or queues share        <queue-key> --folder-path <path> | --folder-key <key>
uip or queues unshare      <queue-key> --folder-path <path> | --folder-key <key>
```

## list

List queues in a folder. **Requires `--folder-path` or `--folder-key`.** Filter: `-n, --name <name>`. `--sort-by <field>` sorts results (default `Id desc`).

```bash
uip or queues list --folder-path Shared
```

## get

Get queue details by key. **Cross-folder.**

## create

Create a queue in a folder. Requires `<name>`. Flags: `-d, --description`, `--max-retries`, `--sla-in-minutes <minutes>`, `--risk-sla-in-minutes <minutes>`, `--auto-retry` / `--no-auto-retry` (default on), `--retry-abandoned-items` / `--no-retry-abandoned-items`, `--enforce-unique-reference` / `--no-enforce-unique-reference`, `--encrypted`, `--retention-action <Delete|Archive|None>` (default `Delete`), `--retention-period <days>` (default `30`), `--stale-retention-action` (default `Delete`), `--stale-retention-period <days>` (default `180`).

```bash
uip or queues create InvoiceQueue --folder-path Shared \
  --max-retries 3 --retention-period 90
```

## update

Update queue properties by key. **Cross-folder.** Same flags as `create`, all optional.

## delete

Delete a queue by key. **Cross-folder.** Requires `-y, --yes` — the CLI never prompts for destructive operations. Add `-f, --force` to delete a queue that still has items — without it, a non-empty queue is refused; `--force` deletes the items along with the queue and implies `--yes`.

```bash
uip or queues delete a1b2c3d4-0000-0000-0000-000000000010 --yes
```

## get-stats

Get processing statistics (item counts, exception counts, processing times) for a queue. Unlike every other verb on this page, the queue is identified by a **required option**, not a positional argument: `--key <queue-key>`. Optional `-n, --name <name>` (contains-match, combined with `--key`), `--from <date>` / `--to <date>` (ISO 8601, filter by last-processed date), `--all-fields`.

```bash
uip or queues get-stats --key a1b2c3d4-0000-0000-0000-000000000001
```

## get-folders, share, unshare

Same semantics as the asset and bucket counterparts — see [`assets`](./uip-or-assets.md) and [`buckets`](./uip-or-buckets.md) for the shared model.

## Exit codes

See [Exit codes](./exit-codes.md) for the shared contract. `delete` exits `1` if `-y, --yes` is omitted.

## Related commands

- [`uip or queue-items`](./uip-or-queue-items.md) — per-item operations inside a queue.

## See also

- [`uip or` overview](./uip-or.md) — shared conventions for every `uip or` verb.
- [How-to: manage Orchestrator assets and queues](./howto-manage-resources.md) — bulk patterns for queue items.
