# Workspaces and teams

A **workspace** is where your work lives: your providers, connected accounts, logs, and approval settings. Log storage and [human approval](/policies/human-approval/) are both controlled per workspace, so each workspace can be set up differently.

- Every account has a personal workspace, and it's yours alone.
- A **team** is a shared workspace. Create one to work on the same providers with colleagues, with its own log and approval settings.
- Teams are available on the **Business** plan and above (5 team seats on Business). See [Plans](/guides/plans/).

---

## Pin a project to a workspace

A project is tied to a single Swytchcode workspace at a time. Most projects use whichever workspace you're signed into. If you work across multiple teams or clients, pin the project explicitly:

```bash
swy auth workspace
swy auth workspace <alias-or-uuid>
```

`swy auth workspace` with no argument shows the current workspace; passing an alias or UUID switches the project to it. The alias `swy auth link` does the same thing.

The selected workspace is stored in `.swytchcode/workspace.json` and is local to the machine.

---

## Inviting people

Invite colleagues by email and choose a role for them. They join once they accept the invitation.

| Role | What they can do |
|---|---|
| **Owner** (whoever created the team) | Everything, including deleting the team |
| **Admin** | Manage the team and its members, create providers, and change the workspace's approval settings |
| **Viewer** | View the team's work and members |
| **Billing** | View the team and its members |

---

## Seats and invitations

- Each team member takes one seat. If your plan's seats are full, new invitations can't be accepted until you free one up or upgrade.
- If your plan changes to one without team seats, existing invitations can no longer be accepted.
- Private providers in a team workspace are hidden from people outside the team.

---

## Logs

Turn on log storage for a workspace to keep a searchable history of the commands run in it, and browse it from your dashboard. Logs are set up **per workspace**: turn them on for the workspaces that need them and leave them off for the rest.

- Log storage is off by default. Turn it on in each workspace's settings.
- In a team workspace, everyone in the team shares the same logs. It's a per-workspace setting, not a per-person one.
- Each workspace's logs are kept separate from every other workspace. Only people with access to that workspace can see them.
- Turning it off stops new logs from being saved. Your existing logs are kept, so turning it back on doesn't lose anything.
- Logs are kept for **7 days** on Developer. Longer retention is available on higher plans (30 days on Pro, 90 days on Business). See [Plans](/guides/plans/).

Workspace logs are not the same as the local CLI audit trail. `swy audit` always records history on your machine, whether or not workspace log storage is on. You can optionally [sync that local history to the cloud](/cli/telemetry/#cloud-sync).

---

## Related

- [Human approval](https://docs.swytchcode.com/policies/human-approval/) - Require a person to approve high-impact commands, per workspace, in Slack or Telegram.
- [Plans](https://docs.swytchcode.com/guides/plans/) - Team seats, log retention, and which plans include workspaces.
- [CLI Authentication](https://docs.swytchcode.com/cli/authentication/) - Sign in, switch workspaces, and manage provider credentials.
- [CLI Data & Telemetry](https://docs.swytchcode.com/cli/telemetry/) - Local audit history and optional Cloud Sync.
