# sz workspaces list

The `sz workspaces list` command is part of the [Scheduler Zero CLI](/cli). Without --organization, lists visible organizations and then their workspace rows, flattening the results and adding organizationId and organizationName. With --organization, requests only that parent's workspace list and returns its underlying rows without adding those two fields. The command does not mutate an active workspace preference.

## Usage

```bash
sz workspaces list [options]
```

If you have not installed `sz` globally, replace `sz` in the usage above with `npx --yes @scheduler-zero/sz@latest` or `bunx @scheduler-zero/sz@latest`, preserving the arguments and options. See [installation](/cli/installation).

## Options

| Option | Meaning |
| --- | --- |
| `--api-key <key>` | API key (prefer SCHEDULER_ZERO_API_KEY) |
| `--base-url <url>` | API origin (default: https://api.schedulerzero.com) |
| `--organization <id>` | Organization id for workspaces list |
| `--json` | Emit machine-readable JSON |
| `--format table\|json` | Select output format |
| `-h, --help` | Show this help |

## Examples

The UUIDs below are illustrative; use IDs from your own visible workspaces and campaigns.

```bash
sz workspaces list --json
sz workspaces list --organization 22222222-2222-4222-8222-222222222222 --json
```

## Output and side effects

An array of workspace rows, with IDs, names, access/permission metadata and other contract fields. Unfiltered rows also have organizationId and organizationName. Where the API distinguishes metadata visibility from data access, inspect access and permissions rather than assuming every listed row permits campaign reads.

## Authorization

Each parent/workspace result is narrowed by current authorization and credential restrictions. A parent name or metadata-only row does not authorize workspace product operations.

## Underlying operations

- `organizations.list`
- `organizationWorkspaces.list`

Browser issuance stays a human-approved handoff where applicable; the command does not bypass that boundary. The exact product operation schemas are in [OpenAPI](/openapi.json) and [the REST Markdown reference](/rest-api/reference.md). For broader capabilities, use [MCP tools](/mcp/tools).

## Related documentation

[Campaign list](/cli/commands/campaigns-list) · [Organization list](/cli/commands/organizations-list) · [Workspace isolation](/cli/authentication)

[All CLI commands](/cli/commands) · [Troubleshooting](/cli/troubleshooting) · [This command as Markdown](/cli/commands/workspaces-list.md) · [CLI LLM index](/cli/llms.txt)

