---
title: "管理收藏"
method: POST
path: "/collection/{subject_id}/{action}"
tags: ["收藏"]
deprecated: true
---

# 管理收藏

`POST /collection/{subject_id}/{action}`

> **Deprecated.**

管理收藏。Content-type必须为multipart/form-data或application/x-www-form-urlencoded，参数都得放在body里。

## Path parameters

- `subject_id` integer, required
- `action` 'create' | 'update', required

## Response `200`

条目收藏信息

- object
  - `status` CollectionStatus — 收藏状态 - 1 = wish = 想做 - 2 = collect = 做过 - 3 = do = 在做 - 4 = on_hold = 搁置 - 5 = dropped = 抛弃
    - `id` 1 | 2 | 3 | 4 | 5 — 收藏状态 ID
    - `type` 'wish' | 'collect' | 'do' | 'on_hold' | 'dropped' — 收藏状态类型
    - `name` '想做' | '做过' | '在做' | '搁置' | '抛弃' — 收藏状态名称
  - `rating` integer — 评分
  - `comment` string — 评论
  - `private` 0 | 1 — 收藏隐私
  - `tag` string[] — 标签
  - `ep_status` integer — 完成话数
  - `lasttouch` integer — 上次更新时间
  - `user` User — 用户信息
    - `id` integer — 用户 id
    - `url` string — 用户主页地址
    - `username` string — 用户名
    - `nickname` string — 昵称
    - `avatar` object — 头像地址
      - `large` string
      - `medium` string
      - `small` string
    - `sign` string — 签名
    - `usergroup` UserGroup — unresolved $ref

## Other responses

- `401` — 未授权

## Changes

- **2022-09-04** `890913d92c65` — 1 info
  - endpoint deprecated
- **2022-04-24** `171362386f6a` — 1 breaking, 9 info
  - the `user/usergroup` response's property type changed from `integer` to no type for status `200`
  - removed the `1.00` enum value from the `user/usergroup` response property for the response status `200`
  - removed the `10.00` enum value from the `user/usergroup` response property for the response status `200`
  - removed the `11.00` enum value from the `user/usergroup` response property for the response status `200`
  - …6 more
- **2022-04-20** `b563cadc4629` — 1 info
  - api operation id `UpdateCollectionBySubjectIdWithAction` was added
- **2022-01-18** `9578e4871bb8` — 1 breaking, 5 warning
  - added required request body
  - deleted the `query` request parameter `comment`
  - deleted the `query` request parameter `privacy`
  - deleted the `query` request parameter `rating`
  - …2 more
- **2021-12-28** `6f49623717d8` — 2 info
  - the endpoint scheme security `HTTPBearer` was added to the API
  - the endpoint scheme security `bangumi_auth` was removed from the API

[Full history](https://skmtc.dev/bangumi/apis/bangumi-api/changes/collection/:subject_id/:action/post.md)

---

[API](https://skmtc.dev/bangumi/apis/bangumi-api.md) · [All operations](https://skmtc.dev/bangumi/apis/bangumi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bangumi/apis/bangumi-api/revisions/890913d92c65?raw)
