PATCH /api/v1/admin/settings/{key}
Operation: adminUpdateSetting.
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
Endpoint
Section titled “Endpoint”PATCH https://amplerun-api.spiry.org/api/v1/admin/settings/{key}
Authentication
Section titled “Authentication”Admin interactive session. API keys do not authorize administrative operations. Sensitive writes also require the stated fresh step-up proof; account MFA is configurable.
Parameters
Section titled “Parameters”| Name | Location | Presence | Type | Description |
|---|---|---|---|---|
key | path | Required | string | |
Idempotency-Key | header | Required | UUID | UUID scoped to authenticated principal, route and canonical request hash. |
Request body
Section titled “Request body”Required body.
application/json
Section titled “application/json”| Field | Type | Presence | Description |
|---|---|---|---|
value | schema | Required | |
reason | string | Required | |
expected_version | integer | Required |
{ "type": "object", "additionalProperties": false, "required": [ "value", "reason", "expected_version" ], "properties": { "value": {}, "reason": { "type": "string", "minLength": 1 }, "expected_version": { "type": "integer", "minimum": 0 } }}Responses
Section titled “Responses”Written. The new version.
application/json
| Field | Type | Presence | Description |
|---|---|---|---|
key | string | Required | |
version | integer | Required |
{ "type": "object", "required": [ "key", "version" ], "properties": { "key": { "type": "string" }, "version": { "type": "integer" } }}Version conflict — nothing was overwritten.
application/json
| Field | Type | Presence | Description |
|---|---|---|---|
error | object | Required | |
current | SettingView | Required |
{ "type": "object", "required": [ "error", "current" ], "properties": { "error": { "type": "object", "required": [ "code", "message", "retryable", "request_id" ], "properties": { "code": { "type": "string", "enum": [ "VERSION_CONFLICT" ] }, "message": { "type": "string" }, "retryable": { "type": "boolean" }, "request_id": { "type": "string" } } }, "current": { "$ref": "#/components/schemas/SettingView" } }}default
Section titled “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.
application/json
| Field | Type | Presence | Description |
|---|---|---|---|
error | object | Required |
{ "$ref": "#/components/schemas/ErrorEnvelope"}Static request outline
Section titled “Static request outline”Replace path/query placeholders and provide the required JSON body, headers and credential from the sections above. This is a request outline, not a command that chooses an amount or starts a rental for you.
curl --request PATCH 'https://amplerun-api.spiry.org/api/v1/admin/settings/{key}'Schema definitions · Download OpenAPI · Authentication · Errors and recovery
Official AmpleRun documentation · Contract v3 · Generated from the API contract · Revision 52fe29de · Open AmpleRun · View Markdown · For agents