---
title: "Update a metric"
method: POST
path: "/v1/{organization}/metric/{metric_id}/"
tags: ["Metric"]
---

# Update a metric

`POST /v1/{organization}/metric/{metric_id}/`

Update properties of a metric. The metric's name and metric values cannot be updated.

#### Permissions
This endpoint requires the following permissions:
* `Metric:ModifyMetric` for the metric to modify.

## Path parameters

- `organization` string, required
- `metric_id` string, required — The ID of the metric to update.

## Headers

- `x-mongo-cluster-name` string, nullable — The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- `Sec-WebSocket-Protocol` string[]

## Request body

- SrcAppEndpointsMetricUpdateMetricRequest
  - `applied_to_services` string[], nullable — The services that the metric is applied to. Only updated if set.
  - `additional_notes` union — Additional notes about the metric. Only updated if set.
    - string
    - NotSet — A specific type to indicate that a field is not set in the request.
  - `tags` object, nullable — The tags of the metric. Only updated if set.

## Response `200`

Succeeded

- unknown

## Other responses

- `401` — Invalid authorization credentials.
- `403` — Missing required permissions.
- `404` — Specified organization or metric is not found.
- `422` — Invalid request path parameter or request body failed validation.
- `429` — The user has exceeded the rate limit of 20 requests per minute for this endpoint.
- `503` — The service is going through temporary maintenance.

---

[API](https://skmtc.net/amigo/apis/amigo-api.md) · [All operations](https://skmtc.net/amigo/apis/amigo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/amigo/amigo-api/revisions/f0f28319e448/schema)
