---
title: "创建配置"
method: POST
path: "/configs"
tags: ["配置管理"]
---

# 创建配置

`POST /configs`

创建一个新的配置

## Request body

- ModelsCreateConfigRequest
  - `key` string, required — 配置键
  - `value` string, required — 配置值（JSON 格式）

## Response `201`

创建成功

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

## Other responses

- `400` — 请求数据错误
- `500` — 创建失败

---

[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)
