---
title: "更新配置"
method: PUT
path: "/configs/{key}"
tags: ["配置管理"]
---

# 更新配置

`PUT /configs/{key}`

更新配置信息

## Path parameters

- `key` string, required

## Request body

- ModelsUpdateConfigRequest
  - `value` string, required — 配置值（JSON 格式）

## Response `200`

更新成功

- ModelsConfig
  - `id` integer — 配置ID
  - `key` string — 配置键
  - `updated_at` string — 更新时间
  - `value` string — 配置值（JSON格式）

## Other responses

- `400` — 请求数据错误
- `404` — 配置不存在

---

[API](https://skmtc.net/songloft-org/apis/songloft-api.md) · [All operations](https://skmtc.net/songloft-org/apis/songloft-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/songloft-org/songloft-api/versions/ee41778dbf8f/schema)
