Daemon heartbeat (v1)
Resets the worker's Redis TTL and updates active session count. Requires a runtime JWT - registration tokens and legacy keys are not accepted on this endpoint.
Authorization
workerJwt Runtime JWT minted by the platform at worker registration. Three-segment dotted string. Claims include {jti, proj, org, sub (=workerId), reg, scope[]}. Use on all post-registration worker endpoints.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/daemon/heartbeat" \ -H "Content-Type: application/json" \ -d '{ "workerId": "string", "activeSessions": 0 }'{
"acknowledged": true,
"serverTime": "2019-08-24T14:15:22Z",
"pendingWorkCount": 0
}{
"error": "Session not found"
}{
"error": "Session not found"
}{
"error": "Session not found"
}Daemon-native worker registration
Preferred registration path for rensei-tui (`af`). Carries the `registrationToken` in the JSON body (not the `Authorization` header). Returns a `runtimeJwt` the daemon uses for all subsequent calls.
AF-compatible worker registration
AF-compatible registration endpoint. Accepts three auth modes: 1. `Authorization: Bearer rsk_live_*` or `rsp_live_*` (registration token in header). 2. Legacy `WORKER_API_KEY` (transitional; being removed). 3. User session cookie / `rsk_` API key with `projectId` in body (new-user onboarding). Returns a `runtimeToken` (and `runtimeTokenExpiresAt`) for runtime-JWT-capable callers; legacy callers receive `null` for these fields.