Skip to main content
POST
/
sandboxes
/
{sandbox_id}
/
snapshot
Create Snapshot
curl --request POST \
  --url https://api.declaw.ai/sandboxes/{sandbox_id}/snapshot \
  --header 'X-API-Key: <api-key>'
{
  "snapshot_id": "<string>",
  "sandbox_id": "<string>",
  "created_at": "<string>"
}
Takes a point-in-time snapshot of the sandbox VM. Snapshots capture the full memory and filesystem state, allowing you to restore a sandbox to a known-good checkpoint. Returns a Snapshot object with the new snapshot ID. Use snapshots to checkpoint long-running agent workflows, save expensive setup steps, or create reusable starting points.

Path Parameters

sandbox_id
string
required
The sandbox identifier. Format: sbx-<8 chars>.

Response

snapshot_id
string
Unique snapshot identifier. Format: snap-<8 chars>.
sandbox_id
string
The sandbox this snapshot was taken from.
created_at
string
UTC timestamp when the snapshot was created.

Example

curl -X POST https://api.declaw.ai/sandboxes/sbx-a1b2c3d4/snapshot \
  -H "X-API-Key: YOUR_API_KEY"
Response
{
  "snapshot_id": "snap-a1b2c3d4",
  "sandbox_id": "sbx-a1b2c3d4",
  "created_at": "2024-01-15T10:30:00Z",
  "source": "manual"
}

Error Responses

StatusCause
401Missing or invalid API key
404Sandbox not found
502Orchestrator unreachable or returned non-200
503Sandbox node unreachable