Rensei docs
API ReferenceWorker Protocol

Enqueue a daemon-config mutation

Enqueues a configuration mutation for delivery to a specific daemon host on its next heartbeat. Supported ops: - `project.add` - add project to daemon allowlist - `project.remove` - remove project from allowlist - `pool.deleted` - notify daemon of a deleted resource pool - `modelAccess.set` - write a machine-scoped model-access policy - `modelAccess.clear` - clear a workload-specific access policy Requires org admin/owner role. The cancel window closes as soon as the daemon's next heartbeat stamps `deliveredAt`.

POST
/api/daemon/mutations

Authorization

rsk_Bearer
headerAuthorizationBearer <rsk_live_*>

Rensei API key presented as Authorization: Bearer rsk_live_. Required API-key scopes are recorded per operation in x-rensei-required-scopes.

Request Body

application/json
  1. body
workerHostId*string

Target daemon host ID (must belong to the caller's org).

op*DaemonMutationOp

Daemon config mutation operation type:

  • project.add - adds a project to the daemon's allowlist (params: id, repository)
  • project.remove - removes a project (params: id)
  • pool.deleted - notifies daemon of a deleted resource pool (params: poolId, candidatePoolIds[], reason)
  • modelAccess.set - writes a machine-scoped model-access policy (params: workload, policy)
  • modelAccess.clear - clears a workload-specific access policy (params: workload)
  • session.kill - operator force-kill for a self-hosted-daemon interactive PTY-attach session (params: sessionId, reason). Enqueued only via the admin force-stop path (POST /api/admin/interactive-sessions/{id}/force-stop), never via POST /api/daemon/mutations (its allowlist deliberately excludes this op) — GET may still return rows with this op.
Value in"project.add""project.remove""pool.deleted""modelAccess.set""modelAccess.clear""session.kill"
params*

Operation-specific parameters (validated server-side per op type).

Response Body

Mutation enqueued.

application/json
  1. response
mutation*
Example Request
curl -X POST 'https://app.rensei.ai/api/daemon/mutations' \  -H 'Content-Type: application/json' \  -d '{  "workerHostId": "string",  "op": "project.add",  "params": {}}'
Example Response
{  "mutation": {    "id": "string",    "orgId": "string",    "workerHostId": "string",    "op": "project.add",    "params": {},    "status": "pending",    "requestedBy": "string",    "deliveredAt": "2019-08-24T14:15:22Z",    "cancelledAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z"  }}