Rensei docs
API ReferenceWorker Protocol

Resolve credential env map for a session

Runtime-worker-JWT-only secret-release endpoint used at session spawn. Requires `worker:session`. Before any credential read, the platform resolves the canonical scope from the active worker row and claimed session: JWT worker (`sub`), org, and project claims must exactly match the active worker; the session must be owned by that worker in the same organization, and session project metadata must match when present. Body `orgId` must match that canonical scope and optional `projectId` is an exact assertion, never an override. Missing or mismatched ownership is collapsed to 404. Returns the blocklist-filtered agent environment and refresh horizon. The optional synthetic `poolId` is cost-attribution metadata and is not emitted into the agent environment. Audit is appended asynchronously without secret values.

POST
/api/daemon/credentials/snapshot

Authorization

workerJwt
AuthorizationBearer <token>

Short-lived worker runtime JWT minted by the platform. Claims bind the worker, project, organization, registration, and scopes.

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

application/json

curl -X POST "https://example.com/api/daemon/credentials/snapshot" \  -H "Content-Type: application/json" \  -d '{    "orgId": "string",    "sessionId": "string"  }'
{
  "env": {
    "property1": "string",
    "property2": "string"
  },
  "refreshUntil": "2019-08-24T14:15:22Z",
  "poolId": "string"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}