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). `projectAdmissionVersion: 2` makes `projectIds` authoritative, including explicit empty = serve none. When the version is absent, the platform uses the bounded legacy projection. Returns a `runtimeToken` (and `runtimeTokenExpiresAt`) for runtime-JWT-capable callers; legacy callers receive `null` for these fields.

POST
/api/workers/register

Authorization

AuthorizationBearer <token>

Project-scoped worker registration token. Current handlers accept this only where explicitly listed.

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",
  "projectAdmissionVersion": 2,
  "appliedProjectIds": [
    "string"
  ]
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}