Rensei docs
API ReferenceWorker Protocol

Mint a short-lived GitHub installation token for a repo

Called by the host daemon to obtain a short-lived GitHub App installation token for a specific repository. The token is minted from the org's GitHub App installation and expires in ~1 hour. The `orgId` in the body must match the authenticated org. Auth: `Bearer rsk_*` via `getCliOrSessionAuth` OR worker runtime JWT. Returns `{ token: null, reason }` (HTTP 200) on soft failures so the caller can decide whether to fall back to a stored PAT.

POST
/api/daemon/git-token

Authorization

AuthorizationBearer <token>

Rensei API key presented as Authorization: Bearer rsk_live_. Required API-key scopes are recorded per operation in x-rensei-required-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

curl -X POST "https://example.com/api/daemon/git-token" \  -H "Content-Type: application/json" \  -d '{    "orgId": "string"  }'
{
  "token": "string",
  "expiresAt": "2019-08-24T14:15:22Z"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}