---
title: "Update Metric Data"
method: POST
path: "/metric/update"
tags: ["Metrics"]
---

# Update Metric Data

`POST /metric/update`

Update custom metric data with day, week, and month averages and values. Metrics must be created in the Dashboard before they can be updated via the API.

## Headers

- `x-api-id` string, required
- `x-api-key` string, required

## Request body

- object
  - `statuspage_id` string, required — ID of the status page
  - `metric_id` string, required — ID of the metric
  - `day_avg` string, required — Average value for past 24 hours
  - `day_start` string, required — UNIX timestamp for start of metric timeframe
  - `day_dates` string[], required — An array of timestamps for the past 24 hours
  - `day_values` string[], required — An array of values matching the timestamps. Must contain exactly 24 values.
  - `week_avg` string, required — Average value for past 7 days
  - `week_start` string, required — UNIX timestamp for start of metric timeframe
  - `week_dates` string[], required — An array of timestamps for the past 7 days
  - `week_values` string[], required — An array of values matching the timestamps. Must contain exactly 7 values.
  - `month_avg` string, required — Average value for past 30 days
  - `month_start` string, required — UNIX timestamp for start of metric timeframe
  - `month_dates` string[], required — An array of timestamps for the past 30 days
  - `month_values` string[], required — An array of values matching the timestamps. Must contain exactly 30 values.

## Response `200`

OK

- object
  - `result` boolean
  - `status` object
    - `error` string
    - `message` string

---

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