Everstack
API ReferenceSandboxRenew Sandbox

Renew Sandbox Expiration

POST/v1/sandbox/{sandbox_id}/renew-expiration
POST/v1/sandbox/{'{sandbox_id}'}/renew-expiration

Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.

Description

Extends the idle timeout of a running sandbox by the specified number of seconds. This is useful for keeping a sandbox alive during long-running tasks or when an agent is idle but will resume shortly. The extension is added on top of the sandbox's current remaining lifetime.

Path Parameters

ParameterTypeRequiredDescription
sandbox_idstringYesSandbox ID or name

Request Body

PropertyTypeRequiredDescription
extra_secondsintegerYesNumber of additional seconds to add to the sandbox idle timeout

Responses

200 Success

PropertyTypeDescription
statusstringAlways "renewed" on success
extra_secondsintegerThe number of seconds that were added to the sandbox timeout

default An unexpected error response.

PropertyTypeDescription
codeinteger
messagestring
detailsobject[]

Request

curl -X POST "https://your-instance.example.com/v1/sandbox/sb_abc123/renew-expiration" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"extra_seconds":3600}'
const response = await fetch(
  "https://your-instance.example.com/v1/sandbox/sb_abc123/renew-expiration",
  {
    method: "POST",
    headers: {
      Authorization: "Bearer <token>",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      extra_seconds: 3600,
    }),
  }
);

const data = await response.json();
console.log(data); // { status: "renewed", extra_seconds: 3600 }
import requests

response = requests.post(
    "https://your-instance.example.com/v1/sandbox/sb_abc123/renew-expiration",
    headers={"Authorization": "Bearer <token>"},
    json={"extra_seconds": 3600},
)

print(response.json())  # {"status": "renewed", "extra_seconds": 3600}

Response

{"status": "renewed", "extra_seconds": 3600}
{"code": 0, "message": "string", "details": [{"@type": "string"}]}