> ## 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.

# Which wallet a sandbox bills

> Set the active wallet for your account, or bill one sandbox to an organization without switching.

Every account has one **active wallet**. It is your personal account until you change it.

* A new sandbox bills the wallet that the request names.
* A request that names no wallet bills the active wallet.
* The active wallet is one setting on the account. The dashboard, the CLI and a bare API key all bill the same place.
* `GET /limits` reads the wallet that a create would bill.
* Boat fixes the wallet of a sandbox when it creates the sandbox.

## Name an organization

| Value | Means |
| - | - |
| The id (`team_…`) | That organization. |
| The name, as `GET /orgs` / `boat org list` show it | That organization. Case does not matter. |
| `personal` | Your own account. |

You need the id only when two organizations have the same name. Then a name gives `409 ambiguous_org`.

## Set or override the wallet

<CodeGroup>
  ```bash CLI theme={null}
  boat org                     # the wallet in effect right now
  boat org list                # organizations you belong to, ids and names
  boat org switch acme         # active wallet = acme, for the CLI, the dashboard and the API
  boat org switch personal     # back to your own account
  boat --org acme new          # bill one create to acme without switching
  ```

  ```bash curl theme={null}
  curl -sS "$BOAT_API_BASE/orgs" -H "Authorization: Bearer $BOAT_API_KEY"
  # -> orgs: [{ id, name, type, role, active }, ...]

  curl -sS -X PATCH "$BOAT_API_BASE/orgs/active" \
    -H "Authorization: Bearer $BOAT_API_KEY" -H "Content-Type: application/json" \
    -d '{ "org": "acme" }'                  # or the team_… id, or "personal"

  # one call elsewhere: header, query, or body
  curl -sS -X POST "$BOAT_API_BASE/sandboxes" -H "X-Boat-Org: acme" ...
  curl -sS "$BOAT_API_BASE/limits?org=acme" ...
  curl -sS -X POST "$BOAT_API_BASE/sandboxes" -d '{ "org": "acme" }' ...
  ```

  ```ts TypeScript theme={null}
  const { orgs } = await sandbox.listOrganizations();          // ids, names, active
  await sandbox.setActiveOrganization({ org: "acme" });
  await sandbox.create({ org: "acme" }); // one sandbox elsewhere
  ```

  ```python Python theme={null}
  from boat_sdk.models.active_org_update_request import ActiveOrgUpdateRequest
  from boat_sdk.models.create_sandbox_request import CreateSandboxRequest

  orgs = sandbox.list_organizations().orgs                     # ids, names, active
  sandbox.set_active_organization(ActiveOrgUpdateRequest(org="acme"))
  sandbox.create(CreateSandboxRequest(org="acme"))             # one sandbox elsewhere
  ```
</CodeGroup>

## In the dashboard

| Control | What it does |
| - | - |
| Sidebar, active wallet, **Change** | Sets the active wallet for the account. The CLI and the API follow. |
| **Viewing** dropdown at the top of a page | Changes only what that page shows. It opens on the active wallet. |


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