---
title: "Create Metric"
method: POST
path: "/metrics"
tags: ["Metrics"]
---

# Create Metric

`POST /metrics`

## Request body

- CreateMetricRequestData
  - `name` string, required
  - `suffix` string, required
  - `calc_type` 0 | 1
  - `description` string, nullable
  - `default_value` number, nullable
  - `display_chart` boolean, nullable
  - `threshold` integer, nullable
  - `places` integer, nullable

## Response `200`

`Metric`

## Other responses

- `401` — Unauthenticated
- `422` — Validation error

## Changes

- **2025-08-15** `5b3f1f21cf76` — 1 info
  - media type `application/json` was changed to a more specific media type `application/vnd.api+json` for the response status `200`
- **2025-06-02** `9ad32c73fe39` — 14 breaking, 9 warning
  - the response property `data/attributes/default_value` became nullable for the status `200`
  - the response property `data/attributes/description` became nullable for the status `200`
  - the `data/attributes/calc_type` response's property type/format changed from `string`/`` to `integer`/`` for status `200`
  - the `data/attributes/default_view` response's property type/format changed from `string`/`` to `integer`/`` for status `200`
  - …19 more

[Change history](https://skmtc.dev/cachethq/apis/cachet/changes/metrics/post.md)

---

[API](https://skmtc.dev/cachethq/apis/cachet.md) · [All operations](https://skmtc.dev/cachethq/apis/cachet/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cachethq/cachet/revisions/5b3f1f21cf76/schema)
