# Fork

Fork a running sandbox. The copy has the same files and running processes, and its own id. A sandbox with volumes cannot be forked or paused; it can be stopped and started. To start many sandboxes with the same setup, build it once as a [template](https://groundbox.dev/docs/templates).

```
curl -X POST https://api.groundbox.dev/v1/sandboxes/sbx_.../fork \
  -H "Authorization: Bearer $GROUNDBOX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

A fork with `count` answers with a fork group. `groundbox sandbox fork-group get <group_id>` reads it and `groundbox sandbox fork-group rm <group_id>` deletes it and its copies.
