Report worker telemetry for a run lane (heartbeat + events)
const url = 'https://example.com/api/agents/runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/events';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"worker_id":"example","lease_seconds":1,"phase":"example","log_line":"example","events":[{"type":"heartbeat","payload":{}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/agents/runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/events \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "worker_id": "example", "lease_seconds": 1, "phase": "example", "log_line": "example", "events": [ { "type": "heartbeat", "payload": {} } ] }'Worker telemetry sidecar. Renews the lane’s claim lease, applies the latest
phase/log line, and appends batched lifecycle events. Guarded by worker_id
— only the worker holding the claim may report (else 409). Rate limited (600/min/IP).
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
object
object
Responses
Section titled “ Responses ”Telemetry recorded; updated run returned
object
object
Identity of the worker holding the claim (null until claimed).
Claim lease deadline; reclaimed if a heartbeat does not renew it.
Invalid request
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
Not authenticated
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
True if re-linking GitHub may fix the issue
Forbidden
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
Not found
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
Resource state conflict
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
Rate limited
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
Seconds until the rate limit resets
Headers
Section titled “Headers ”Server error
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)