---
title: "Mcp Apply New Key Cluster"
method: POST
path: "/v1/mcp/projects/{project_id}/source-duplicates/apply-cluster"
tags: ["mcp"]
---

# Mcp Apply New Key Cluster

`POST /v1/mcp/projects/{project_id}/source-duplicates/apply-cluster`

## Request

- Base URL: `https://api.sonenta.dev`
- URL: `https://api.sonenta.dev/v1/mcp/projects/{project_id}/source-duplicates/apply-cluster`
- Auth: none declared

NK1 (task 1370): apply a NEW-canonical merge atomically — create the key
(source value + translations copied from the most-complete key of the group)
+ trash ALL the old keys. The agent then repoints CODE to the new key and
records files_modified via set_merge_plan / set_status.

## Path parameters

- `project_id` string, required

## Query parameters

- `version_id` string, nullable

## Request body

- ApplyNewKeyClusterIn
  - `source_value` string, required
  - `new_key` NewCanonicalKey, required
    - `name` string, required
    - `namespace` string, required
  - `files_modified` FileModified[], nullable
    - `path` string, required
    - `line` integer, nullable
    - `found_key` string, nullable
    - `replacement_key` string, nullable
    - `occurrences` integer, nullable
    - `key_name` string, nullable

## Response `200`

Successful Response

- ApplyNewKeyClusterOut
  - `new_key_uuid` string, required
  - `name` string, required
  - `namespace` string, required
  - `copied_from_key_uuid` string, required
  - `copied_languages` integer, required
  - `trashed_key_uuids` string[], required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/sonenta/apis/sonenta-api.md) · [All operations](https://skmtc.dev/sonenta/apis/sonenta-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sonenta/apis/sonenta-api/revisions/f853ea49fb05?raw)
