Collect the connection key

POST
/v1/connect/devices/{id}/worker-key

Returns the connection key the device uses to serve its line, once. A second call is refused with 409; disconnect the device and connect it again for a new key. Only the device's own access token can call it.

Requires an API key with the device:worker 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

id*string

The device id, from GET /v1/connect/devices/me.

Formatuuid

Response Body

The device's connection key, shown this once

application/json
  1. response
workerKey*string

The connection key, shown this once

Length1 <= length
connectorId*string

The connector the key serves

Formatuuid
edgeUrl*string

Where the device connects to serve calls

Formaturi
apiUrl*string

The API base URL

Formaturi
Example Request
curl -X POST "https://api.vlayers.ai/v1/connect/devices/$DEVICE_ID/worker-key" \  -H "Authorization: Bearer $VOICELAYER_API_KEY"
Example Response
{  "workerKey": "vl_worker_placeholder",  "connectorId": "0192f5c3-7a8b-7cad-9e2f-3a4b5c6d7e89",  "edgeUrl": "wss://edge.vlayers.ai/worker",  "apiUrl": "https://api.vlayers.ai"}