Make an endpoint key for callers

POST
/v1/endpoints/{endpoint}/keys

Makes a key (vle_…) that callers of one route present as Authorization: Bearer vle_… or x-api-key. The key works for that one endpoint and kind only, never reaches your code, and cannot call the VoiceLayer API. The secret is shown once; VoiceLayer keeps only its digest. Only a route whose manifest uses key authentication takes keys.

Requires an API key with the workspace:write scope.

Authorization

apiKey
headerAuthorizationBearer <token>

A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.

Path Parameters

endpoint*string

The endpoint id: the first segment of its run.vlayers.ai URL.

Request Body

application/json
  1. body
name*string

A name you will recognise it by (up to 100 characters).

Length1 <= length <= 100
kind*string

The route the key opens: api, hook or mcp.

Value in"api""hook""mcp"
expiresAt?string

When the key stops working (ISO 8601). Leave it out for a key that does not expire.

Formatdate-time

Response Body

The key, shown once, and its record

application/json
  1. response
key*string
apiKey*
Example Request
curl -X POST "https://api.vlayers.ai/v1/endpoints/$ENDPOINT_ID/keys" \  -H "Authorization: Bearer $VOICELAYER_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "name": "Partner integration",    "kind": "api"  }'
Example Response
{  "key": "vle_<shown once>",  "apiKey": {    "id": "0192f5c1-5e6f-7a8b-9c0d-1e2f3a4b5c67",    "kind": "api",    "name": "Partner integration",    "preview": "vle_AbCd…wXyZ",    "createdAt": "2026-10-20T15:04:05.000Z",    "expiresAt": null,    "lastUsedAt": null,    "revokedAt": null  }}