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

# Make an organization sandbox private

> Make a shared organization sandbox private again, at once. Only you can then use it.
Teammates still see it in their list and can stop it. Their SSH keys are removed from
the running machine.

Nothing on the sandbox changes: files, installs and its environment stay. Undo with
`POST /sandboxes/{sandboxId}/share`.

Only the person who created the sandbox can make it private, and only a sandbox billed
to an organization. Making a private sandbox private is a no-op.




## OpenAPI

````yaml openapi/boat-v1.yaml POST /sandboxes/{sandboxId}/unshare
openapi: 3.1.0
info:
  title: Boat Public API v1
  version: 1.0.0
  description: >
    Public JSON API for creating, operating, prompting, observing, and exposing
    sandboxes from backend services, CI jobs, hosted workers, and Boat
    automation products.


    The v1 reference intentionally documents the developer integration surface
    only. Dashboard billing actions are not part of v1.
servers:
  - url: https://boat.dev/api/v1
security:
  - BoatBearerAuth: []
tags:
  - name: Boat
    description: >-
      Unified Boat account, setup, lifecycle, prompting, event history, desktop
      access, and SSH operations.
paths:
  /sandboxes/{sandboxId}/unshare:
    post:
      tags:
        - Boat
      summary: Make an organization sandbox private
      description: >
        Make a shared organization sandbox private again, at once. Only you can
        then use it.

        Teammates still see it in their list and can stop it. Their SSH keys are
        removed from

        the running machine.


        Nothing on the sandbox changes: files, installs and its environment
        stay. Undo with

        `POST /sandboxes/{sandboxId}/share`.


        Only the person who created the sandbox can make it private, and only a
        sandbox billed

        to an organization. Making a private sandbox private is a no-op.
      operationId: unshare
      parameters:
        - $ref: '#/components/parameters/SandboxId'
      responses:
        '200':
          description: The sandbox is private.
          content:
            application/json:
              schema:
                type: object
                properties:
                  sandbox:
                    $ref: '#/components/schemas/Sandbox'
                  message:
                    type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    SandboxId:
      name: sandboxId
      in: path
      required: true
      schema:
        type: string
        pattern: ^bx_[23456789abcdefghjkmnpqrstuvwxyz]{8}$
      description: Public Sandbox id returned by create/list/get sandbox calls.
  schemas:
    Sandbox:
      type: object
      required:
        - id
        - name
        - state
        - desktopAvailable
        - snapshotAvailable
      properties:
        id:
          type: string
          pattern: ^bx_[23456789abcdefghjkmnpqrstuvwxyz]{8}$
          examples:
            - bx_23456789
        name:
          type: string
          examples:
            - Boat 2026-05-31 12:00
        state:
          type: string
          enum:
            - init
            - provisioning
            - provisioned
            - cloning
            - ready
            - idle
            - running
            - archiving
            - archived
            - error
            - cancelled
          description: >-
            `cancelled` is terminal: a create or fork that could not get a
            machine was removed. `GET /sandboxes/{sandboxId}` reports it once,
            with only `id`, `state` and `error`, then answers 404.
        error:
          type:
            - string
            - 'null'
          description: Why the sandbox is stopped, failed or cancelled, or null.
        dataExpiredAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When Boat deleted the snapshot data of this stopped sandbox, 14 days
            after it stopped. Resume and fork then fail with `409
            snapshot_data_expired`. Null while the data is kept.
        health:
          type: string
          enum:
            - ok
            - degraded
          description: >-
            `degraded` when the machine is alive but Boat cannot fully reach it
            (for example a firewall rule inside the sandbox blocks the tunnel).
            The sandbox keeps running.
        healthReason:
          type:
            - string
            - 'null'
          description: Why the sandbox is degraded, or null.
        degradedSince:
          type:
            - string
            - 'null'
          format: date-time
          description: When the sandbox became degraded, or null.
        hydrated:
          type: boolean
          description: >-
            True once every file of the sandbox's snapshot is on its disk. A
            resumed or forked sandbox is usable before that: its files keep
            copying in the background, and its docker volumes move onto the real
            disk near the end. Its docker containers start earlier; at that
            point their volume mounts move onto the real disk in place, without
            a restart. The `sandbox.hydrated` webhook fires at the same moment
            this turns true. A sandbox that restored nothing is hydrated from
            the start.
        hydratedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When the last resume or fork finished copying files in, or null.
        hydration:
          description: >-
            Restore progress while `hydrated` is false, on GET /sandboxes/{id}
            only. Null in lists, after hydration, or when the sandbox does not
            answer within 1.5 s.
          oneOf:
            - type: 'null'
            - type: object
              required:
                - phase
                - entriesDone
                - entriesTotal
                - percent
              properties:
                phase:
                  type: string
                  description: >-
                    Restore step: `dvol` (docker volumes), `sysdelta` (system
                    files), `images` (saved docker images), `hydrating` (the
                    home directory), `reconciling` (the last check). `degraded`
                    and `stuck` mean a step failed and is retried.
                entriesDone:
                  type: integer
                  description: Files, directories and links copied in so far.
                entriesTotal:
                  type:
                    - integer
                    - 'null'
                  description: >-
                    Files, directories and links this restore copies in. Null
                    for the first seconds, until the system files are counted.
                percent:
                  type:
                    - integer
                    - 'null'
                  description: >-
                    entriesDone of entriesTotal, 0-99. Files you change during
                    the restore are yours, not copied, so it can stop short of
                    99; `hydrated` is the end signal.
        type:
          type: string
          enum:
            - small
            - default
            - large
            - xlarge
          description: >-
            Current machine size: what the sandbox was created with, or the size
            it was last resumed or forked onto.
        vcpu:
          type: integer
          description: vCPUs guaranteed by this sandbox's type.
          examples:
            - 4
        memoryGB:
          type: integer
          description: RAM in GB guaranteed by this sandbox's type.
          examples:
            - 8
        billingMultiplier:
          type: number
          description: >-
            Rate at which this sandbox consumes machine time. 0.5 for `small`, 1
            for `default`, 2 for `large`, and 50/9 (about 5.56) for `xlarge`.
          examples:
            - 1
        machineProvider:
          type:
            - string
            - 'null'
          enum:
            - hetzner
            - baremetal
            - null
          description: >-
            Machine provider of the machine the sandbox is on, or null when it
            has no machine.
        url:
          type:
            - string
            - 'null'
          format: uri
          description: Machine URL when assigned.
        ip:
          type:
            - string
            - 'null'
          description: Machine IPv6 or IPv4 address when assigned.
        sshEndpoint:
          type:
            - string
            - 'null'
          description: >-
            Public IPv4 `host:port` that forwards to the sandbox SSH server. Set
            only when the machine has no public IPv4 of its own; null otherwise.
            Connect with `ssh -p <port> user@<host>`.
          examples:
            - 203.0.113.10:22001
        createdAt:
          type:
            - string
            - 'null'
          format: date-time
        updatedAt:
          type:
            - string
            - 'null'
          format: date-time
        archiveAfter:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the sandbox stops by itself (the stop starts within about 5
            seconds), or null when auto-stop is disabled. A sandbox whose agent
            is working gets a fresh full TTL, and this time moves forward.
        ttlSeconds:
          type:
            - integer
            - 'null'
          description: >-
            The auto-stop length as last set on create, resume, fork or PATCH,
            or null when auto-stop is disabled.
        desktopAvailable:
          type: boolean
        desktopUrl:
          type:
            - string
            - 'null'
          format: uri
          description: Secret-bearing desktop stream URL when available. Redact from logs.
        snapshots:
          type: boolean
          description: False when the sandbox was created with snapshots off.
        monitoring:
          type: boolean
          description: False when the sandbox was created with monitoring off.
        snapshotAvailable:
          type: boolean
        snapshotCompletedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Timestamp of the most recent successfully completed snapshot, or
            null.
        snapshotVerifiedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Last time a snapshot confirmed the sandbox's saved state, including
            checks that found nothing new to save. Falls back to
            `snapshotCompletedAt`; null if never.
        team:
          type:
            - object
            - 'null'
          description: >-
            The organization billed for this sandbox, or null when the owner is
            billed.
          required:
            - id
            - name
          properties:
            id:
              type: string
            name:
              type: string
        createdBy:
          type:
            - string
            - 'null'
          description: >-
            Display name (or email) of the person who created the sandbox.
            Organization members see every sandbox the organization pays for, so
            this says whose it is.
        createdById:
          type:
            - string
            - 'null'
          description: Account id of the person who created the sandbox.
        access:
          type: string
          enum:
            - owner
            - use
            - view
          description: >-
            What you may do with this sandbox. `owner`: you created it. `use`: a
            teammate's organization sandbox that is `shared` (see `visibility`),
            so you can open, run commands in, prompt, resume and stop it.
            `view`: a teammate's organization sandbox that is `private`, so you
            can see it and stop it until they share it (`POST
            /sandboxes/{sandboxId}/share`).
        holdsCreatorLogins:
          type: boolean
          description: >-
            True while the sandbox still holds its creator's personal logins
            (GitHub token, model logins, secrets). Other members can only see
            such a sandbox.
        visibility:
          type:
            - string
            - 'null'
          enum:
            - shared
            - private
            - null
          description: >-
            Organization sandboxes only; null for a personal sandbox. `shared`:
            every member can use it. It holds none of its creator's personal
            logins (`noEnv`, shared and restarted, or created on an environment
            that passes nothing) and its creator did not make it private.
            `private`: only its creator can use it. It holds their logins, or
            its creator made it private (`POST /sandboxes/{sandboxId}/unshare`,
            or the organization's `newSandboxesPrivate` default).
        cost:
          type: object
          description: >-
            Only with `include=cost` on `GET /sandboxes`. Machine time this
            sandbox used this calendar month (UTC), at list price. Same meter as
            `GET /sandboxes/{sandboxId}/usage`.
          required:
            - since
            - seconds
            - dollars
          properties:
            since:
              type: string
              format: date-time
              description: The 1st of this month, 00:00 UTC.
            seconds:
              type: integer
              description: Billable machine-seconds, size multiplier applied.
            dollars:
              type: number
              description: seconds / secondsPerDollar, at list price.
        wipePendingUntilRestart:
          type: boolean
          description: >-
            True once the sandbox is shared but not restarted yet. Its creator's
            logins are wiped at its next start, and the organization can use it
            from then on.
        subdomain:
          type:
            - string
            - 'null'
          description: >-
            The sandbox's stable three-word subdomain slug (e.g.
            "frazil-pneuma-rallye"), or null before one is assigned.
        lastSnapshotAttemptAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Timestamp of the most recent snapshot attempt of any status (queued,
            in_progress, completed, failed, cancelled), or null. Use with
            snapshotCompletedAt to detect snapshots that keep failing.
        lastSnapshotStatus:
          type:
            - string
            - 'null'
          enum:
            - queued
            - in_progress
            - completed
            - failed
            - cancelled
            - null
          description: >-
            Status of the most recent snapshot attempt, or null if none. A value
            other than completed while snapshotCompletedAt stays stale indicates
            failing snapshots.
        setupStatus:
          type:
            - string
            - 'null'
          enum:
            - pending
            - running
            - done
            - failed
            - null
          description: >-
            Outcome of the create-time `setupScript`: `pending` (stored, not yet
            started), `running` (executing on the sandbox in the background),
            `done` (exit code 0) or `failed` (non-zero exit, or the sandbox lost
            track of the process). Null when the sandbox was created without a
            setup script.
        setupError:
          type:
            - string
            - 'null'
          description: >-
            Short failure detail (exit code plus a stderr tail) when
            `setupStatus` is `failed`; while `pending`, may carry the last
            start/upload error from a retry in progress. Otherwise null.
        environment:
          type:
            - string
            - 'null'
          description: >-
            Name of the sandbox environment this sandbox is running, or null if
            it is attached to none (a `noEnv` sandbox, or one whose environment
            was deleted). A sandbox freezes onto one environment version when it
            starts and keeps it for life, so this is what the sandbox actually
            holds, not what the environment says today.
          examples:
            - base
        environmentVersion:
          type:
            - integer
            - 'null'
          description: >-
            Version number of `environment` that this sandbox is pinned to.
            Compare it against the environment's latest version to see whether
            an upgrade is pending: a sandbox below the latest is still running
            the older configuration until someone calls `POST
            /environments/{environmentId}/upgrade`.
          examples:
            - 3
        stop:
          description: >-
            The last stop you requested (`POST /sandboxes/{sandboxId}/stop`), or
            null if you never stopped this sandbox.
          oneOf:
            - $ref: '#/components/schemas/StopOperation'
            - type: 'null'
    StopOperation:
      type: object
      required:
        - id
        - status
        - requestedAt
        - lastAttemptAt
        - error
        - endedAt
      properties:
        id:
          type: string
          description: >-
            Stable id of this stop. Calling stop again while it is pending
            returns the same id.
          examples:
            - stop_3f9a1c2e7b4d5a60
        status:
          type: string
          enum:
            - pending
            - failing
            - completed
            - superseded
          description: >-
            `pending`: accepted, the sandbox is archiving. `failing`: the last
            attempt failed (see `error`); it is retried automatically until the
            sandbox archives. Running commands or prompts does not cancel it.
            `completed`: the sandbox is archived. `superseded`: a resume ended
            it before it completed.
        requestedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the stop was accepted. On the sandbox, null once it has ended.
            Read by id (`GET /sandboxes/{sandboxId}/stops/{stopId}`), it is
            kept.
        lastAttemptAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When the last archival attempt ended.
        error:
          type:
            - string
            - 'null'
          description: >-
            Why the last attempt failed, while `status` is `failing`. Otherwise
            null.
        endedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When the stop completed or was superseded.
    ErrorEnvelope:
      type: object
      required:
        - ok
        - type
        - status
        - code
        - message
        - error
        - requestId
      properties:
        ok:
          type: boolean
          examples:
            - false
        type:
          type: string
          examples:
            - sandbox.error
        status:
          type: integer
          examples:
            - 409
        code:
          type: string
          examples:
            - provider_not_configured
        message:
          type: string
          examples:
            - Prompting is locked until Codex is configured on the Agents page.
        requestId:
          type: string
          examples:
            - req_01HX...
        error:
          type: object
          required:
            - code
            - message
            - status
          properties:
            code:
              type: string
            message:
              type: string
            status:
              type: integer
            details:
              type: object
              additionalProperties: true
  responses:
    BadRequest:
      description: Invalid request body or parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            invalid:
              value:
                ok: false
                type: sandbox.error
                status: 400
                code: invalid_json
                message: Request body must be valid JSON.
                error:
                  code: invalid_json
                  message: Request body must be valid JSON.
                  status: 400
                requestId: req_01HX...
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            unauthorized:
              value:
                ok: false
                type: sandbox.error
                status: 401
                code: unauthorized
                message: Unauthorized
                error:
                  code: unauthorized
                  message: Unauthorized
                  status: 401
                requestId: req_01HX...
    Forbidden:
      description: Authenticated token is not allowed to perform this action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            forbidden:
              value:
                ok: false
                type: sandbox.error
                status: 403
                code: forbidden
                message: Forbidden
                error:
                  code: forbidden
                  message: Forbidden
                  status: 403
                requestId: req_01HX...
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    BoatBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sandbox_api_key
      description: >-
        Boat bearer token in the form `boat_...`. Service API keys authenticate
        sandbox operations.

````

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