mcp

Update Key

Edit-in-place the SOURCE value of an existing key (task 862).

Patches the source-language value while PRESERVING the key + its history (no delete+recreate). When the value actually changes, the key's existing reviewed/approved target translations are demoted to translated (needs-review / à revoir) and that count is surfaced. A real change bills one unit; a no-op (submitted value == current) writes nothing and is not billed.

patch/v1/mcp/projects/{project_id}/keys

Request

  • Base URL: https://api.sonenta.dev
  • URL: https://api.sonenta.dev/v1/mcp/projects/{project_id}/keys
  • Auth: none declared

Path parameters

project_idstring required

Request body

source_valuestring nullable

New source-language value. OMIT for a retype-only call: the source value and every translation are then left strictly untouched. A type-reclassification tool must never have to send content it does not own.

key_uuidstring nullable

Target key uuid (preferred).

namespacestring nullable

...or namespace slug (with name).

namestring nullable

...key name (with namespace).

descriptionstring nullable

Optional: also update the key's description.

type'text' | 'heading' | 'label' | 'caption' | 'badge' | 'tooltip' | 'error_message' | 'toast' | 'button' | 'link' | 'menu_item' | 'input_placeholder' | 'input_label' | 'image' | 'icon' | 'meta_title' | 'meta_description' nullable

Optional: also retype the key (e.g. button, heading). A type-only change (same source_value) persists the new type WITHOUT touching the source value or translations, and is NOT billed (task 1421).

type_source'default' | 'detected' | 'manual' nullable

Provenance of the retype: 'detected' when a mechanical code scan inferred it, 'manual' (the default) when it is a deliberate call. Drives the a11y detection coverage — see GET /a11y/detection.

pluralsboolean nullable

Optional: toggle whether this key is PLURAL. true makes it a plural key (its value carries CLDR forms one/few/…/other); false makes it a single value. Touches only the flag — not the source value or translations — and is not billed.

Response

Successful Response

key_uuidstring required
key_namestring required
namespace_uuidstring required
source_valuestring required
resultstring required
source_changedboolean required
type_changedboolean
type_resultstring
plurals_changedboolean
stale_flaggedinteger required
billableboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.