---
title: "保存标签同步到文件开关"
method: PUT
path: "/settings/tag-sync-to-file"
tags: ["歌曲管理"]
---

# 保存标签同步到文件开关

`PUT /settings/tag-sync-to-file`

## Request

- Base URL: `https://localhost:58091/api/v1`
- URL: `https://localhost:58091/api/v1/settings/tag-sync-to-file`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/songloft-org/apis/songloft-api/docs/settings/tag-sync-to-file/put.ts> (a function with typed inputs; its response is checked against the schema)

开启/关闭“自定义标签同步写入音频文件”功能。开启后，对歌曲执行 SetSongTags 时会将标签列表写入音频文件的 SONGLOFT_TAGS 自定义字段。

## Request body

- object

## Response `200`

保存后的开关状态 {enabled: bool}

- object

## Other responses

- `400`: 请求格式错误
- `500`: 保存配置失败

## Changes

- **2026-09-20** `257459a6ca83`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/songloft-org/apis/songloft-api/changes/settings/tag-sync-to-file/put.md)

---

[API](https://skmtc.dev/songloft-org/apis/songloft-api.md) - [All operations](https://skmtc.dev/songloft-org/apis/songloft-api/llms.txt) - [OpenAPI document](https://skmtc.dev/songloft-org/apis/songloft-api/revisions/5b30bc01776a?raw)
