Skip to content

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

PATCH https://amplerun-api.spiry.org/api/v1/admin/settings/{key}

Admin interactive session. API keys do not authorize administrative operations. Sensitive writes also require the stated fresh step-up proof; account MFA is configurable.

NameLocationPresenceTypeDescription
keypathRequiredstring
Idempotency-KeyheaderRequiredUUIDUUID scoped to authenticated principal, route and canonical request hash.

Required body.

FieldTypePresenceDescription
valueschemaRequired
reasonstringRequired
expected_versionintegerRequired
{
"type": "object",
"additionalProperties": false,
"required": [
"value",
"reason",
"expected_version"
],
"properties": {
"value": {},
"reason": {
"type": "string",
"minLength": 1
},
"expected_version": {
"type": "integer",
"minimum": 0
}
}
}

Written. The new version.

application/json

FieldTypePresenceDescription
keystringRequired
versionintegerRequired
{
"type": "object",
"required": [
"key",
"version"
],
"properties": {
"key": {
"type": "string"
},
"version": {
"type": "integer"
}
}
}

Version conflict — nothing was overwritten.

application/json

FieldTypePresenceDescription
errorobjectRequired
currentSettingViewRequired
{
"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"
}
}
}

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

FieldTypePresenceDescription
errorobjectRequired
{
"$ref": "#/components/schemas/ErrorEnvelope"
}

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.

Terminal window
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