Skip to main content
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>'
{
  "success": true,
  "metrics": [
    {
      "id": "<string>",
      "key": "<string>",
      "description": "<string>",
      "type": "number",
      "isSystem": true,
      "options": [
        "<string>"
      ],
      "createdAtUNIX": 123,
      "updatedAtUNIX": 123
    }
  ],
  "total": 123
}

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 the limit 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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agentId
string
required

The unique identifier of the agent

Query Parameters

limit
number
default:50
Required range: 1 <= x <= 100
startAfterId
string

Response

Successful response

success
boolean
required
metrics
object[]
required
total
number
required