Rensei docs

Count the inbox rows that need the calling viewer and are not handled.

The number of execution shells the caller’s user-scoped inbox (`GET /api/execution-shells?scope=user`) would label "Needs you" (`state=blocked`: not closed, a person is blocking) that the caller has not marked handled, computed as one aggregate over the caller’s org memberships and project entitlements - the same rows the inbox can show. Independent of the active workspace.

GET
/api/execution-shells/needs-you-count

Authorization

headerAuthorizationBearer <WorkOS user access token>

WorkOS user access token created by the Rensei CLI. The authenticated organization is resolved from membership and may be narrowed with X-Rensei-Org.

Query Parameters

org?string

Narrow to these organizations, by id or slug (comma-separated). Omitted ⇒ every membership. Narrows only: an org the caller is not a member of contributes nothing.

projectId?string

Narrow to these projects (comma-separated). Omitted ⇒ every entitled project. Narrows only, never past the caller’s project entitlements.

Response Body

The count, overall and per organization.

application/json
  1. response
total*integer

Rows needing the caller across the scope.

Range-9007199254740991 <= value <= 9007199254740991
byOrgId*

The same count keyed by organization id. Organizations with nothing waiting are absent.

partial*array<>

Organizations whose entitlements could not be read; they contribute nothing to the counts. Empty when the count is complete.

snapshotAt*string
Example Request
curl -X GET 'https://app.rensei.ai/api/execution-shells/needs-you-count'
Example Response
{  "total": -9007199254740991,  "byOrgId": {    "property1": -9007199254740991,    "property2": -9007199254740991  },  "partial": [    {      "orgId": "string",      "reason": "string"    }  ],  "snapshotAt": "string"}