Rensei docs

Create a required workflow policy in the org (org admin).

Create a required workflow policy in the org (org admin). - Rensei REST API operation reference.

POST
/api/org/{orgId}/required-workflow-policies

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).

Header Parameters

Idempotency-Key*string

Retry key (8-128 characters). Same key + same body replays the first result; same key + different body is a 409.

Length8 <= length <= 128

Request Body

application/json
  1. body

Required workflow policy fields (the path org is the owner; any body orgId is ignored).

templateSlug*string

Lowercase alphanum slug with dot/dash/underscore separators.

Length1 <= length <= 128
templateVersion?|

Optional semver pin (e.g. "1.2.3").

Length1 <= length <= 64
appliesTo*string

Project targeting mode.

Value in"all""tagged""list"
projectTagSelector?|

Required when appliesTo is tagged.

projectIdList?array<>|

Required non-empty when appliesTo is list.

enforcement*string

Reconciliation depth.

Value in"seed-and-enforce""seed-only"

Response Body

Idempotent replay of the first create.

application/json
  1. response
policy*
replayed*boolean
Example Request
curl -X POST 'https://app.rensei.ai/api/org/string/required-workflow-policies' \  -H 'Idempotency-Key: stringst' \  -H 'Content-Type: application/json' \  -d '{  "templateSlug": "string",  "appliesTo": "all",  "enforcement": "seed-and-enforce"}'
Example Response
{  "policy": {    "id": "string",    "orgId": "string",    "templateSlug": "string",    "templateVersion": "string",    "appliesTo": "all",    "tags": [      "string"    ],    "projectIdList": [      "string"    ],    "enforcement": "seed-and-enforce"  },  "replayed": true}