Mint a media socket token
Mints a **single-use, 90-second** token for opening the WSS media socket of a specific call. This exists because a browser cannot set the Authorization header on a WebSocket handshake and the company bearer must never appear in a URL. Open `ws_url` immediately after minting.
Mints a single-use, 90-second token for opening the WSS media socket of a specific call. This exists because a browser cannot set the Authorization header on a WebSocket handshake and the company bearer must never appear in a URL. Open ws_url immediately after minting.
Authorization
bearerAuth Per-user API token (UUID v4) sent as Authorization: Bearer <token>. Identifies the tenant and user.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/calls/media-token" \ -H "Content-Type: application/json" \ -d '{ "call_id": "73EE9BC6A87B1AA5AED857F4DBB73B0E" }'{ "success": true, "token": "GqDmOiShYLmydinGTdK83Yb...", "ws_url": "wss://api.wuts.com.br/calls/media?ct=GqDmOiShYLmydinGTdK83Yb...", "expires_at": "2026-07-16T18:36:10Z"}{ "success": false, "error": "validation failed", "error_code": "VALIDATION_ERROR", "timestamp": "2026-06-15T12:00:00Z"}{ "success": false, "error": "validation failed", "error_code": "VALIDATION_ERROR", "timestamp": "2026-06-15T12:00:00Z"}{ "success": false, "error": "validation failed", "error_code": "VALIDATION_ERROR", "timestamp": "2026-06-15T12:00:00Z"}List recent calls GET
Returns a rolling in-memory history of recent calls for the authenticated device (most recent first).
Open the WSS media socket (WebSocket) GET
**This is a WebSocket (WSS) upgrade, not a normal GET.** It carries live call audio between your client and the WUTS Voice engine. Authorize it with a single-use `ct` token from POST /calls/media-token (the bearer is NOT used here). Once open: - **Send** binary frames of raw PCM, signed 16-bit little-endian, mono, 16 kHz (your microphone). ~20 ms / 320-sample frames are ideal. - **Receive** binary frames in the same PCM format (the other party's audio). - **Send** the text frame `{"type":"hangup"}` to end the call. The server pings every 15 s to keep the socket warm across proxies.