Get Call Metrics
curl --request GET \
--url https://sa.dialgen.ai/api/v1/call/get-metric \
--header 'Authorization: Bearer <token>'import requests
url = "https://sa.dialgen.ai/api/v1/call/get-metric"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sa.dialgen.ai/api/v1/call/get-metric', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sa.dialgen.ai/api/v1/call/get-metric",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sa.dialgen.ai/api/v1/call/get-metric"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sa.dialgen.ai/api/v1/call/get-metric")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sa.dialgen.ai/api/v1/call/get-metric")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"callData": {
"id": "call_123",
"contactId": "contact_123",
"agentId": "agent_456",
"status": "COMPLETED",
"startTime": "2024-01-15T10:00:00.000Z",
"endTime": "2024-01-15T10:03:00.000Z",
"duration": 180,
"phoneNumber": "+1234567890",
"contactName": "John Doe",
"transcription": {},
"summary": "Demo call completed successfully...",
"metricJson": {
"intent": "SALES_INQUIRY",
"sentiment": "positive",
"confidence": 0.95,
"keyPoints": [
"Interested in pricing",
"Wants demo"
],
"customerSatisfaction": 5
}
},
"metricSchema": {}
}{
"error": "Bad Request",
"message": "Missing required parameter"
}{
"error": "Unauthorized",
"message": "Invalid or missing API key"
}{
"error": "Not Found",
"message": "Resource not found"
}{
"error": "Internal Server Error",
"message": "An unexpected error occurred"
}Calls
Get Call Metrics
Retrieves call metrics and analytics data after a call has completed.
GET
/
api
/
v1
/
call
/
get-metric
Get Call Metrics
curl --request GET \
--url https://sa.dialgen.ai/api/v1/call/get-metric \
--header 'Authorization: Bearer <token>'import requests
url = "https://sa.dialgen.ai/api/v1/call/get-metric"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sa.dialgen.ai/api/v1/call/get-metric', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sa.dialgen.ai/api/v1/call/get-metric",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sa.dialgen.ai/api/v1/call/get-metric"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sa.dialgen.ai/api/v1/call/get-metric")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sa.dialgen.ai/api/v1/call/get-metric")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"callData": {
"id": "call_123",
"contactId": "contact_123",
"agentId": "agent_456",
"status": "COMPLETED",
"startTime": "2024-01-15T10:00:00.000Z",
"endTime": "2024-01-15T10:03:00.000Z",
"duration": 180,
"phoneNumber": "+1234567890",
"contactName": "John Doe",
"transcription": {},
"summary": "Demo call completed successfully...",
"metricJson": {
"intent": "SALES_INQUIRY",
"sentiment": "positive",
"confidence": 0.95,
"keyPoints": [
"Interested in pricing",
"Wants demo"
],
"customerSatisfaction": 5
}
},
"metricSchema": {}
}{
"error": "Bad Request",
"message": "Missing required parameter"
}{
"error": "Unauthorized",
"message": "Invalid or missing API key"
}{
"error": "Not Found",
"message": "Resource not found"
}{
"error": "Internal Server Error",
"message": "An unexpected error occurred"
}Authorizations
Bearer token authentication. Obtain your API key from the Dialgen API Keys dashboard at https://sa.dialgen.ai/api-keys
Query Parameters
The call identifier
Example:
"call_123"
The user identifier
Example:
"user_456"
The agent identifier
Example:
"agent_789"
The contact identifier
Example:
"contact_123"
⌘I