---
title: "Update Metric"
method: PATCH
path: "/metrics/{metricId}"
---

# Update Metric

`PATCH /metrics/{metricId}`

Update an existing Metric. You must specify the evalType and outputType of the metric. The structure of a metric depends on the evalType and outputType of the metric.

## Path parameters

- `metricId` string, required

## Request body

- union
  - object — A Metric with AI evaluation and integer output.
    - `name` string — The name of the Metric.
    - `description` string, nullable — The description of the Metric.
    - `evalType` 'ai', required — AI-based evaluation type.
    - `guidelines` string — Guidelines for AI evaluation on how to score the metric.
    - `promptTemplate` string — The complete prompt template for AI evaluation. Should include placeholders for dynamic content.
    - `evalModelName` string — The AI model to use for evaluation.
    - `temperature` number — The temperature for AI evaluation (0-2). Omit to use the model provider's default.
    - `outputType` 'int', required — Integer output type.
    - `passingThreshold` integer — The threshold for determining pass/fail from integer scores (1-5).
  - object — A Metric with human evaluation and integer output.
    - `name` string — The name of the Metric.
    - `description` string, nullable — The description of the Metric.
    - `evalType` 'human', required — Human-based evaluation type.
    - `guidelines` string — Guidelines for human evaluators.
    - `outputType` 'int', required — Integer output type.
    - `passingThreshold` integer — The threshold for determining pass/fail from integer scores (1-5).
  - object — A Metric with heuristic evaluation and integer output.
    - `name` string — The name of the Metric.
    - `description` string, nullable — The description of the Metric.
    - `evalType` 'heuristic', required — Heuristic-based evaluation type.
    - `guidelines` string — Guidelines for heuristic evaluation logic.
    - `outputType` 'int', required — Integer output type.
    - `passingThreshold` integer — The threshold for determining pass/fail from integer scores (1-5).
  - object — A Metric with AI evaluation and float output.
    - `name` string — The name of the Metric.
    - `description` string, nullable — The description of the Metric.
    - `evalType` 'ai', required — AI-based evaluation type.
    - `guidelines` string — Guidelines for AI evaluation on how to score the metric.
    - `promptTemplate` string — The complete prompt template for AI evaluation. Should include placeholders for dynamic content.
    - `evalModelName` string — The AI model to use for evaluation.
    - `temperature` number — The temperature for AI evaluation (0-2). Omit to use the model provider's default.
    - `outputType` 'float', required — Float output type (0-1).
    - `passingThreshold` number — Threshold for determining pass/fail from float scores (0.0-1.0).
  - object — A Metric with human evaluation and float output.
    - `name` string — The name of the Metric.
    - `description` string, nullable — The description of the Metric.
    - `evalType` 'human', required — Human-based evaluation type.
    - `guidelines` string — Guidelines for human evaluators.
    - `outputType` 'float', required — Float output type (0-1).
    - `passingThreshold` number — Threshold for determining pass/fail from float scores (0.0-1.0).
  - object — A Metric with heuristic evaluation and float output.
    - `name` string — The name of the Metric.
    - `description` string, nullable — The description of the Metric.
    - `evalType` 'heuristic', required — Heuristic-based evaluation type.
    - `guidelines` string — Guidelines for heuristic evaluation logic.
    - `outputType` 'float', required — Float output type (0-1).
    - `passingThreshold` number — Threshold for determining pass/fail from float scores (0.0-1.0).
  - object — A Metric with AI evaluation and boolean output.
    - `name` string — The name of the Metric.
    - `description` string, nullable — The description of the Metric.
    - `evalType` 'ai', required — AI-based evaluation type.
    - `guidelines` string — Guidelines for AI evaluation on how to score the metric.
    - `promptTemplate` string — The complete prompt template for AI evaluation. Should include placeholders for dynamic content.
    - `evalModelName` string — The AI model to use for evaluation.
    - `temperature` number — The temperature for AI evaluation (0-2). Omit to use the model provider's default.
    - `outputType` 'boolean', required — Boolean output type.
  - object — A Metric with human evaluation and boolean output.
    - `name` string — The name of the Metric.
    - `description` string, nullable — The description of the Metric.
    - `evalType` 'human', required — Human-based evaluation type.
    - `guidelines` string — Guidelines for human evaluators.
    - `outputType` 'boolean', required — Boolean output type.
  - object — A Metric with heuristic evaluation and boolean output.
    - `name` string — The name of the Metric.
    - `description` string, nullable — The description of the Metric.
    - `evalType` 'heuristic', required — Heuristic-based evaluation type.
    - `guidelines` string — Guidelines for heuristic evaluation logic.
    - `outputType` 'boolean', required — Boolean output type.

## Response `200`

Metric updated successfully

- union — A Metric defines how to evaluate system outputs against expected results.
  - object — A Metric with AI evaluation and integer output.
    - `id` string, required — The ID of the Metric.
    - `name` string, required — The name of the Metric.
    - `description` string, nullable, required — The description of the Metric.
    - `evalType` 'ai', required — AI-based evaluation type.
    - `guidelines` string, required — Guidelines for AI evaluation on how to score the metric.
    - `promptTemplate` string, required — The complete prompt template for AI evaluation. Should include placeholders for dynamic content.
    - `evalModelName` string, required — The AI model to use for evaluation.
    - `temperature` number — The temperature for AI evaluation (0-2). Omit to use the model provider's default.
    - `outputType` 'int', required — Integer output type.
    - `passingThreshold` integer, required — The threshold for determining pass/fail from integer scores (1-5).
  - object — A Metric with human evaluation and integer output.
    - `id` string, required — The ID of the Metric.
    - `name` string, required — The name of the Metric.
    - `description` string, nullable, required — The description of the Metric.
    - `evalType` 'human', required — Human-based evaluation type.
    - `guidelines` string, required — Guidelines for human evaluators.
    - `outputType` 'int', required — Integer output type.
    - `passingThreshold` integer, required — The threshold for determining pass/fail from integer scores (1-5).
  - object — A Metric with heuristic evaluation and integer output.
    - `id` string, required — The ID of the Metric.
    - `name` string, required — The name of the Metric.
    - `description` string, nullable, required — The description of the Metric.
    - `evalType` 'heuristic', required — Heuristic-based evaluation type.
    - `guidelines` string, required — Guidelines for heuristic evaluation logic.
    - `outputType` 'int', required — Integer output type.
    - `passingThreshold` integer, required — The threshold for determining pass/fail from integer scores (1-5).
  - object — A Metric with AI evaluation and float output.
    - `id` string, required — The ID of the Metric.
    - `name` string, required — The name of the Metric.
    - `description` string, nullable, required — The description of the Metric.
    - `evalType` 'ai', required — AI-based evaluation type.
    - `guidelines` string, required — Guidelines for AI evaluation on how to score the metric.
    - `promptTemplate` string, required — The complete prompt template for AI evaluation. Should include placeholders for dynamic content.
    - `evalModelName` string, required — The AI model to use for evaluation.
    - `temperature` number — The temperature for AI evaluation (0-2). Omit to use the model provider's default.
    - `outputType` 'float', required — Float output type (0-1).
    - `passingThreshold` number, required — Threshold for determining pass/fail from float scores (0.0-1.0).
  - object — A Metric with human evaluation and float output.
    - `id` string, required — The ID of the Metric.
    - `name` string, required — The name of the Metric.
    - `description` string, nullable, required — The description of the Metric.
    - `evalType` 'human', required — Human-based evaluation type.
    - `guidelines` string, required — Guidelines for human evaluators.
    - `outputType` 'float', required — Float output type (0-1).
    - `passingThreshold` number, required — Threshold for determining pass/fail from float scores (0.0-1.0).
  - object — A Metric with heuristic evaluation and float output.
    - `id` string, required — The ID of the Metric.
    - `name` string, required — The name of the Metric.
    - `description` string, nullable, required — The description of the Metric.
    - `evalType` 'heuristic', required — Heuristic-based evaluation type.
    - `guidelines` string, required — Guidelines for heuristic evaluation logic.
    - `outputType` 'float', required — Float output type (0-1).
    - `passingThreshold` number, required — Threshold for determining pass/fail from float scores (0.0-1.0).
  - object — A Metric with AI evaluation and boolean output.
    - `id` string, required — The ID of the Metric.
    - `name` string, required — The name of the Metric.
    - `description` string, nullable, required — The description of the Metric.
    - `evalType` 'ai', required — AI-based evaluation type.
    - `guidelines` string, required — Guidelines for AI evaluation on how to score the metric.
    - `promptTemplate` string, required — The complete prompt template for AI evaluation. Should include placeholders for dynamic content.
    - `evalModelName` string, required — The AI model to use for evaluation.
    - `temperature` number — The temperature for AI evaluation (0-2). Omit to use the model provider's default.
    - `outputType` 'boolean', required — Boolean output type.
  - object — A Metric with human evaluation and boolean output.
    - `id` string, required — The ID of the Metric.
    - `name` string, required — The name of the Metric.
    - `description` string, nullable, required — The description of the Metric.
    - `evalType` 'human', required — Human-based evaluation type.
    - `guidelines` string, required — Guidelines for human evaluators.
    - `outputType` 'boolean', required — Boolean output type.
  - object — A Metric with heuristic evaluation and boolean output.
    - `id` string, required — The ID of the Metric.
    - `name` string, required — The name of the Metric.
    - `description` string, nullable, required — The description of the Metric.
    - `evalType` 'heuristic', required — Heuristic-based evaluation type.
    - `guidelines` string, required — Guidelines for heuristic evaluation logic.
    - `outputType` 'boolean', required — Boolean output type.

## Other responses

- `401` — Error indicating that the request is not authenticated.
- `500` — An internal service error indicating an issue with the Scorecard service.

## Changes

- **2026-08-10** `121aaa257802` — 3 breaking, 6 info
  - the response property `anyOf[subschema #1: AI int metric]/temperature` became optional for the status `200`
  - the response property `anyOf[subschema #4: AI float metric]/temperature` became optional for the status `200`
  - the response property `anyOf[subschema #7: AI boolean metric]/temperature` became optional for the status `200`
  - the `temperature` request property default value `0` was removed
  - …5 more
- **2025-10-08** `e3c98e8dd7fa` — 3 breaking, 6 info
  - the request property `anyOf[subschema #1: AI int metric]/guidelines` became not nullable
  - the request property `anyOf[subschema #4: AI float metric]/guidelines` became not nullable
  - the request property `anyOf[subschema #7: AI boolean metric]/guidelines` became not nullable
  - the response property `anyOf[subschema #2: Human int metric]/guidelines` became required for the status `200`
  - …5 more
- **2025-09-24** `15bded823f49` — 2 info
  - added `subschema #4: AI float metric, subschema #5: Human float metric, subschema #6: Heuristic float metric` to the request body `anyOf` list
  - added `subschema #4: AI float metric, subschema #5: Human float metric, subschema #6: Heuristic float metric` to the response body `anyOf` list for the response status `200`
- **2025-06-13** `c058e1fdca4f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/scorecard-ai/apis/scorecard-api/changes/metrics/:metricId/patch.md)

---

[API](https://skmtc.dev/scorecard-ai/apis/scorecard-api.md) · [All operations](https://skmtc.dev/scorecard-ai/apis/scorecard-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scorecard-ai/scorecard-api/revisions/121aaa257802/schema)
