Customer Management
Retrieve and manage your customer account details for the WebRTC integration.
Base URL
https://integrationscore.mum1.exotel.com/v2/integrations
Get Customer Details
Retrieve your customer account information.
GET /{customer_id}
Headers
| Header | Value |
|---|---|
Authorization | Bearer <customer_token> |
Example Request
- cURL
- Python
- Node.js
- PHP
- Go
curl -X GET \
'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}' \
-H 'Authorization: Bearer <customer_token>'
import requests
response = requests.get(
'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}',
headers={'Authorization': 'Bearer <customer_token>'}
)
print(response.json())
const customerId = '{customer_id}';
const url = `https://integrationscore.mum1.exotel.com/v2/integrations/${customerId}`;
const response = await fetch(url, {
headers: { Authorization: 'Bearer <customer_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}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer <customer_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}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <customer_token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
{
"success": true,
"data": {
"customer_id": "cust_abc123",
"name": "Acme Corp",
"account_sid": "exotel_account_sid",
"status": "active",
"apps_count": 3,
"users_count": 25,
"plan": {
"type": "enterprise",
"max_apps": 10,
"max_users_per_app": 100
},
"created_at": "2024-01-15T09:00:00.000Z",
"updated_at": "2024-06-15T10:00:00.000Z"
}
}
Delete Customer Account
caution
This action is irreversible. All apps, users, and settings under this customer will be permanently deleted.
DELETE /{customer_id}
Headers
| Header | Value |
|---|---|
Authorization | Bearer <customer_token> |
Example Request
- cURL
- Python
- Node.js
- PHP
- Go
curl -X DELETE \
'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}' \
-H 'Authorization: Bearer <customer_token>'
import requests
response = requests.delete(
'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}',
headers={'Authorization': 'Bearer <customer_token>'}
)
print(response.json())
const customerId = '{customer_id}';
const url = `https://integrationscore.mum1.exotel.com/v2/integrations/${customerId}`;
const response = await fetch(url, {
method: 'DELETE',
headers: { Authorization: 'Bearer <customer_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}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer <customer_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}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <customer_token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
{
"success": true,
"message": "Customer account and all associated resources deleted successfully"
}
Get Customer Usage
Retrieve usage statistics for your customer account.
GET /{customer_id}/usage
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
start_date | String | No | Start of date range (ISO 8601) |
end_date | String | No | End of date range (ISO 8601) |
Example Request
- cURL
- Python
- Node.js
- PHP
- Go
curl -X GET \
'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}/usage?start_date=2024-06-01&end_date=2024-06-30' \
-H 'Authorization: Bearer <customer_token>'
import requests
response = requests.get(
'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}/usage',
headers={'Authorization': 'Bearer <customer_token>'},
params={'start_date': '2024-06-01', 'end_date': '2024-06-30'}
)
print(response.json())
const customerId = '{customer_id}';
const url = `https://integrationscore.mum1.exotel.com/v2/integrations/${customerId}/usage?start_date=2024-06-01&end_date=2024-06-30`;
const response = await fetch(url, {
headers: { Authorization: 'Bearer <customer_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}/usage?start_date=2024-06-01&end_date=2024-06-30',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer <customer_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}/usage?start_date=2024-06-01&end_date=2024-06-30"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <customer_token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
{
"success": true,
"data": {
"customer_id": "cust_abc123",
"period": {
"start": "2024-06-01T00:00:00.000Z",
"end": "2024-06-30T23:59:59.000Z"
},
"usage": {
"total_calls": 5420,
"total_minutes": 18350,
"inbound_calls": 3200,
"outbound_calls": 2220,
"sip_calls": 4100,
"pstn_calls": 1320,
"active_apps": 3,
"active_users": 22
}
}
}
HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
401 | Unauthorized — Invalid or expired token |
404 | Not Found — Customer doesn't exist |
500 | Internal Server Error |