# Update a sandbox

Collection: api
Human docs: https://zei.sh/docs/api

Change mutable sandbox configuration.

PATCH /public/sandboxes/:sandboxId
Permission: MACHINE_UPDATE.
Update name, templateId, region, CPU, memory, networkId, volumeIds, or labels.
Request body: {"name":"agent-run-final","cpu":6,"memory":8192,"labels":{"run":"2026-08-30"}}
Response: The updated sandbox record.
Set networkId to null to detach the current network.

Example:

```
curl -X PATCH https://api.zei.sh/api/v1/public/sandboxes/:sandboxId \
  -H "X-API-Key: $ZEISH_API_KEY"
  -H "Content-Type: application/json" \
  -d '{"name":"agent-run-final","cpu":6,"memory":8192,"labels":{"run":"2026-08-30"}}'
```
