Rensei docs

Request acknowledged cancellation of one admitted session.

Creates a durable cancellation receipt before any cancel side effect. `acknowledged` means the owning authority committed the terminal transition; delivery alone never reaches it, and a reaper never forges `cancelled`.

POST
/api/cli/sessions/{sessionId}/cancel

Authorization

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.

Path Parameters

sessionId*string

The session id, in EITHER namespace: the canonical session id returned at dispatch, or its 16-hex public session hash. Both resolve to the same ledger node inside the caller's organization.

Length1 <= length <= 256

Request Body

application/json
  1. body
idempotencyKey*string
Match^[A-Za-z0-9][A-Za-z0-9._@+-]*(?:[:/][A-Za-z0-9._@+-]+)*$
Length1 <= length <= 256
propagation*string
Value in"cascade""shield"

Response Body

Cancellation receipt.

application/json
  1. response
ledgerVersion*string
sessionId*string
Match^[A-Za-z0-9][A-Za-z0-9._@+-]*(?:[:/][A-Za-z0-9._@+-]+)*$
Length1 <= length <= 256
cancellationReceiptId*string
Match^[A-Za-z0-9][A-Za-z0-9._@+-]*(?:[:/][A-Za-z0-9._@+-]+)*$
Length1 <= length <= 256
state*string
Value in"requested""delivered""acknowledged""failed""timed_out""already_terminal"
Example Request
curl -X POST 'https://app.rensei.ai/api/cli/sessions/string/cancel' \  -H 'Content-Type: application/json' \  -d '{  "idempotencyKey": "string",  "propagation": "cascade"}'
Example Response
{  "ledgerVersion": "rensei.session-ledger/v1alpha1",  "sessionId": "string",  "cancellationReceiptId": "string",  "state": "requested"}