---
title: "Create Call Stream Token"
method: POST
path: "/calls/{id}/stream-token"
tags: ["Calls"]
---

# Create Call Stream Token

`POST /calls/{id}/stream-token`

## Request

- Base URL: `https://api.pinnacle.sh`
- URL: `https://api.pinnacle.sh/calls/{id}/stream-token`
- Auth: API key in header `PINNACLE-API-KEY`

Mint a short-lived WebSocket token for a call. Use the returned `stream_url` to connect to Pinnacle's bidirectional voice stream.

## Path parameters

- `id` string, required

## Request body

- CreateStreamTokenParams
  - `commands_enabled` boolean: Whether this WebSocket may send call commands. Defaults to true.
  - `stream_id` string: Customer-chosen stream ID for reconnects and multiple subscribers.
  - `record` boolean: Enable recording for this WebSocket stream.

## Response `200`

Stream token.

- StreamToken
  - `token` string, required: Short-lived stream token.
  - `expires_at` string, date-time, required
  - `stream_url` string, uri, required: Pre-built WebSocket URL containing the token.

## Other responses

- `400`: Validation failed. The payload has missing required fields and/or invalid types. <br> See https://zod.dev/error-formatting for more information.
- `401`: The request lacks valid authentication credentials or the provided credentials are invalid. <br> Ensure you're including a valid API key in the request headers and that your account has the necessary permissions to access this endpoint.
- `404`: The requested resource could not be found. <br> This may occur if the identifier is incorrect, the resource has been deleted, or you don't have permission to access it.
- `409`: This action cannot be completed right now because the resource is already being processed or is in a state that does not allow the requested change. Check the latest resource status and try again when it is ready.
- `500`: An unexpected error occurred on Pinnacle's servers while processing your request. <br> If this error persists, please contact support with the request details.
- `503`: This service is temporarily unavailable. Please try again later or contact support if the issue continues.

---

[API](https://skmtc.dev/pinnacle/apis/pinnacle-2.md) - [All operations](https://skmtc.dev/pinnacle/apis/pinnacle-2/llms.txt) - [OpenAPI document](https://skmtc.dev/pinnacle/apis/pinnacle-2/revisions/45416dadab79?raw)
