Registra heartbeat
POST/v1/environments/{environment_id}/work/{work_id}/heartbeat
Nota: questi endpoint vengono chiamati automaticamente dal worker di ambiente predefinito fornito negli SDK e nella CLI, per orchestrare le sessioni con ambienti sandbox self-hosted. Sono inclusi qui come riferimento; non è necessario invocarli direttamente.
Registra un heartbeat per un elemento di lavoro per mantenere il lease.
Path parameters
Query parameters
Headers
Returns
Errors
Any method can also return the general HTTP errors.
Each code below is the value of error.details.error_code in the response body.
Registra heartbeat
curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID/heartbeat \
-X POST \
-H 'anthropic-version: 2026-10-21' \
-H 'anthropic-beta: managed-agents-2026-04-01' \
-H "Authorization: Bearer $ANTHROPIC_API_KEY"Response 200
{
"last_heartbeat": "last_heartbeat",
"lease_extended": true,
"state": "queued",
"ttl_seconds": 0,
"type": "work_heartbeat"
}Returns Examples
Response 200
{
"last_heartbeat": "last_heartbeat",
"lease_extended": true,
"state": "queued",
"ttl_seconds": 0,
"type": "work_heartbeat"
}