---
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
- `403` — Authorization error
- `422` — Validation error

## Changes

- **2026-07-27** `09d2b7258b3c` — 5 breaking
  - the `data/attributes/default_value` response's property type/format changed from `string, null`/`` to `object, null`/`` for status `200`
  - the `data/attributes/display_chart` response's property type/format changed from `boolean`/`` to `integer`/`` for status `200`
  - the `included/items/attributes/calculated_value` response's property type/format changed from `string`/`` to `number`/`` for status `200`
  - the `included/items/attributes/created/human` response's property type/format changed from `null`/`` to `string, null`/`` for status `200`
  - …1 more
- **2026-07-21** `833ac595fa80` — 2 warning
  - the `places` request property's max was set to `4.00`
  - the `places` request property's min was set to `0.00`
- **2026-07-10** `4e4308be5bcf` — 4 breaking, 4 info
  - the response property `data/attributes/created/human` became nullable for the status `200`
  - the response property `data/attributes/created/string` became nullable for the status `200`
  - the response property `data/attributes/updated/human` became nullable for the status `200`
  - the response property `data/attributes/updated/string` became nullable for the status `200`
  - …4 more
- **2026-05-09** `64c2a336b25f` — 3 warning
  - removed the request property `calc_type`
  - removed the request property `display_chart`
  - removed the request property `places`
- **2025-12-02** `b912f4471de4` — 1 info
  - added the non-success response with the status `403`

[Full 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/3cc8ab9e0887/schema)
