Stream audio into call leg

This example shows you how to play a media file into an existing call.

Replace the following placeholder values in the sample code:

KeyDescription
bearer_tokenYour OAuth token. Read more about OAuth tokens
account_idThe Vonage Business Communications account ID.
call_idThe call id for the call you would like to update
legThe leg id for the call you would like to update
streamset stream to true to start playing file. Sending false will stop playing the file.
stream_urlThe full URL of the audio file you would like to send into the call.
curl -X PUT 'https://api.vonage.com/t/vbc.prod/telephony/v3/cc/accounts/$account/calls/$call_id/legs/$leg_id'--header 'Content-Type: application/json' \--header 'Authorization: Bearer $bearer_token' \--data-raw '{ "stream": "$stream", "stream_url":"$stream_url" }'