---
title: "Update Collection"
method: PUT
path: "/v1/metric-collections/{id}"
tags: ["Metric Collections"]
---

# Update Collection

`PUT /v1/metric-collections/{id}`

## Request

- Base URL: `https://api.confident-ai.com`
- URL: `https://api.confident-ai.com/v1/metric-collections/{id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/docs/v1/metric-collections/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates a metric collection's `name` and `metricSettings`.

## Request body

- UpdateMetricCollection: Request schema to create or update a metric collection
  - `name` string: The name of the metric collection, which must be unique within your project.
  - `multiTurn` boolean: This is true if your metric collection is multi-turn, which contains only multi-turn metrics. Defaulted to `false`.
  - `metricSettings` MetricSetting[]: This is the list of metric settings for the collection.
    - `metric` object: This is a metric object, which contains the metric name.
      - `name` string, required: This is the name of the metric.
    - `activated` boolean: This determines if the metric is activated. Only activated metrics are used for evaluations. Non-activated metrics are skipped.
    - `threshold` number: This determines the threshold for the metric which determines if the metric passes or fails depending on if the metric score is equal or greater than the threshold.
    - `includeReason` boolean: This determines if the reason for the metric score should be generated during evaluations.
    - `strictMode` boolean: This determines if the metric is in strict mode. Metrics in strict mode output a binary score of 0 or 1, indicating pass or fail, as opposed to a continuous score from 0 to 1.
    - `sampleRate` number: This determines the probability of the metric being ran for evaluation.

## Response `200`

- UpdateMetricCollectionResponse
  - `success` boolean, required: This is true if the metric collection was updated successfully.
  - `data` object, required: This maps to the id of the metric collection.
    - `id` string, required: This is the id of the metric collection.
  - `deprecated` boolean, required: This is true if this metric collection endpoint is deprecated.

---

[API](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api.md) - [All operations](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/revisions/95cdde71b65e?raw)
