Skip to main content
DELETE
/
agents
/
{agentId}
/
custom-metrics
/
{metricId}
Delete a custom metric
curl --request DELETE \
  --url https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/custom-metrics/{metricId} \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "message": "<string>"
}

Overview

Permanently deletes a custom metric definition from an agent. This stops the metric from being tracked in future conversations.
Important:
  • This action cannot be undone
  • Historical data is not deleted - past metric values remain in conversation records
  • The metric will no longer be tracked in new conversations
  • System metrics cannot be deleted

What Happens After Deletion

  1. Historical Data Preserved: All previously recorded metric values remain in conversations
  2. Analytics Access: You can still query historical data for this metric
  3. Future Tracking Stops: The metric won’t be collected in new conversations
  4. Metric Not Listed: The metric disappears from the metrics list

System Metrics Protection

System metrics are protected and cannot be deleted:
{
  "error": {
    "code": "FORBIDDEN",
    "message": "System metrics cannot be deleted"
  }
}

Alternative: Disable Instead of Delete

If you want to temporarily stop tracking a metric without losing its definition:
Consider creating a “disabled” or “archived” state in your application instead of deleting metrics. This preserves the configuration for potential future reactivation.

Use Cases

  • Cleanup: Remove outdated or unused metrics
  • Reorganization: Clear metrics before implementing a new tracking strategy
  • Mistake Correction: Remove incorrectly configured metrics

Before Deleting

  1. Export Data: Back up historical data if needed
  2. Update Documentation: Remove references to the metric from internal docs
  3. Notify Team: Inform team members who rely on this metric
  4. Check Dependencies: Ensure no dashboards or reports depend on this metric

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

metricId
string
required

The unique identifier of the metric to delete

Response

Successful response

success
boolean
required
message
string
required