curl -X POST "https://app.runtm.com/api/cloud/sessions/ses_abc123/heartbeat" \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/sessions/ses_abc123/heartbeat",
headers={"Authorization": "Bearer runtm_xxx"},
)
data = response.json()
print(f"Will auto-pause at: {data['paused_at_estimate']}")
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/ses_abc123/heartbeat",
{
method: "POST",
headers: { "Authorization": "Bearer runtm_xxx" },
}
);
const data = await response.json();
console.log(`Will auto-pause at: ${data.paused_at_estimate}`);
{
"session_id": "ses_abc123",
"paused_at_estimate": "2026-05-09T22:00:00Z"
}
Lifecycle
Heartbeat (legacy)
Legacy keepalive endpoint - prefer the v2 refresh endpoint
POST
/
api
/
sessions
/
{session_id}
/
heartbeat
curl -X POST "https://app.runtm.com/api/cloud/sessions/ses_abc123/heartbeat" \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/sessions/ses_abc123/heartbeat",
headers={"Authorization": "Bearer runtm_xxx"},
)
data = response.json()
print(f"Will auto-pause at: {data['paused_at_estimate']}")
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/ses_abc123/heartbeat",
{
method: "POST",
headers: { "Authorization": "Bearer runtm_xxx" },
}
);
const data = await response.json();
console.log(`Will auto-pause at: ${data.paused_at_estimate}`);
{
"session_id": "ses_abc123",
"paused_at_estimate": "2026-05-09T22:00:00Z"
}
Deprecated. This endpoint relies on a side-effect-based keepalive. New integrations should use
POST /api/v2/sessions/{id}/refresh, which extends the sandbox TTL explicitly via the sandbox provider’s REST API.sessions:write
Path Parameters
string
required
The session ID (e.g.
ses_abc123).Headers
string
required
Bearer token. Example:
Bearer runtm_xxxstring
Scope to an organization.
Response
string
The session ID that received the heartbeat.
string
ISO 8601 estimated time when the session will auto-pause if no further heartbeats are sent.
curl -X POST "https://app.runtm.com/api/cloud/sessions/ses_abc123/heartbeat" \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/sessions/ses_abc123/heartbeat",
headers={"Authorization": "Bearer runtm_xxx"},
)
data = response.json()
print(f"Will auto-pause at: {data['paused_at_estimate']}")
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/ses_abc123/heartbeat",
{
method: "POST",
headers: { "Authorization": "Bearer runtm_xxx" },
}
);
const data = await response.json();
console.log(`Will auto-pause at: ${data.paused_at_estimate}`);
{
"session_id": "ses_abc123",
"paused_at_estimate": "2026-05-09T22:00:00Z"
}