> ## Documentation Index
> Fetch the complete documentation index at: https://docs.boat.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandboxes your team shares

> Every member sees the sandboxes the organization pays for. What each member can do with them, and how to share a sandbox that holds your logins.

In the scope of an organization, `boat list`, `GET /sandboxes` and the dashboard show two sets of sandboxes:

* Your own sandboxes.
* **Every sandbox the organization pays for**, whoever created it.

Each sandbox shows who created it (`createdBy`) and what you can do with it (`access`).

## Access levels

| `access` | Who | What you can do |
| - | - | - |
| `owner` | You created it | Everything |
| `use` | A teammate's sandbox that holds none of their personal logins | Open it, SSH, run commands, read and write files, prompt its agent, open ports, resume and stop it |
| `view` | A teammate's sandbox that still holds their personal logins | See it, its usage, and stop it |

## Why `view` exists

A sandbox can get these from its creator, when its environment passes them:

* GitHub token.
* Claude and Codex logins.
* Environment secrets.

Anyone with a shell in that sandbox could act as that person. So a teammate gets a shell only when none of these are on the sandbox.

A sandbox created with `--no-env` is `use` for every member from the start. Pick this setup for agents that the whole team runs. Give these agents the team's own model keys with `--env`. Do not give them the logins of one person.

## Share a sandbox that holds your logins

The creator of the sandbox runs `share`. Then:

* Boat never sends the creator's GitHub token, model logins, secret files or the sandbox's own CLI key to it again. The sandbox becomes `noEnv`.
* Boat deletes these from its disk when the sandbox next starts.
* Files and installs stay.
* You cannot undo a share.

A sandbox that runs when you share it still has your logins in the memory of its programs. It stays `view` for your team until you stop it and resume it. The response then shows `restartRequired: true`.

<CodeGroup>
  ```bash CLI theme={null}
  boat org switch acme               # the org's scope: boat list shows its sandboxes too
  boat list
  # bx_7k2m9qpd  running  2h 10m  research-agent  [org: acme]  by alex  view only: holds alex's logins
  # bx_4tr8wz3c  running  -       support-agent   [org: acme]  by alex
  boat stop bx_7k2m9qpd              # alex, the creator
  boat share bx_7k2m9qpd
  boat resume bx_7k2m9qpd            # comes back without alex's logins: every member can use it
  ```

  ```bash curl theme={null}
  curl -sS "$BOAT_API_BASE/sandboxes" -H "Authorization: Bearer $BOAT_API_KEY" -H "X-Boat-Org: acme"
  # -> sandboxes: [{ id, name, state, createdBy, access, holdsCreatorLogins, team, ... }]

  curl -sS -X POST "$BOAT_API_BASE/sandboxes/bx_7k2m9qpd/share" -H "Authorization: Bearer $BOAT_API_KEY"
  # -> { sandbox: { ... }, restartRequired: true }  when it was running: stop + resume it
  ```

  ```ts TypeScript theme={null}
  const { sandboxes } = await sandbox.sandboxes({ org: "acme" });
  for (const s of sandboxes) console.log(s.name, s.createdBy, s.access);
  await sandbox.share({ sandboxId: "bx_7k2m9qpd" }); // creator only
  ```

  ```python Python theme={null}
  page = sandbox.sandboxes(org="acme")
  for s in page.sandboxes:
      print(s.name, s.created_by, s.access)
  sandbox.share(sandbox_id="bx_7k2m9qpd")  # creator only
  ```
</CodeGroup>

## In the dashboard

| Row label | Means |
| - | - |
| **by alex** | A teammate, alex, created this sandbox. |
| **view only** | The sandbox still holds alex's logins. |
| **private** | Your own sandbox, not shared yet. To share it, pick **Share with org** in the row menu. |

## Errors

| Error | When |
| - | - |
| `403 sandbox_private` | A teammate tries to use a `view` sandbox. The error names whose logins the sandbox holds. |
| `403 owner_only` | A teammate tries an action that stays with the creator. |

These actions stay with the creator:

* Fork.
* Delete.
* Change its settings: name, subdomain, auto-stop.
* Any stop that deletes data: `--force`, or any stop of a sandbox with snapshots off. The organization owner can also do this.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.