Skip to main content

Create a Stream.

POST 

/Accounts/:AccountSid/Calls/:CallSid/Streams

Create a stream.

Permissions

The API token must include the following scopes: Voice.

Request

Path Parameters

    AccountSid uuidrequired

    The unique identifier for the account that is associated with this stream.

    CallSid uuidrequired

    The unique identifier for the call that is associated with this stream.

Body

required

    Namestring

    Unique name for the Stream, per Call. It is used to stop a Stream by name.

    Example: my_first_stream
    Trackstring

    This attribute can be one of inbound_track, outbound_track, both_tracks. Default is both_tracks.

    Possible values: [inbound_track, outbound_track, both_tracks]

    Example: both_tracks
    StatusCallbackMethodstring

    Whether the request to StatusCallback URL is a GET or a POST. Default is POST.

    Possible values: [GET, POST]

    Example: GET
    StatusCallbackstring

    The URL to request to when stream is available.

    Example: null
    Urlstring

    Absolute or relative URL. A WebSocket connection to the url will be established and audio will start flowing towards the Websocket server. The only supported protocol is wss. For security reasons ws is NOT supported.

    Example: wss://your-application.com/audiostream
    Parameter1.Namestring

    Custom parameter name to pass towards the wss server

    Example: FirstName
    Parameter1.Valuestring

    Custom parameter value to pass towards the wss server

    Example: Jane
    Parameter2.Namestring

    Custom parameter name to pass towards the wss server

    Example: FirstName
    Parameter2.Valuestring

    Custom parameter value to pass towards the wss server

    Example: Jane

Responses

OK

Schema

    account_siduuid

    The unique identifier for the account that is associated with this stream.

    Example: 720796a0-8ee9-4350-83bd-2d07a3121f1e
    api_versionstring

    The version of the SignalWire API.

    Example: 2010-04-01
    call_sidstring

    The unique identifier for the call that is associated with this stream.

    Example: 43bb71ee-553f-4074-bb20-8e2747647cce
    sidstring

    The unique identifier for the stream.

    Example: 19e436af-5688-4307-b03b-bdb2b42b8142
    namestring

    Unique name for the Stream, per Call. It is used to stop a Stream by name.

    Example: my_first_stream
    statusstring

    The status of the stream.

    Possible values: [in-progress, stopped]

    Example: stopped
    date_updatedstring

    The date, in RFC 2822 format, this stream was updated.

    Example: Wed, 26 Sept 2018 23:00:04 +0000
    error_codestring

    Further details about a failed stream.

    Example: null
    uristring

    The URI of the stream.

    Example: /api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Calls/058a869c-d387-4bef-8e62-6b0bc0895bed/Streams/19e436af-5688-4307-b03b-bdb2b42b8142.json