Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

account_sid
string
required

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.

Example:

"f5586561-8ff0-4291-a51b-c7dfe4139ff9"

call_sid
string
required

The CallSid that identifies the call to update.

Body

application/x-www-form-urlencoded

Start streaming media from a call

StatusCallback
string<uri>

Url where status callbacks will be sent.

Example:

"http://webhook.com/callback"

StatusCallbackMethod
enum<string>
default:POST

HTTP method used to send status callbacks.

Available options:
GET,
POST
Example:

"GET"

Track
enum<string>
default:inbound_track

Tracks to be included in the stream

Available options:
inbound_track,
outbound_track,
both_tracks
Example:

"both_tracks"

Name
string

The user specified name of Stream.

Example:

"My stream"

BidirectionalMode
enum<string>
default:mp3

Configures method of bidirectional streaming (mp3, rtp).

Available options:
mp3,
rtp
Example:

"rtp"

BidirectionalCodec
enum<string>
default:PCMU

Indicates codec for bidirectional streaming RTP payloads. Used only with stream_bidirectional_mode=rtp. Case sensitive.

Available options:
PCMU,
PCMA,
G722
Example:

"G722"

Url
string

The destination WebSocket address where the stream is going to be delivered.

Example:

"wss://www.example.com/websocket"

Response

Successful call streaming create response

account_sid
string
Example:

"61bf923e-5e4d-4595-a110-56190ea18a1b"

call_sid
string
Example:

"v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA"

sid
string

Identifier of a resource.

Example:

"e9cea0be-7dbd-4b98-98b1-c0089d9d43b0"

name
string

The user specified name of Stream.

Example:

"My stream"

status
enum<string>

The status of the streaming.

Available options:
in-progress
Example:

"in-progress"

date_updated
string<date-time>
Example:

"2023-08-11T19:12:11Z"

uri
string

The relative URI for this streaming resource.

Example:

"/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Streams/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json"