Skip to main content

Play audio to conference participants

POST 
/conferences/:id/actions/play

Play audio to all or some participants on a conference call.

Request

Path Parameters

    id stringrequired

    Uniquely identifies the conference by id or name

Body

required

    audio_url string

    The URL of a file to be played back in the conference. media_name and audio_url cannot be used together in one request.

    media_name string

    The media_name of a file to be played back in the conference. The media_name must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. The file must either be a WAV or MP3 file.

    loop

    object

    The number of times the audio file should be played. If supplied, the value must be an integer between 1 and 100, or the special string infinity for an endless loop.

    oneOf

    call_control_ids string[]

    List of call control ids identifying participants the audio file should be played to. If not given, the audio file will be played to the entire conference.

Responses

200: Successful response upon making a conference command.

401: Unauthorized

404: Conference does not exist

422: Unprocessable entity

Callbacks

Request samples


curl -L 'https://api.telnyx.com/v2/conferences/:id/actions/play' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"audio_url": "http://www.example.com/sounds/greeting.wav"
}'

Response samples


{
"data": {
"result": "ok"
}
}