API Keys

Create API key

Generate a new API key. The full secret (`rawKey`) is returned only once in this response — store it securely.

POST
/api-keys

Generate a new API key. The full secret (rawKey) is returned only once in this response — store it securely.

Authorization

ApiKeyAuth
X-API-Key<token>

Voice platform authentication secret. Create one from the API Keys endpoint or your dashboard.

In: header

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/api-keys" \  -H "Content-Type: application/json" \  -d '{    "name": "Production server",    "scopes": []  }'
{  "id": "key_01h",  "name": "Production server",  "scopes": [],  "secretHint": "bvk_live_…9fq",  "isActive": true,  "rawKey": "bvk_live_a1b2c3d4e5f6g7h8i9j0"}
{  "statusCode": 400,  "message": [    "name should not be empty"  ],  "error": "Bad Request"}
{  "statusCode": 401,  "message": "Unauthorized",  "error": "Unauthorized"}