Skip to main content
POST
/
api
/
sandboxes
/
checkpoints
/
{checkpointId}
/
patches
Create Patch
curl --request POST \
  --url https://app.opencomputer.dev/api/sandboxes/checkpoints/{checkpointId}/patches \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "script": "<string>",
  "description": "<string>"
}
'
{
  "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"
  }
}
Create a patch script that runs when a sandbox is spawned from a checkpoint. Patches apply in sequence order.
checkpointId
string
required
Checkpoint ID
script
string
required
Bash script to execute on spawn
description
string
Human-readable description
{
  "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"
  }
}