Rensei docs

Shrink-only narrowing of a key's project fence and/or scopes.

Shrink-only narrowing of a key's project fence and/or scopes. - Rensei REST API operation reference.

PATCH
/api/org/api-keys/{keyId}

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

keyId*string

The api_keys row id to narrow.

Request Body

application/json
  1. body
projectIds?array<string>|

New project fence. Must be a subset of the current fence, or any list at all when the current fence is null (org-wide). null is only accepted when the current fence is already null — nulling a scoped fence would widen it and is rejected. Omit to leave the fence unchanged.

scopes?array<string>

New scope list. Must be a subset of the scopes the key currently holds. Omit to leave scopes unchanged.

Response Body

Key narrowed.

application/json
  1. response
key*
Example Request
curl -X PATCH 'https://app.rensei.ai/api/org/api-keys/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "key": {    "id": "string",    "name": "string",    "keyPrefix": "string",    "keyType": "string",    "scopes": [      "string"    ],    "projectIds": [      "string"    ],    "createdBy": "string",    "createdAt": "string",    "updatedAt": "string",    "lastUsedAt": "string",    "expiresAt": "string",    "machineId": "string"  }}