`POST /snapshots/{id}/fork`

Creates count sandboxes from the snapshot (query param or body; body wins). All-or-nothing: a mid-fork failure rolls back. The optional body's publish maps host ports onto the fork (docker -p semantics); publish requires count 1 because host ports are exclusive.

### Authorizations

- `bearerAuth` — HTTP bearer. Daemon API key. Omit on a keyless loopback daemon.

### Path parameters

- `id` string · required — Snapshot ID, e.g. snap_ab12cd34.

### Query parameters

- `count` integer · optional — Number of sandboxes to fork (default 1). The body's count wins when both are set.

### Request body

`application/json`

- `count` integer · optional
- `publish` array of PortMapping · optional
  - `guest_port` integer · optional
  - `host_ip` string · optional
  - `host_port` integer · optional
  - `protocol` string · optional

### Responses

**201** — Created

`application/json`:

- `sandboxes` array of SandboxResponse | null · optional
  - `created_at` string (date-time) · optional
  - `id` string · optional
  - `memory_mib` integer · optional
  - `network` NetworkResponse · optional
    - `allowlist` array of string · optional
    - `enabled` boolean · optional
    - `gateway` string · optional
    - `guest_ip` string · optional
  - `profile` string · optional
  - `published` array of PortMapping · optional
    - `guest_port` integer · optional
    - `host_ip` string · optional
    - `host_port` integer · optional
    - `protocol` string · optional
  - `source_snapshot_id` string · optional
  - `vcpus` integer · optional
  - `workdir` string · optional

**400** — Bad Request

`application/json`:

- `error` string · optional

**403** — Forbidden

`application/json`:

- `error` string · optional

**404** — Not Found

`application/json`:

- `error` string · optional
