Skip to main content
PATCH
/
sandboxes
/
{sandbox_id}
/
timeout
Set Timeout
curl --request PATCH \
  --url https://api.declaw.ai/sandboxes/{sandbox_id}/timeout \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "timeout": 123
}'
{
  "ok": true
}
Updates the timeout field stored on the sandbox. Pass 0 to disable auto-kill. This endpoint updates the persisted value only — it does not restart any existing in-flight countdown timer that was set at creation time. Use this endpoint to extend a sandbox’s lifetime before it expires, or to reduce the timeout if you want to reclaim resources sooner.

Path Parameters

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

Request Body

timeout
integer
required
New timeout value in seconds. Pass 0 to disable auto-kill.Example: 600

Response

ok
boolean
Always true when the update succeeds.

Example

curl -X PATCH https://api.declaw.ai/sandboxes/sbx-a1b2c3d4/timeout \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "timeout": 600 }'
Response
{
  "ok": true
}

Error Responses

StatusCause
400Invalid request body
401Missing or invalid API key
404Sandbox not found