API Keys

Create API key

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

POST
/api-keys

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

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": [      "agents:write",      "calls:write"    ]  }'
{  "id": "key_01h",  "name": "Production server",  "scopes": [    "agents:write",    "calls:write"  ],  "secretHint": "bvk_…a1b2",  "isActive": true,  "rawKey": "bvk_live_a1b2c3d4e5f6g7h8i9j0"}
{  "statusCode": 400,  "message": [    "name should not be empty"  ],  "error": "Bad Request"}
{  "statusCode": 401,  "message": "Unauthorized",  "error": "Unauthorized"}