---
title: "Public Upsert Eval Group"
method: POST
path: "/v1/eval-groups"
tags: ["public-api"]
---

# Public Upsert Eval Group

`POST /v1/eval-groups`

Create or update an eval group — idempotent upsert by slug.

## Headers

- `authorization` string, nullable

## Request body

- EvalGroupUpsert — Idempotent upsert of an eval group by slug.
  - `slug` string, required
  - `display_name` string, required
  - `score_format` 'percent' | 'decimal' — How the viewer renders scores: "percent" (73.5%) or "decimal" (0.735, for C-index/AUC).
  - `score_aggregation` 'mean' | 'max' — How member tasks roll up into the group score: "mean" (average) or "max" (best task).
  - `baseline` number, nullable — Optional random/chance baseline in the group's own units (0.5 for C-index, 0.25 for a 4-class task). Unbounded above, like every other score here.
  - `source` string — Provenance of the group definition, e.g. "github:<org>/<repo>" when kept in sync from a customer repo. Empty = leave the stored value unchanged.
  - `sync_enabled` boolean, nullable — Whether the nightly customer-code sync may touch this group. None = leave the stored value unchanged (new groups default true).

## Response `200`

Successful Response

- EvalGroupResponse — An eval group row as returned by the ingestion API.
  - `id` string, uuid, required
  - `team_id` string, uuid, required
  - `slug` string, required
  - `display_name` string, required
  - `created_at` string, required
  - `updated_at` string, required

## Other responses

- `422` — Validation Error

---

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