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>"
}'