Rensei docs
API ReferenceAuthentication

Mint a new rsk_ API key

Creates a new `rsk_live_*` token. The full token is returned **once** and is never stored in plaintext. - `projects: "all"` requires `org_keys:write` scope or org admin/owner role. - `projects: [...]` requires project membership for all listed project IDs. Canonical endpoint (supersedes deprecated `POST /api/org/api-keys`).

POST
/api/org/{orgId}/keys

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

Must match the authenticated org.

Request Body

application/json
  1. body
name*string
projects*|array<string>

"all" creates an org-wide key (requires org_keys:write scope or org admin/owner role). An array of project IDs creates a project-scoped key.

scopes?array<string>

Scope claims (defaults to ["*"] for org-wide keys, worker scopes for project keys).

expiresAt?string
Formatdate-time

Response Body

Key minted.

application/json
  1. response
key*
Example Request
curl -X POST 'https://app.rensei.ai/api/org/string/keys' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "projects": "all"}'
Example Response
{  "key": {    "id": "string",    "orgId": "string",    "name": "string",    "keyPrefix": "string",    "scopes": [      "string"    ],    "projectIds": "all",    "createdAt": "2019-08-24T14:15:22Z",    "expiresAt": "2019-08-24T14:15:22Z",    "fullKey": "string"  }}