---
title: "Update one setting (Admin+recentMFA); typed reason + expected-version CAS; a root-of-trust key is refused 403; a stale version is 409 VERSION_CONFLICT with the current value attached and writes nothing"
method: PATCH
path: "/api/v1/admin/settings/{key}"
tags: ["admin"]
---

# Update one setting (Admin+recentMFA); typed reason + expected-version CAS; a root-of-trust key is refused 403; a stale version is 409 VERSION_CONFLICT with the current value attached and writes nothing

`PATCH /api/v1/admin/settings/{key}`

## Request

- Base URL: `https://amplerun-api.spiry.org`
- URL: `https://amplerun-api.spiry.org/api/v1/admin/settings/{key}`
- Auth: HTTP bearer

## Path parameters

- `key` string, required

## Headers

- `Idempotency-Key` string, uuid, required

## Request body

- object
  - `value` unknown, required
  - `reason` string, required
  - `expected_version` integer, required

## Response `200`

Written. The new version.

- object
  - `key` string, required
  - `version` integer, required

## Other responses

- `409`: Version conflict — nothing was overwritten.
- `default`: Error envelope. 401 unauthenticated, 403/404 forbidden, 409 conflict, 422 invalid input, 429 rate limited (code UNAVAILABLE, retryable:true, no Retry-After header), 503 unavailable money/provider state with retryable:true.

---

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