Nurama Developers
Bots

Create an additional API key for the bot

Mints another `botAccess` key alongside the bot's existing ones and returns the raw key once. Use this rather than `rotate-key` when the old credential must keep working during a changeover: rotation revokes the current key the moment it returns the new one, leaving no window to move traffic. Here the new key is additive, so callers can switch over and then revoke the old one. A bot may hold at most 5 live keys. Revoked keys do not count towards the cap, so freeing a slot is a matter of deleting a key rather than deleting the bot.

POST
/workspaces/{workspaceId}/bots/{botId}/keys

Mints another botAccess key alongside the bot's existing ones and returns the raw key once. Use this rather than rotate-key when the old credential must keep working during a changeover: rotation revokes the current key the moment it returns the new one, leaving no window to move traffic. Here the new key is additive, so callers can switch over and then revoke the old one. A bot may hold at most 5 live keys. Revoked keys do not count towards the cap, so freeing a slot is a matter of deleting a key rather than deleting the bot.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

workspaceId*string
Formatuuid
botId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/keys" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "apiKey": {    "id": "string",    "keyPrefix": "string",    "name": "string",    "kind": "string",    "scopes": [      "string"    ],    "createdAt": "2019-08-24T14:15:22Z"  },  "rawKey": "string"}