---
title: "导入主题包"
method: POST
path: "/theme-packs"
tags: ["主题包"]
---

# 导入主题包

`POST /theme-packs`

接收 .songloft-theme JSON 内容，验证后存入。相同 ID 的主题包会被更新。

## Request body

- object

## Response `200`

导入成功

- ServicesThemePackResponse
  - `author` string
  - `created_at` string
  - `data` ModelsThemePackData
    - `author` string
    - `cardRadius` number
    - `controlRadius` number
    - `dark` ModelsThemePackColors
      - `backgroundColor` string
      - `seedColor` string
      - `surfaceColor` string
    - `description` string
    - `id` string
    - `light` ModelsThemePackColors
      - `backgroundColor` string
      - `seedColor` string
      - `surfaceColor` string
    - `name` string
    - `navigationRadius` number
    - `playerGradient` string[]
    - `schemaVersion` integer
    - `version` string
  - `description` string
  - `id` integer
  - `name` string
  - `schema_version` integer
  - `theme_id` string
  - `updated_at` string
  - `version` string

## Other responses

- `400` — 格式错误

---

[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/e4d4950ef665/schema)
