---
title: "Create a new index"
method: POST
path: "/v0/indices"
tags: ["目录"]
---

# Create a new index

`POST /v0/indices`

## Request

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

## Response `200`

Successful Response

- Index
  - `id` integer, required
  - `title` string, required
  - `desc` string, required
  - `total` integer: 收录条目总数
  - `stat` Stat, required
    - `comments` integer, required
    - `collects` integer, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `creator` Creator, required: 意义同<a href="#model-Me">Me</a>
    - `username` string, required
    - `nickname` string, required
  - `ban` boolean, required: deprecated, always false.
  - `nsfw` boolean, required

## Other responses

- `401`: Unauthorized

## Changes

- **2023-05-03** (v0) `adaa40a09e57`: 1 info
  - response property `ban` deprecated
- **2022-11-19** (v0) `bb6bcec42206`: 1 warning, 1 info
  - removed the optional property `detail` from the response with the `401` status
  - added the optional property `details` to the response with the `401` status
- **2022-10-24** (v0) `bbacb4142fa3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bangumi/apis/bangumi-open-api/changes/v0/indices/post.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)
