> ## Documentation Index
> Fetch the complete documentation index at: https://opensandbox-oc-s-762ac928075c46d2828bcb22.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Patch

Create a patch script that runs when a sandbox is spawned from a checkpoint. Patches apply in sequence order.

<ParamField path="checkpointId" type="string" required>
  Checkpoint ID
</ParamField>

<ParamField body="script" type="string" required>
  Bash script to execute on spawn
</ParamField>

<ParamField body="description" type="string">
  Human-readable description
</ParamField>

<ResponseExample>
  ```json 201 theme={null}
  {
    "patch": {
      "id": "pa-abc123",
      "checkpointId": "cp-abc123",
      "script": "apt install -y curl",
      "description": "Install curl",
      "strategy": "on_wake",
      "sequence": 1,
      "createdAt": "2025-01-15T10:30:00Z"
    }
  }
  ```
</ResponseExample>
