TeXML REST Commands
Start streaming media from a call.
Starts streaming media from a call to a specific WebSocket address.
post/texml/Accounts/{account_sid}/Calls/{call_sid}/Streams.json
Request
- Base URL: https://api.telnyx.com/v2
- URL: https://api.telnyx.com/v2/texml/Accounts/{account_sid}/Calls/{call_sid}/Streams.json
- Auth: HTTP bearer
Path parameters
account_sidstring required
Example:f5586561-8ff0-4291-a51b-c7dfe4139ff9
The UUID of the Telnyx account that owns the resource, for example f5586561-8ff0-4291-a51b-c7dfe4139ff9. The account_sid path segment is kept for Twilio API compatibility, but the value is a Telnyx account UUID, not a Twilio AC... SID. It must match the account that owns the API key used to authenticate the request, otherwise the endpoint returns 404. The same value is sent as AccountSid in TeXML webhooks.
call_sidstring required
The CallSid that identifies the call to update.
Request body application/x-www-form-urlencoded
Example request
{
"StatusCallback": "http://webhook.com/callback",
"StatusCallbackMethod": "GET",
"Track": "both_tracks",
"Name": "My stream",
"BidirectionalMode": "rtp",
"BidirectionalCodec": "G722",
"Url": "wss://www.example.com/websocket"
}Response
Successful call streaming create response
Example response
{
"account_sid": "61bf923e-5e4d-4595-a110-56190ea18a1b",
"call_sid": "v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA",
"sid": "e9cea0be-7dbd-4b98-98b1-c0089d9d43b0",
"name": "My stream",
"status": "in-progress",
"date_updated": "2023-08-11T19:12:11Z",
"uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Streams/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json"
}Changes
No operation changes recorded.