App Settings
Configure application-level settings for your WebRTC integration including webhooks for call events, recording, and streaming.
Base URL
https://integrationscore.mum1.exotel.com/v2/integrations
Update App Settings
PUT /{customer_id}/apps/{app_id}/settings
Headers
| Header | Value |
|---|---|
Authorization | Bearer <app_token> |
Content-Type | application/json |
Request Body
{
"popup_url": "https://your-server.com/webhook/popup",
"missed_call_url": "https://your-server.com/webhook/missed-call",
"callback_url": "https://your-server.com/webhook/callback",
"recording_enabled": true,
"recording_url": "https://your-server.com/webhook/recording",
"streaming_enabled": false,
"streaming_url": "https://your-server.com/webhook/stream"
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
popup_url | String | No | URL to receive screen-pop data when a call arrives |
missed_call_url | String | No | URL notified when an inbound call is missed |
callback_url | String | No | URL for general call status callbacks |
recording_enabled | Boolean | No | Enable or disable call recording |
recording_url | String | No | URL to receive recording-ready notifications |
streaming_enabled | Boolean | No | Enable or disable live audio streaming |
streaming_url | String | No | URL for live audio stream delivery |
Example Request
- cURL
- Python
- Node.js
- PHP
- Go
curl -X PUT \
'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}/apps/{app_id}/settings' \
-H 'Authorization: Bearer <app_token>' \
-H 'Content-Type: application/json' \
-d '{
"popup_url": "https://your-server.com/webhook/popup",
"missed_call_url": "https://your-server.com/webhook/missed-call",
"recording_enabled": true,
"recording_url": "https://your-server.com/webhook/recording"
}'
import requests
import json
payload = {
"popup_url": "https://your-server.com/webhook/popup",
"missed_call_url": "https://your-server.com/webhook/missed-call",
"recording_enabled": True,
"recording_url": "https://your-server.com/webhook/recording",
}
response = requests.put(
'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}/apps/{app_id}/settings',
headers={
'Authorization': 'Bearer <app_token>',
'Content-Type': 'application/json',
},
data=json.dumps(payload)
)
print(response.json())
const customerId = '{customer_id}';
const appId = '{app_id}';
const url = `https://integrationscore.mum1.exotel.com/v2/integrations/${customerId}/apps/${appId}/settings`;
const payload = {
popup_url: 'https://your-server.com/webhook/popup',
missed_call_url: 'https://your-server.com/webhook/missed-call',
recording_enabled: true,
recording_url: 'https://your-server.com/webhook/recording',
};
const response = await fetch(url, {
method: 'PUT',
headers: {
Authorization: 'Bearer <app_token>',
'Content-Type': 'application/json',
},
body: JSON.stringify(payload),
});
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}/apps/{app_id}/settings',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => json_encode(array(
'popup_url' => 'https://your-server.com/webhook/popup',
'missed_call_url' => 'https://your-server.com/webhook/missed-call',
'recording_enabled' => true,
'recording_url' => 'https://your-server.com/webhook/recording'
)),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer <app_token>',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
package main
import (
"fmt"
"io/ioutil"
"net/http"
"strings"
)
func main() {
url := "https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}/apps/{app_id}/settings"
payload := strings.NewReader(`{
"popup_url": "https://your-server.com/webhook/popup",
"missed_call_url": "https://your-server.com/webhook/missed-call",
"recording_enabled": true,
"recording_url": "https://your-server.com/webhook/recording"
}`)
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <app_token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
{
"success": true,
"data": {
"app_id": "app_abc123",
"settings": {
"popup_url": "https://your-server.com/webhook/popup",
"missed_call_url": "https://your-server.com/webhook/missed-call",
"callback_url": null,
"recording_enabled": true,
"recording_url": "https://your-server.com/webhook/recording",
"streaming_enabled": false,
"streaming_url": null,
"updated_at": "2024-06-15T10:30:00.000Z"
}
}
}
Get App Settings
GET /{customer_id}/apps/{app_id}/settings
Example Request
- cURL
- Python
- Node.js
- PHP
- Go
curl -X GET \
'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}/apps/{app_id}/settings' \
-H 'Authorization: Bearer <app_token>'
import requests
response = requests.get(
'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}/apps/{app_id}/settings',
headers={'Authorization': 'Bearer <app_token>'}
)
print(response.json())
const customerId = '{customer_id}';
const appId = '{app_id}';
const url = `https://integrationscore.mum1.exotel.com/v2/integrations/${customerId}/apps/${appId}/settings`;
const response = await fetch(url, {
headers: { Authorization: 'Bearer <app_token>' },
});
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}/apps/{app_id}/settings',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer <app_token>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}/apps/{app_id}/settings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <app_token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
{
"success": true,
"data": {
"app_id": "app_abc123",
"settings": {
"popup_url": "https://your-server.com/webhook/popup",
"missed_call_url": "https://your-server.com/webhook/missed-call",
"callback_url": null,
"recording_enabled": true,
"recording_url": "https://your-server.com/webhook/recording",
"streaming_enabled": false,
"streaming_url": null,
"created_at": "2024-06-01T09:00:00.000Z",
"updated_at": "2024-06-15T10:30:00.000Z"
}
}
}
Webhook Payloads
Popup Webhook
Sent when an inbound call arrives for a user:
{
"event": "incoming_call",
"call_sid": "call_123",
"from": "+919876543210",
"to": "sip:user@app.exotel.com",
"timestamp": "2024-06-15T10:30:00.000Z"
}
Recording Webhook
Sent when a call recording is ready:
{
"event": "recording_ready",
"call_sid": "call_123",
"recording_url": "https://recordings.exotel.com/call_123.mp3",
"duration": 180,
"timestamp": "2024-06-15T10:35:00.000Z"
}
HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request — Invalid parameters |
401 | Unauthorized — Invalid or expired token |
404 | Not Found — App doesn't exist |
500 | Internal Server Error |