lease_seconds sets it,
between 60 and 604800 (7 days), and the default is 3600. The clock starts
when the sandbox starts running.lease_expired (HTTP 410), and the sandbox is
gone.1234POST /v1/sandboxes/{id}/lease Authorization: Bearer <key with sandboxes:write> {"seconds": 7200}
1{"generation": 3, "expires_at": "2026-10-19T14:02:11Z"}
seconds is counted from now, not from the current deadline, and must be
between 60 and 604800. Retrying a renewal is safe. A sandbox that is not running
answers invalid_argument. One whose lease has already run out answers
lease_expired.GET /v1/sandboxes/{id} shows the current lease as
"lease": {"generation": 3, "expires_at": "..."} while the sandbox is running."kind": "lease_warning", in
GET /v1/sandboxes/{id}/events. The SDKs surface it.PUT /v1/account/webhook {"url": "https://..."}, using a key with the keys
scope. The reply carries the signing secret, shown only that once. An empty
url removes the webhook. The URL must be https and must resolve to a
public address.12{"type": "sandbox.lease_warning", "sandbox_id": "sbx_...", "lease": {"generation": 3, "expires_at": "2026-10-19T14:02:11Z"}}
Runner-Signature: t=<unix seconds>,v1=<hex>, where
v1 is the HMAC-SHA256 of <t>.<raw body> under your secret. Verify it, and
refuse old timestamps. A failed delivery is retried a few times, then dropped.expires_at.GET /v1/sandboxes/{id} shows
"state": "terminated" with "error_code": "lease_expired", usually within
seconds. The sandbox's event history ends with a terminated event carrying
the same code, and it is kept for 30 days.