Rensei docs

Create a stage define or override at org scope (org admin).

Create a stage define or override at org scope (org admin). - Rensei REST API operation reference.

POST
/api/org/{orgId}/stages

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

orgId*string

Organization id (must match the authenticated org).

Request Body

application/json
  1. body
key*string
Match^[a-z0-9]+(-[a-z0-9]+)*$
Length1 <= length <= 64
kind*string

define introduces the key and fixes its role; override changes an inherited stage.

Value in"define""override"
role?string

Required on a define; refused on an override.

Value in"hold""intake""inflight""review""rework""done""closed"
name?|

Display name; required on a define.

Length1 <= length <= 200
description?|
Lengthlength <= 2000
disabled?|

true hides an inherited stage; null inherits.

modelSelection?|||||

The stage default; a bare inherit is stored as null.

outcomes?|

Targets must be keys of the effective set of this scope, or stay.

retry?|null
policies?|null

Response Body

The org-scope stage row.

application/json
  1. response
stage*
Example Request
curl -X POST 'https://app.rensei.ai/api/org/string/stages' \  -H 'Content-Type: application/json' \  -d '{  "key": "string",  "kind": "define"}'
Example Response
{  "stage": {    "id": "string",    "scope": "system",    "scopeId": "string",    "key": "string",    "kind": "define",    "role": "hold",    "name": "string",    "description": "string",    "disabled": true,    "modelSelection": {      "mode": "inherit",      "effort": "low"    },    "outcomes": {      "start": {        "target": "string"      },      "success": {        "target": "stay"      },      "failure": {        "target": "stay"      },      "blocked": {        "target": "stay"      },      "close": {        "target": "stay"      }    },    "retry": {      "retries": 0,      "backoffSeconds": 0    },    "policies": {      "version": 1    },    "createdAt": "string",    "updatedAt": "string"  }}