/api/v1。请求栏列出常用查询参数、JSON 字段及数据类型。成功栏列出状态码和部分顶层字段;可选字段随请求和账号权限变化。破折号表示此表未列参数。完整分组见路由索引。
聊天与私信
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
GET /chat | 登录 | — | 200 channels, groups, directs, directs_next, unread_count |
PUT /chat/channels/{id}/membership | 登录 | — | 204 |
DELETE /chat/channels/{id}/membership | 登录 | — | 204 |
GET /chat/channels/{id}/messages | 登录 | 查询 before, after, limit, read | 200 messages, conversation_id, next_before, last_read_id, unread_count |
POST /chat/channels/{id}/messages | 登录 | JSON raw (string), reply_to (integer) | 201 message |
PUT /chat/conversations/{id}/mute | 登录 | — | 204 |
DELETE /chat/conversations/{id}/mute | 登录 | — | 204 |
PUT /chat/conversations/{id}/read | 登录 | JSON message_id (integer) | 204 |
POST /chat/groups | 登录 | JSON name (string), usernames (string[]) | 201 group |
PUT /chat/groups/{id} | 登录 | JSON name (string), owner (string) | 204 |
DELETE /chat/groups/{id} | 登录 | — | 204 |
GET /chat/groups/{id}/members | 登录 | — | 200 members, owner_me, max_members |
POST /chat/groups/{id}/members | 登录 | JSON usernames (string[]) | 204 |
DELETE /chat/groups/{id}/members/{username} | 登录 | — | 204 |
DELETE /chat/messages/{id} | 登录 | — | 204 |
GET /chat/unread | 登录 | — | 200 unread_count |
GET /messages | 登录 | 查询 before, before_id, limit | 200 conversations, next, unread_count |
GET /messages/{username} | 登录 | 查询 before, after, limit, read | 200 messages, conversation_id, next_before, last_read_id, unread_count |
POST /messages/{username} | 登录 | JSON raw (string), reply_to (integer) | 201 message |
通知
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
GET /notifications | 登录 | 查询 filter, before, limit | 200 notifications, unread, next_before |
POST /notifications/read | 登录 | JSON up_to_id (integer), id (integer) | 204 |
GET /notifications/stream | 登录 | — | 200 text/event-stream |
POST /notifications/unread | 登录 | JSON id (integer) | 200 changed |
DELETE /notifications/{id} | 登录 | — | 204 |
推送与 Telegram
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
POST /me/notify-test | 登录 | JSON channel (string) | 204 |
GET /me/telegram | 登录 | — | 200 available, linked, enabled, bot |
PUT /me/telegram | 登录 | JSON enabled (boolean) | 204 |
POST /telegram/webhook/{secret} | Telegram 回调密钥 | 使用已配置的回调 URL 和 Telegram Update JSON,密钥放在 X-Telegram-Bot-Api-Secret-Token 请求头 | 200 ok |
邮件
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
POST /email/webhooks/{provider} | 服务商验签 | 服务商原始请求体(最多 1 MiB) | 204 |
GET /me/email-status | 登录 | — | 200 bouncing, score, threshold |
关注与屏蔽
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
GET /me/blocks | 登录 | — | 200 users |
PUT /topics/{id}/follow | 登录 | JSON level (string) | 204 |
PUT /users/{username}/block | 登录 | — | 204 |
DELETE /users/{username}/block | 登录 | — | 204 |
PUT /users/{username}/follow | 登录 | — | 204 |
DELETE /users/{username}/follow | 登录 | — | 204 |
GET /users/{username}/followers | 公开 | 查询 before, limit | 200 users |
GET /users/{username}/following | 公开 | 查询 before, limit | 200 users |
版务与举报
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
POST /appeals | 登录 | JSON post_id (integer), topic_id (integer), text (string) | 201 appeal |
POST /me/deletion | 登录 | JSON password (string) | 204 |
GET /me/restrictions | 登录 | — | 200 restrictions |
POST /me/restrictions/{kind}/{id}/appeal | 登录 | JSON reason (string), text (string), login (string), password (string) | 201 appeal |
POST /nodes/{slug}/mod-log/{id}/undo | 登录 | — | 204 |
POST /nodes/{slug}/reports | 登录 | JSON reason (string), note (string) | 204 |
GET /nodes/{slug}/review | 登录 | 查询 status, kind, item, before, limit | 200 items, next_before |
POST /nodes/{slug}/review/{id}/refund-reputation | 登录 | JSON note (string) | 200 refunded |
POST /nodes/{slug}/review/{id}/reopen | 登录 | JSON note (string) | 204 |
POST /nodes/{slug}/review/{id}/resolve | 登录 | JSON action (string), note (string), reputation_penalty (integer), also_lift (integer[]) | 200/204 |
POST /nodes/{slug}/review/{id}/restore-post | 登录 | JSON note (string) | 204 |
PUT /nodes/{slug}/watch/{user_id} | 登录 | JSON watch (boolean), reason (string), days (integer) | 204 |
DELETE /nodes/{slug}/watch/{user_id} | 登录 | — | 204 |
PUT /posts/{id}/hidden | 登录 | JSON hidden (boolean), reason (string) | 204 |
GET /posts/{id}/moderate | 登录 | — | 200 scope, node, first_post, hidden, author, can_penalize, max_days, reputation_penalty_max, open_reports |
POST /posts/{id}/moderate | 登录 | JSON reason (string), note (string), post_action (string), user_action (string), days (integer), reputation_penalty (integer), on_conflict (string) | 200 scope, post_action, user_action, item_id, reputation_deducted, closed_items |
POST /posts/{id}/reports | 登录 | JSON reason (string), note (string) | 204 |
POST /posts/{id}/restore | 登录 | — | 204 |
POST /restrictions/lookup | 账号密码 | JSON login (string), password (string) | 200 restrictions |
POST /restrictions/{kind}/{id}/appeal | 会话或账号密码 | JSON reason (string), text (string), login (string), password (string) | 201 appeal |
风控与申诉
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
POST /risk/appeals | 会话或账号密码 | JSON kind (string), body (string), login (string), password (string) | 204 |
能量与账本
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
GET /checkin | 登录 | — | 200 checked_in_today, today_points, days, total, streak |
POST /checkin | 登录 | — | 200 points, balance, day |
GET /points | 登录 | — | 200 balance, transfer |
GET /points/history | 登录 | 查询 month, kinds, direction, group, before, limit | 200 entries, total |
GET /points/leaderboard | 公开 | 查询 period, page, limit | 200 period, users, total, page, next_page, updated_at, refresh_minutes |
GET /points/summary | 登录 | 查询 month | 200 month, income, expense, kinds, active_months, week_income |
POST /points/transfers | 登录 | JSON to (string), amount (integer), memo (string) · 必填请求头 Idempotency-Key(1–100 字节) | 200 transaction_id, amount, fee, balance |
成就
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
GET /achievements | 登录 | — | 200 achievements, showcase, max_showcase, unlocked_count, total, reputation, energy_earned, reputation_earned |
PUT /achievements/{key}/pin | 登录 | — | 204 |
DELETE /achievements/{key}/pin | 登录 | — | 204 |
GET /users/{username}/achievements | 公开 | — | 200 showcase, reputation |
GET /users/{username}/achievements/unlocked | 公开 | — | 200 achievements, unlocked_count, total |
声望
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
GET /me/reputation | 登录 | — | 200 reputation, pending, tier, tier_name, next, needed, progress, week, sources, tiers, legend_review, tier_review, upgrade_locked_until, onboarding_done_at, week_by_source, tasks, rate_30d |
GET /me/reputation/ledger | 登录 | 查询 before, limit | 200 items, next |
任务
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
GET /me/tasks | 登录 | — | 200 tasks, week_reputation, week_cap, reputation_eligible |
社区玩法
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
PATCH /lotteries/{id} | 登录 | JSON draw_at (RFC 3339), max_participants (integer), min_trust_level (integer), title (string), min_tickets (integer), max_tickets (integer), min_participants (integer), prizes (object[]) | 200 lottery |
GET /lotteries/{id}/participants | 公开 | — | 200 participants, participant_count, ticket_count |
POST /lotteries/{id}/tickets | 登录 | JSON tickets (integer), random (boolean) · 必填请求头 Idempotency-Key(1–100 字节) | 200 tickets |
GET /posts/{id}/lottery | 公开 | — | 200 lottery |
POST /posts/{id}/lottery | 登录 | JSON title (string), draw_at (RFC 3339), min_tickets (integer), max_tickets (integer), min_participants (integer), max_participants (integer), min_trust_level (integer), prizes (object[]) | 201 lottery |
GET /posts/{id}/points | 公开 | — | 200 tips, system_actions |
POST /posts/{id}/tips | 登录 | JSON amount (integer), note (string) | 201 tip |
DELETE /tips/{id} | 登录 | — | 204 |
GET /topics/{id}/red-envelope | 公开 | — | 200 red_envelope |
POST /topics/{id}/red-envelope | 登录 | JSON total (integer), count (integer) | 201 red_envelope |
