---
title: "Reorder Metrics"
method: PUT
path: "/api/v1/metrics/reorder"
tags: ["metrics"]
---

# Reorder Metrics

`PUT /api/v1/metrics/reorder`

## Request

- Base URL: `https://api.cohearence.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.cohearence.app/api/v1/metrics/reorder`
- Auth: HTTP bearer

Persist metric display order and group membership after a drag-and-drop.

Body: ``{"groups": [{"category_id": 3, "metric_ids": [7, 2, 9]}, ...]}``.
Each entry lists a category's metrics in top-to-bottom order. Every listed
metric is assigned ``category_id`` = the entry's category and ``position`` =
its index — so one call covers both within-group reordering (send one entry)
and moving a metric across groups (send the source and destination entries,
each with its full new membership, so positions stay dense on both sides).

Integration-backed groups are read-only: a metric can neither be reordered
into one nor moved out of one.

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/cohearence/apis/health-agent-api.md) · [All operations](https://skmtc.dev/cohearence/apis/health-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cohearence/apis/health-agent-api/revisions/c7aee7d6ecf0?raw)
