Legs API
...
Bridge Actions
Request, cURL & Response Payloads
25 min
endpoint (all bridge actions) post /v2/accounts/{account sid}/bridges/{bridge sid}/actions full url https //cpaas api in exotel com/v2/accounts/{account sid}/bridges/{bridge sid}/actions authentication authorization basic \<base64 apikey apitoken> content type application/json common response payload (all actions) { "request id" "abc123", "http code" 202, "response" { "data" { "bridge sid" "bridge sid" } } } actions are asynchronous confirm success/failure via external events \<refer> request parameters attribute required description bridgeeventendpoint yes grpc endpoint where bridge events should be delivered request payload { "action custom param" "refer bridge", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<refer bridgeeventendpoint=\\"grpc //host\ port\\">\</refer>\</flow>" } curl curl location 'https //cpaas api in exotel com/v2/accounts/{account sid}/bridges/{bridge sid}/actions' \\ \ header 'authorization basic \<base64 apikey apitoken>' \\ \ header 'content type application/json' \\ \ data '{ "action custom param" "refer bridge", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<refer bridgeeventendpoint=\\"grpc //host\ port\\">\</refer>\</flow>" }' \<startplay> request parameters attribute required description body (url) yes public or authenticated audio file url request payload { "action custom param" "start play", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<startplay>https //example com/audio wav\</startplay>\</flow>" } curl curl location 'https //cpaas api in exotel com/v2/accounts/{account sid}/bridges/{bridge sid}/actions' \\ \ header 'authorization basic \<base64 apikey apitoken>' \\ \ header 'content type application/json' \\ \ data '{ "action custom param" "start play", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<startplay>https //example com/audio wav\</startplay>\</flow>" }' \<stopplay> request payload { "action custom param" "stop play", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<stopplay>\</stopplay>\</flow>" } curl curl location 'https //cpaas api in exotel com/v2/accounts/{account sid}/bridges/{bridge sid}/actions' \\ \ header 'authorization basic \<base64 apikey apitoken>' \\ \ header 'content type application/json' \\ \ data '{ "action custom param" "stop play", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<stopplay>\</stopplay>\</flow>" }' \<startsay> (say) request payload { "action custom param" "start say", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<say>hello everyone\</say>\</flow>" } curl curl location 'https //cpaas api in exotel com/v2/accounts/{account sid}/bridges/{bridge sid}/actions' \\ \ header 'authorization basic \<base64 apikey apitoken>' \\ \ header 'content type application/json' \\ \ data '{ "action custom param" "start say", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<say>hello everyone\</say>\</flow>" }' \<stopsay> request payload { "action custom param" "stop say", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<stopsay>\</stopsay>\</flow>" } curl curl location 'https //cpaas api in exotel com/v2/accounts/{account sid}/bridges/{bridge sid}/actions' \\ \ header 'authorization basic \<base64 apikey apitoken>' \\ \ header 'content type application/json' \\ \ data '{ "action custom param" "stop say", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<stopsay>\</stopsay>\</flow>" }' \<startrecording> request parameters attribute required description format no wav, mp3 storagetype no https, s3 storageurl no upload endpoint request payload { "action custom param" "start recording", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<startrecording format=\\"wav\\" storagetype=\\"https\" storageurl=\\"https //example com/upload\\">\</startrecording>\</flow>" } curl curl location 'https //cpaas api in exotel com/v2/accounts/{account sid}/bridges/{bridge sid}/actions' \\ \ header 'authorization basic \<base64 apikey apitoken>' \\ \ header 'content type application/json' \\ \ data '{ "action custom param" "start recording", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<startrecording format=\\"wav\\" storagetype=\\"https\" storageurl=\\"https //example com/upload\\">\</startrecording>\</flow>" }' \<stoprecording> request payload { "action custom param" "stop recording", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<stoprecording>\</stoprecording>\</flow>" } curl curl location 'https //cpaas api in exotel com/v2/accounts/{account sid}/bridges/{bridge sid}/actions' \\ \ header 'authorization basic \<base64 apikey apitoken>' \\ \ header 'content type application/json' \\ \ data '{ "action custom param" "stop recording", "exoml" "\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\<flow>\<stoprecording>\</stoprecording>\</flow>" }'
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.
