Skip to main content
POST
Extends the sandbox’s idle timeout so it stays alive while the user is interacting. Call this periodically (e.g. every 5 minutes) while a workspace tab is open. This is the v2 replacement for the legacy POST /api/sessions/{session_id}/heartbeat. Unlike heartbeat, /refresh does not rely on a side-effect-based keepalive. It explicitly extends the TTL via the sandbox provider’s REST API. The session must be in running state. Required scope: sessions:write

Path Parameters

string
required
The session ID.

Headers

string
required
Bearer token. Example: Bearer runtm_xxx
string
Required when the session belongs to an organization.

Behavior

  • Extends the sandbox TTL by idle_timeout_minutes * 60 seconds (default 30 minutes).
  • The sandbox provider caps duration at 3600s, so longer values are clamped.
  • Reconciles with the sandbox provider before checking state. If the sandbox has been paused or expired between calls, returns an error so the caller can re-start the session.

Response

boolean
Always true on success.

Errors