---
title: "Edit subject information in a index"
method: PUT
path: "/v0/indices/{index_id}/subjects/{subject_id}"
tags: ["目录"]
---

# Edit subject information in a index

`PUT /v0/indices/{index_id}/subjects/{subject_id}`

## Request

- The document declares no server URL.
- Auth: HTTP bearer

如果条目不存在于目录，会创建该条目

## Path parameters

- `index_id` integer, required
- `subject_id` integer, required: 条目 ID

## Request body

- IndexSubjectEditInfo: 修改目录中条目的信息
  - `sort` integer: 排序条件，越小越靠前
  - `comment` string

## Response `200`

Successful Response

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found

## Changes

- **2022-11-19** (v0) `bb6bcec42206`: 3 warning, 3 info
  - removed the optional property `detail` from the response with the `400` status
  - removed the optional property `detail` from the response with the `401` status
  - removed the optional property `detail` from the response with the `404` status
  - added the optional property `details` to the response with the `400` status
  - …2 more
- **2022-10-24** (v0) `bbacb4142fa3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bangumi/apis/bangumi-open-api/changes/v0/indices/:index_id/subjects/:subject_id/put.md)

---

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