> ## Documentation Index
> Fetch the complete documentation index at: https://docs.convocore.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Custom Metrics

> Retrieve all custom metrics configured for a specific agent

## 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.

<Note>
  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.
</Note>

## 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:

```javascript theme={null}
// 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

<Tip>
  System metrics (where `isSystem: true`) cannot be deleted and are maintained by the platform.
</Tip>


## OpenAPI

````yaml GET /agents/{agentId}/custom-metrics
openapi: 3.0.3
info:
  title: Convocore OpenAPI
  description: Full API reference for Convocore
  version: 1.0.4
servers:
  - url: https://eu-gcp-api.vg-stuff.com/v3
    description: EU Node.js API server
  - url: https://na-gcp-api.vg-stuff.com/v3
    description: NA Node.js API server
security: []
paths:
  /agents/{agentId}/custom-metrics:
    get:
      tags:
        - Custom Metrics
      summary: List all custom metrics for an agent
      description: >-
        Retrieves all custom metrics configured for a specific agent. These
        metrics can be tracked during conversations and used for analytics.
      operationId: customMetrics-listMetrics
      parameters:
        - name: agentId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the agent
        - name: limit
          in: query
          required: false
          schema:
            type: number
            minimum: 1
            maximum: 100
            default: 50
        - name: startAfterId
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  metrics:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        key:
                          type: string
                        description:
                          type: string
                        isSystem:
                          type: boolean
                        type:
                          type: string
                          enum:
                            - number
                            - boolean
                            - enum
                            - string
                        options:
                          type: array
                          items:
                            type: string
                        createdAtUNIX:
                          type: number
                        updatedAtUNIX:
                          type: number
                      required:
                        - id
                        - key
                        - description
                        - type
                      additionalProperties: false
                  total:
                    type: number
                required:
                  - success
                  - metrics
                  - total
                additionalProperties: false
        default:
          $ref: '#/components/responses/error'
      security:
        - Authorization: []
components:
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              issues:
                type: array
                items:
                  type: object
                  properties:
                    message:
                      type: string
                  required:
                    - message
                  additionalProperties: false
            required:
              - message
              - code
            additionalProperties: false
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````