> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nodeloc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 主题与帖子

> 主题、帖子、草稿、标签、编辑历史与阅读记录

路径相对于 `/api/v1`。请求栏列出常用查询参数、JSON 字段及数据类型。成功栏列出状态码和部分顶层字段；可选字段随请求和账号权限变化。破折号表示此表未列参数。完整分组见[路由索引](https://docs.nodeloc.com/api-reference/v1/routes.md)。

## 主题、帖子与标签

### /me

| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
| - | - | - | - |
| `GET /me/node-blocks` | 登录 | — | `200` `nodes` |

### /nodes

| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
| - | - | - | - |
| `PUT /nodes/{slug}/block` | 登录 | — | `204` |
| `DELETE /nodes/{slug}/block` | 登录 | — | `204` |
| `GET /nodes/{slug}/pins` | 公开 | — | `200` `topics` |
| `GET /nodes/{slug}/tags` | 公开 | — | `200` `tags` |
| `PUT /nodes/{slug}/tags/{name}` | 登录 | JSON `name` (string), `create` (boolean), `description` (string), `color` (string), `style` (string), `icon` (string), `group_id` (integer), `node_slug` (string), `staff_only` (boolean), `rules` (string) | `200` `tag` |
| `PATCH /nodes/{slug}/tags/{name}` | 登录 | JSON `name` (string), `create` (boolean), `description` (string), `color` (string), `style` (string), `icon` (string), `group_id` (integer), `node_slug` (string), `staff_only` (boolean), `rules` (string) | `200` `tag`, `options` |
| `DELETE /nodes/{slug}/tags/{name}` | 登录 | — | `204` |

### /posts

| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
| - | - | - | - |
| `PATCH /posts/{id}` | 登录 | JSON `raw` (string), `title` (string), `reason` (string), `tags` (string\[]), `node` (string), `min_trust_level` (integer), `login_only` (boolean) | `200` `post` |
| `DELETE /posts/{id}` | 登录 | JSON `reason` (string), `notify` (boolean), `appealable` (boolean) · 可省略整个请求体 | `204` |
| `PUT /posts/{id}/accepted` | 登录 | JSON `accepted` (boolean) | `204` |
| `PUT /posts/{id}/acknowledgment` | 登录 | — | `204` |
| `GET /posts/{id}/acknowledgments` | 登录 | 查询 `limit` | `200` `total`, `users` |
| `PUT /posts/{id}/adult` | 登录 | JSON `adult` (boolean) | `204` |
| `PUT /posts/{id}/bookmark` | 登录 | — | `204` |
| `DELETE /posts/{id}/bookmark` | 登录 | — | `204` |
| `PUT /posts/{id}/flags` | 登录 | JSON `locked` (boolean), `collapsed` (boolean) | `204` |
| `GET /posts/{id}/raw` | 登录 | — | `200` `raw` |
| `GET /posts/{id}/revisions` | 公开 | — | `200` `post_id`, `post_number`, `revisions`, `author`, `author_avatar`, `posted_at`, `can_restore`, `grace_minutes` |
| `POST /posts/{id}/revisions/{n}/restore` | 登录 | — | `200` `post` |
| `PUT /posts/{id}/vote` | 登录 | JSON `value` (integer), `emoji` (string), `from` (string) | `200` `upvotes`, `downvotes`, `viewer_vote` |

### /tags

| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
| - | - | - | - |
| `GET /tags` | 公开 | 查询 `q`, `node`, `limit` | `200` `tags` |
| `PUT /tags/{name}/follow` | 登录 | — | `200` `name`, `following` |
| `DELETE /tags/{name}/follow` | 登录 | — | `200` `name`, `following` |

### /topics

| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
| - | - | - | - |
| `GET /topics` | 公开 | 查询 `limit`, `sort`, `node`, `tag`, `offset`, `cursor`, `joined`, `featured`, `with_total` | `200` `topics`, `next_offset`, `next_cursor`, `total`, `total_capped` |
| `POST /topics` | 登录 | JSON `node` (string), `title` (string), `raw` (string), `tags` (string\[]), `min_trust_level` (integer), `login_only` (boolean), `draft_key` (string) | `201` `topic`, `post`, `held` |
| `GET /topics/{id}` | 公开 | 查询 `after`, `limit` | `200` `topic`, `posts`, `next_after`, `permissions` |
| `DELETE /topics/{id}` | 登录 | JSON `reason` (string), `notify` (boolean), `appealable` (boolean) · 可省略整个请求体 | `204` |
| `PUT /topics/{id}/adult` | 登录 | JSON `adult` (boolean) | `204` |
| `PUT /topics/{id}/allow-repost` | 登录 | JSON `on` (boolean) | `204` |
| `PUT /topics/{id}/dismissal` | 登录 | — | `204` |
| `DELETE /topics/{id}/dismissal` | 登录 | — | `204` |
| `GET /topics/{id}/hidden-blocks` | 公开 | 查询 `post_ids` | `200` `blocks` |
| `GET /topics/{id}/log` | 公开 | 查询 `before` | `200` `entries`, `next_before` |
| `POST /topics/{id}/merge` | 登录 | JSON `target_id` (integer), `reason` (string) | `200` `topic_id`, `post_number`, `moved` |
| `GET /topics/{id}/merge-candidates` | 登录 | 查询 `q` | `200` `scope`, `source`, `topics` |
| `GET /topics/{id}/next-video` | 公开 | 查询 `provider` | `200` `video` |
| `POST /topics/{id}/posts` | 登录 | JSON `raw` (string), `reply_to_post_number` (integer) | `201` `post`, `held` |
| `GET /topics/{id}/related` | 公开 | 查询 `kind`, `offset` | `200` `topics`, `next_offset` |
| `GET /topics/{id}/replies` | 公开 | 查询 `sort`, `offset`, `limit` | `200` `posts`, `next_offset` |
| `GET /topics/{id}/repost-options` | 登录 | — | `200` `origin`, `title`, `nodes`, `profile_reason`, `title_min`, `title_max` |
| `GET /topics/{id}/reposts` | 公开 | — | `200` `reposts` |
| `POST /topics/{id}/reposts` | 登录 | JSON `to` (string), `node` (string), `title` (string), `comment` (string) | `201` `topic`, `held` |
| `PUT /topics/{id}/state` | 登录 | JSON `closed` (boolean), `pinned` (boolean), `pin_days` (integer), `pinned_until` (string) | `204` |
| `GET /topics/{id}/thread` | 公开 | 查询 `sort`, `limit`, `parent`, `after`, `levels`, `offset` | `200` `posts`, `max_depth`, `shown_replies`, `accepted_answer`, `can_accept`, `next_offset`, `next_after` |

### /users

| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
| - | - | - | - |
| `GET /users/{username}/activity` | 公开 | 查询 `offset` | `200` `items`, `total`, `next_offset` |
| `GET /users/{username}/posts` | 公开 | 查询 `cursor`, `limit` | `200` `posts`, `next_cursor` |
| `GET /users/{username}/topics` | 公开 | 查询 `cursor`, `limit` | `200` `topics`, `next_cursor` |
| `GET /users/{username}/voted` | 公开 | 查询 `offset` | `200` `items`, `private`, `next_offset` |

### 其他接口

| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
| - | - | - | - |
| `GET /bookmark-folders` | 登录 | — | `200` `folders`, `total`, `unfiled`, `stale` |
| `POST /bookmark-folders` | 登录 | JSON `name` (string) | `201` `id`, `name` |
| `PATCH /bookmark-folders/{id}` | 登录 | JSON `name` (string), `public` (boolean) | `204` |
| `DELETE /bookmark-folders/{id}` | 登录 | — | `204` |
| `GET /bookmarks` | 登录 | 查询 `before`, `limit` | `200` `bookmarks`, `next_before` |
| `POST /bookmarks/move` | 登录 | JSON `ids` (integer\[]), `folder_id` (integer) | `200` `moved` |
| `POST /bookmarks/remove` | 登录 | JSON `ids` (integer\[]) | `200` `removed` |
| `POST /bookmarks/restore` | 登录 | JSON `items` (object\[]) | `200` `restored` |
| `PUT /bookmarks/{id}/note` | 登录 | JSON `note` (string) | `200` `note` |
| `PUT /bookmarks/{id}/reminder` | 登录 | JSON `at` (RFC 3339) | `200` `at` |
| `GET /drafts` | 登录 | — | `200` `drafts`, `limit`, `lifetime_days`, `warn_days` |
| `POST /drafts/delete` | 登录 | JSON `keys` (string\[]) | `200` `deleted` |
| `GET /drafts/{key}` | 登录 | 查询 `optional` | `200` `draft` |
| `PUT /drafts/{key}` | 登录 | JSON `data` (JSON), `device` (string), `revision` (integer), `force` (boolean) | `200` |
| `DELETE /drafts/{key}` | 登录 | — | `204` |
| `POST /drafts/{key}/conflict` | 登录 | JSON `use` (string) | `200` `revision`, `updated_at` |
| `PUT /drafts/{key}/schedule` | 登录 | JSON `publish_at` (RFC 3339) | `200` `publish_at` |
| `DELETE /drafts/{key}/schedule` | 登录 | — | `204` |
| `GET /emojis` | 公开 | — | `200` `emojis`, `packs` |
| `GET /history` | 登录 | 查询 `kind`, `q`, `cursor`, `limit` | `200` `items`, `groups`, `total`, `shown`, `paused`, `retention_days`, `undo_seconds`, `resume`, `next_cursor` |
| `POST /history/clear` | 登录 | — | `200` `removed`, `undo` |
| `POST /history/remove` | 登录 | JSON `ids` (integer\[]), `since` (RFC 3339), `until` (RFC 3339), `kind` (string), `q` (string) | `200` `removed`, `undo` |
| `POST /history/restore` | 登录 | JSON `undo` (string) | `200` `restored` |
| `DELETE /history/{id}` | 登录 | — | `200` `removed`, `undo` |
| `GET /leaderboards/posting` | 公开 | 查询 `period`, `by`, `limit` | `200` `period`, `users` |
| `POST /preview` | 登录 | JSON `raw` (string) | `200` `html`, `ack_label` |
| `GET /saved` | 登录 | 查询 `folder`, `kind`, `sort`, `q`, `offset`, `limit` | `200` `bookmarks`, `total`, `next_offset` |
| `GET /tag-groups` | 公开 | — | `200` `groups` |
| `GET /tag-labels` | 公开 | 查询 `names` | `200` `labels` |
| `GET /tag-looks` | 公开 | — | `200` `icons`, `groups`, `colors`, `styles` |
| `GET /videos/feed` | 公开 | 查询 `cursor`, `provider`, `limit` | `200` `videos`, `next_cursor` |

## 阅读进度

| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
| - | - | - | - |
| `PUT /topics/{id}/read` | 登录 | JSON `post_number` (integer), `seconds` (integer), `end` (boolean) | `204` |

## 投票

| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
| - | - | - | - |
| `PUT /polls/{id}/closed` | 登录 | JSON `closed` (boolean) | `200` `poll` |
| `GET /polls/{id}/voters` | 公开 | — | `200` `voters` |
| `PUT /polls/{id}/votes` | 登录 | JSON `option_ids` (integer\[]) | `200` `poll` |
| `GET /posts/{id}/polls` | 公开 | — | `200` `polls` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.