---
title: "Update values settings"
method: PATCH
path: "/alignment/team/{team_id}/values"
tags: ["Alignment"]
---

# Update values settings

`PATCH /alignment/team/{team_id}/values`

## Request

- Base URL: `https://api.mnemom.ai/v1`
- URL: `https://api.mnemom.ai/v1/alignment/team/{team_id}/values`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Mnemom-Api-Key`
  - API key in cookie `mnemom_session`

PATCH applies RFC 7396 JSON Merge Patch to the `values` block (declared catalog entries + definitions / hierarchy / conflicts). `null` deletes a key; missing keeps; present replaces. Arrays are replaced wholesale (not item-merged). Requires `Idempotency-Key` and `If-Match`. Authorization: `team_id` is resolved to its owning organization from the DB and the caller must be an owner/admin of that org (or a platform admin); team_admin grants are not honored on this sub-resource. A team in an org the caller does not belong to returns the same 404 as a nonexistent team; a member without that role receives 403. No other tenant's manifest can be changed.

## Path parameters

- `team_id` string, required

## Headers

- `Idempotency-Key` string, required
- `If-Match` string, required

## Request body

- object
  - `declared` unknown[]
    - unknown
  - `definitions` object
  - `conflicts_with` string[]
  - `hierarchy` 'lexicographic' | 'weighted' | 'contextual'

## Response `200`

The `values` primitive was updated at the team scope.

- object
  - `ok` true, required
  - `scope` 'team', required
  - `scope_id` string, required
  - `resource` 'alignment', required
  - `primitive` 'values', required
  - `verb` 'put' | 'patch', required
  - `value` object, required
    - `declared` unknown[], required
      - unknown
    - `definitions` object
    - `conflicts_with` string[]
    - `hierarchy` 'lexicographic' | 'weighted' | 'contextual'
  - `content_hash` string, required: New `sha256:<hex64>` of the spec at this scope after the write.
  - `agents_flagged_for_recompose` integer
  - `_warnings` object: Pre-existing structural issues outside the modified primitive. Present only when the existing spec carries unrelated validation problems; never blocks the write.

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `404`: Resource not found
- `409`: Resource conflict — the request cannot proceed because of a current state conflict (e.g., resource already exists, version mismatch, in-flight idempotency key with a different body).
- `412`: The `If-Match` header carried a stale ETag (the spec was updated since the caller read it). Run `GET` to fetch the current ETag, splice your changes onto the latest state, and retry the write. Cards-as-primitive Phase 4 W3.1.
- `413`: Request body exceeded the per-endpoint size cap. Cards-as-primitive sub-resource verbs cap each primitive body at 64 KiB; full-card PUTs cap at 128 KiB (alignment) / 64 KiB (protection).
- `422`: Request was well-formed but semantically invalid (e.g., business-rule validation failure, malformed YAML inside a JSON payload).
- `428`: The `If-Match` header is missing on a sub-resource write. Sub-resource verbs use optimistic concurrency — read the current ETag via `GET`, then retry with `If-Match: "sha256:..."`. Cards-as-primitive Phase 4 W3.1.
- `429`: Rate-limit exceeded. The global per-IP limiter (100 requests/minute, applied to every `/v1/*` route) rejected this request. Back off until the window resets — `Retry-After` carries the cooldown in seconds and `X-RateLimit-Reset` the absolute reset time.
- `500`: Server error — request was well-formed but the server failed to fulfill it. Typically a downstream dependency (DB / RPC / external API) returned an unexpected error.

---

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