---
title: "Create Metric Group"
method: POST
path: "/projects/{projectId}/metric-groups"
---

# Create Metric Group

`POST /projects/{projectId}/metric-groups`

## Request

- Base URL: `https://api2.scorecard.io/api/v2`
- URL: `https://api2.scorecard.io/api/v2/projects/{projectId}/metric-groups`
- Auth: HTTP bearer

Create a new Metric Group referencing Metrics in the same Project.

## Path parameters

- `projectId` string, required

## Request body

- object
  - `name` string, required: The name of the Metric Group.
  - `description` string: The description of the Metric Group.
  - `metricIds` string[], required: The IDs of the Metrics to include in the group. Every Metric must belong to the same Project as the group.

## Response `201`

Metric Group created successfully.

- MetricGroup: A Metric Group is a named collection of Metrics within a Project, used to score or compare records with a consistent set of Metrics.
  - `id` string, required: The ID of the Metric Group.
  - `projectId` string, required: The ID of the Project the Metric Group belongs to.
  - `name` string, required: The name of the Metric Group.
  - `description` string, required: The description of the Metric Group.
  - `metricIds` string[], required: The IDs of the Metrics in the group.
  - `createdAt` string, required: The ISO 8601 timestamp when the Metric Group was created.
  - `updatedAt` string, required: The ISO 8601 timestamp when the Metric Group was last updated.

## 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-09-22** `aea3bbdea11d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scorecard-ai/apis/scorecard-api/changes/projects/:projectId/metric-groups/post.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.dev/scorecard-ai/apis/scorecard-api/revisions/b40e47e06b7f?raw)
