> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Handler

> WebSocket endpoint for Twilio Media Streams. Use a short-lived stream token during setup, or tenant bearer authentication for compatible internal clients.

WebSocket endpoint for Twilio Media Streams. Use a short-lived stream token during setup, or tenant bearer authentication for compatible internal clients.

### Status codes

| Code  | Meaning                                    |
| ----- | ------------------------------------------ |
| `101` | WebSocket upgrade for Twilio Media Streams |
| `400` | Missing WebSocket upgrade headers          |
| `401` | Unauthorized                               |
| `429` | Too many pending bootstrap sessions        |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.voice.stateset.com/media-stream' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```
</RequestExample>
