List all custom metrics for an agent
curl --request GET \
--url https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics', 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://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics",
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://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics"
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://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics")
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,
"metrics": [
{
"id": "<string>",
"key": "<string>",
"description": "<string>",
"type": "number",
"isSystem": true,
"options": [
"<string>"
],
"createdAtUNIX": 123,
"updatedAtUNIX": 123
}
],
"total": 123
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Custom Metrics
List Custom Metrics
Retrieve all custom metrics configured for a specific agent
GET
/
agents
/
{agentId}
/
custom-metrics
List all custom metrics for an agent
curl --request GET \
--url https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics', 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://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics",
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://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics"
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://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics")
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,
"metrics": [
{
"id": "<string>",
"key": "<string>",
"description": "<string>",
"type": "number",
"isSystem": true,
"options": [
"<string>"
],
"createdAtUNIX": 123,
"updatedAtUNIX": 123
}
],
"total": 123
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Overview
Returns a paginated list of all custom metrics defined for an agent. These metrics can be tracked during conversations and used for analytics and reporting.Custom metrics allow you to track agent-specific KPIs like customer satisfaction, issue resolution, or any other measurable data point relevant to your use case.
Use Cases
- Dashboard Setup: Retrieve all metrics to display in your analytics dashboard
- Metric Discovery: Find available metrics before querying their data
- Configuration Audit: Review which metrics are configured for an agent
Pagination
Use thelimit and startAfterId parameters to paginate through large metric collections:
// First page
const page1 = await fetch('/v3/agents/{agentId}/custom-metrics?limit=20');
// Next page
const page2 = await fetch(`/v3/agents/{agentId}/custom-metrics?limit=20&startAfterId=${lastMetricId}`);
Response
Each metric includes:- id: Unique identifier
- key: Metric key used in conversations
- type: Data type (number, boolean, enum, string)
- description: What the metric measures
- options: Available values (for enum type only)
- isSystem: Whether it’s a built-in system metric
System metrics (where
isSystem: true) cannot be deleted and are maintained by the platform.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the agent
