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

# Fork a sandbox from a durable checkpoint

> Sandbox forked successfully

> [!WARNING]
>
> **Confirm your deployment before running this request.** This page describes an API contract;
> a published reference does not establish hosted availability. Check the dated
> [host report](/api-reference/hosts) and obtain your deployment URL and credentials.
> Replace the example host if your provisioned service uses a different URL.

### Path parameters

**id** `string (uuid)` *required*

Sandbox identifier

### Headers

**Idempotency-Key** `string`

Persist before first dispatch; exact retries retain principal, route, body and original result. Do not change keys to escape an uncertain mutation.

### Request body

`ForkSandboxRequest`

**cpus** `string`

**memory** `string`

**timeout\_seconds** `integer`

Minimum: `60`. Maximum: `86400`.

**isolation** `string`

Allowed values: `'container'`, `'gvisor'`, `'microvm'`, `'kata'`, `'wasm'`.

**include\_env** `boolean`

Default: `true`.

**checkpoint\_name** `string`

Minimum length: `1`. Maximum length: `255`.

**checkpoint\_description** `string`

Maximum length: `1000`.

### Response

`ForkSandboxResponse`

**parent\_id** `string` *required*

**forked\_id** `string` *required*

**checkpoint\_id** `string` *required*

**status** `string` *required*

**created\_at** `string` *required*

**expires\_at** `string` *required*

**workspace\_strategy** `string` *required*

Allowed values: `'file-checkpoint'`, `'csi-snapshot'`.

**startup\_metrics** `any`

### Status codes

| Code | Meaning |
| - | - |
| `201` | Sandbox forked successfully |
| `400` | Invalid branch request |
| `404` | Source sandbox not found |
| `503` | Checkpoint service unavailable |

### Using this contract

Read the [source OpenAPI document](/spec/sandbox.json) for declared schemas and alternatives.
This page also includes documented corrections from the [spec overlays](https://github.com/stateset/docs/tree/main/spec/overlays).
Example IDs and values are illustrative; replace them with records from your workspace.

```bash cURL theme={null}
curl --silent --show-error --fail-with-body --request POST \
  --url 'https://api.sandbox.stateset.app/api/v1/sandbox/{id}/fork' \
  --header 'Authorization: ApiKey YOUR_API_KEY' \
  --header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}" \
  --header 'Content-Type: application/json' \
  --data '{
  "cpus": "1",
  "memory": "1Gi",
  "timeout_seconds": 250,
  "isolation": "container",
  "include_env": true,
  "checkpoint_name": "string",
  "checkpoint_description": "string"
}'
```

```json 201 theme={null}
{
  "parent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "forked_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "checkpoint_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "pending",
  "created_at": "2026-08-31T14:22:05Z",
  "expires_at": "2026-08-31T14:22:05Z",
  "workspace_strategy": "file-checkpoint",
  "startup_metrics": null
}
```


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