---
title: "Delete metric"
method: DELETE
path: "/api/v2/experiments/metrics/{metric_id}"
tags: ["Experiments"]
---

# Delete metric

`DELETE /api/v2/experiments/metrics/{metric_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/experiments/metrics/{metric_id}`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `product_analytics_metrics_write`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/experiments/metrics/:metric_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Delete a metric. Certified metrics are read-only through this endpoint. The record is soft-deleted and stops appearing in reads. A metric still referenced by an experiment cannot be deleted; detach it from those experiments first.

## Path parameters

- `metric_id` string, uuid, required: The UUID of the metric.

## Response `204`

The metric was deleted.

## Other responses

- `400`: Malformed metric ID (not a valid UUID).
- `401`: Missing or invalid authentication.
- `403`: Caller lacks product_analytics_metrics_write or edit access to this specific metric.
- `404`: No metric with this ID exists for the organization.
- `409`: The metric is imported, certified, managed by metric sync, or still referenced by one or more experiments and cannot be deleted.
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
