---
title: "Apply Baseline Corrections to Regression Transformations"
method: POST
path: "/v3/functions/regression/corrections"
tags: ["Function Accuracy"]
---

# Apply Baseline Corrections to Regression Transformations

`POST /v3/functions/regression/corrections`

**Copy baseline corrections onto regression transformations.**

Looks up regression transformations created against the comparison
version (`isRegression: true`, `correctedJSON IS NULL`), finds the
matching baseline transformation by `referenceID`, and copies the
baseline's `correctedJSON` onto the regression row via the same code
path used by `POST /v3/events/{eventID}/feedback`. The applied
corrections are immediately scored against the regression output,
populating the confusion-matrix metrics used by `function-review` and
`function-version-compare`.

Works for every function type that produces correctable
transformations, including `extract` on both the vision and OCR
paths. (Previously the vision path silently dropped `is_regression`
during the original regression run, so no rows matched the
predicate — that has been fixed.)

Returns counts plus the list of **event KSUIDs** whose underlying
regression transformation received a correction. Errors (e.g.
baseline transformation missing for a given `referenceID`) are
returned per-row in the `errors` map, keyed by event KSUID, rather
than aborting the whole call.

## Request body

- ApplyBaselineCorrectionsRequest — **Request to apply baseline corrections to regression transformations** Specifies which function and versions to use for copying corrected JSON data from baseline transformations to their corresponding regression transformations.
  - `functionName` string, required — **Name of the function to apply corrections for** Must be an existing function with both baseline and regression transformation data.
  - `baselineVersionNum` integer, required — **Baseline version number (source of corrected data)** The function version number that contains transformations with corrected JSON that should be copied to regression transformations.
  - `comparisonVersionNum` integer, required — **Comparison version number (target for applying corrections)** The function version number of regression transformations that should receive the corrected JSON from the baseline version.

## Response `200`

The request has succeeded.

- ApplyBaselineCorrectionsResponseV3 — V3 response from applying baseline corrections to regression transformations. Identifiers are surfaced as event KSUIDs — the externally-stable IDs used everywhere else in V3 — in place of the internal transformation IDs returned by the V2 endpoint.
  - `applied` integer, required — Number of corrections that were applied successfully.
  - `appliedEventIDs` string[], required — Event KSUIDs whose underlying regression transformation had a baseline correction copied onto it.
  - `skipped` integer, required — Number of regression transformations that were skipped — typically because they already had a correction or did not have a usable reference ID.
  - `errors` object, required — Map of event KSUID to error message for any regression rows where the correction could not be applied (e.g. baseline transformation not found for the row's reference ID).

## Other responses

- `400` — The server could not understand the request due to invalid syntax.
- `404` — The server cannot find the requested resource.
- `500` — Server error

## Changes

> 42 revisions in range; 1 could not be searched.

- **2026-05-13** `88f060d02adc` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/bem-team/apis/bem-api/changes/v3/functions/regression/corrections/post.md)

---

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