Rensei docs
API ReferenceWorker Protocol

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.

POST
/api/workers/register

Authorization

AuthorizationBearer <token>

Rensei API key. Format: rsk_live_<random>. Generated in Settings or via POST /api/org/{orgId}/keys. Used by CLI (af), daemon, and programmatic integrations.

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

application/json

curl -X POST "https://example.com/api/workers/register" \  -H "Content-Type: application/json" \  -d '{    "hostname": "string"  }'
{
  "workerId": "string",
  "heartbeatInterval": 0,
  "pollInterval": 0,
  "runtimeToken": "string",
  "runtimeTokenExpiresAt": "2019-08-24T14:15:22Z"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}