{"openapi":"3.0.3","info":{"title":"Nekolive 平台 API","version":"2.7.0","description":"用自己的程式讀取收款紀錄、排行榜與會員，往動態牆發文、寫部落格，也可以在直播中暫停通知、叫下一位、換歌、調整計時器與計數器、出題、跳過通知，管理創作者頁面、行事曆、商店訂單、觀眾訊息與 Twitch 機器人。有事件發生時，平台也可以主動把資料送到你的網址（事件通知）。\n\n## 驗證\n有兩種方式，API 的用法都一樣：\n\n- **API 金鑰**：串接自己的帳號時用。到後台「開發者」建立金鑰。\n- **應用程式授權（OAuth2）**：做給其他創作者用的工具時用，請看下面的「應用程式授權」。\n\n每個請求都帶上：\n\n```\nAuthorization: Bearer nk_xxxxxxxx\n```\n\n金鑰只在建立時顯示一次，可以隨時撤銷，撤銷後馬上失效。\n\n## 權限\n| 權限 | 可以做的事 |\n| --- | --- |\n| `orders:read` | 查詢付款成功的斗內與小費訂單 |\n| `stats:read` | 斗內排行榜、Twitch 追隨與訂閱人數、Twitch 直播總結的事件通知 |\n| `members:read` | 會員方案與訂閱的觀眾 |\n| `store:read` | 創作者商店的訂單（不含收件地址） |\n| `store:write` | 更新商店訂單的處理狀態與備註 |\n| `crowdfunding:read` | 募資專案與贊助紀錄（不含收件地址） |\n| `posts:read` | 列出、查詢貼文與部落格文章 |\n| `posts:write` | 發布、編輯、刪除貼文與部落格文章，上傳貼文圖片 |\n| `live:read` | 查看通知暫停、媒體點播、排隊、點歌、計時器、計數器、答題、Twitch 通知佇列、整合畫面的狀態 |\n| `live:write` | 直播中的即時操作：暫停通知與點播、叫下一位、換歌、調整計時器與計數器、出題與管理題庫、答題的聊天室訊息、跳過或清空通知、切換整合畫面的圖層、重新推播斗內通知 |\n| `progress:read` | 查看進度條與 OBS 自訂文字 |\n| `progress:write` | 修改進度條的標題、目標、計算期間，以及 OBS 自訂文字 |\n| `bot:read` | 列出 Twitch 機器人的自訂指令 |\n| `bot:write` | 新增、修改、刪除自訂指令 |\n| `points:read` | 查詢觀眾的機器人點數與點數排行 |\n| `points:write` | 幫觀眾加減 Twitch 機器人點數 |\n| `profile:read` | 查看週表、行事曆、願望清單、感謝牆、里程碑、作品集 |\n| `profile:write` | 新增、修改、刪除週表、行事曆活動、願望、感謝牆、里程碑、作品 |\n| `inbox:read` | 查看觀眾傳來的訊息（匿名的訊息不會知道是誰傳的） |\n| `inbox:write` | 回覆、公開、刪除觀眾訊息 |\n| `webhooks:write` | 登記事件通知，有新斗內、追隨、訂閱等事件時送到指定的網址 |\n\n帳號基本資料（`GET /{owner}/account`：暱稱、帳號、大頭貼、綁定的平台、直播狀態）不需要另外開權限，任何有效的金鑰或應用程式授權都可以讀。\n\n網址裡的 `{owner}` 填 `me` 就是金鑰所屬的帳號。共同管理的創作者填對方的 UUID，需要對方在「共同管理人」開給你對應功能的權限（每個網址的說明裡有寫是哪一項）。\n\n## 帳號被暫停時\n帳號太久沒登入後台會被暫停，這時可以照常讀取，新增、修改、刪除、即時操作一律回 `403`。登入一次後台就會恢復。\n\n## 次數限制\n- 每把金鑰每分鐘 120 個請求。\n- 發文、發布部落格文章、編輯與刪除貼文：每把金鑰每小時 30 次；每位創作者一小時最多發 20 篇、一天最多 100 篇（包含在後台發的）。\n- 即時操作（`live:write`）：每把金鑰每小時 600 次，其中叫下一位（會發聊天室訊息）每小時 120 次。\n- 修改週表、行事曆、願望清單、進度條、指令、題庫與答題設定、創作者頁面內容、商店訂單、觀眾訊息：每把金鑰每小時 120 次。\n- 查詢頻道進行中的 Twitch 預測：每把金鑰每小時 120 次。\n- 加減機器人點數：每把金鑰每小時 300 次。\n- 斗內排行榜：每把金鑰每小時 300 次。\n- 重新推播斗內通知：每把金鑰每小時 60 次，同一筆訂單 30 秒內一次。\n- 修改事件通知：每把金鑰每小時 60 次；送出測試與重新送出每小時 30 次。\n- 上傳圖片：每把金鑰每小時 60 張，每位創作者一天最多 100 張。\n- 超過時回 `429`，`Retry-After` 標頭是要等幾秒。\n\n## 發一篇有圖片的貼文\n1. 用 `POST /me/images` 上傳圖片（body 直接放圖片檔），拿到 `url`。\n2. 24 小時內用 `POST /me/posts` 發文，把 `url` 放進 `images`。超過 24 小時沒用到的圖片會被刪掉。\n\n```\ncurl -X POST https://platform-api.nekolive.net/me/images \\\n  -H \"Authorization: Bearer nk_xxxxxxxx\" \\\n  -H \"Content-Type: image/png\" \\\n  --data-binary @cover.png\n```\n\n## 應用程式授權\n做給其他創作者使用的工具（網站、機器人、桌面程式）時，請用 OAuth2 讓創作者自己按「允許」，不要請創作者把金鑰交給你。\n\n1. 到後台「開發者」的「我的應用程式」建立應用程式，填好回呼網址（最多 3 個，通過審核後最多 10 個）與需要的權限，拿到 `client_id`（一般應用程式另外有 `client_secret`，只會顯示一次）。\n2. 把創作者導到授權頁，一律要帶 PKCE（S256）：\n\n```\nhttps://streamer.nekolive.net/oauth/authorize\n  ?response_type=code\n  &client_id=nkapp_xxxxxxxx\n  &redirect_uri=https://example.com/callback\n  &scope=orders:read posts:write\n  &state=隨機字串\n  &code_challenge=BASE64URL(SHA256(code_verifier))\n  &code_challenge_method=S256\n```\n\n3. 創作者允許後會回到 `redirect_uri?code=…&state=…`，請先確認 `state` 跟送出去的一樣，再用 `POST /oauth/token` 換 token。授權碼 10 分鐘內有效、只能用一次。\n4. 用拿到的 `access_token` 呼叫 API，`Authorization: Bearer nka_…`，有效 1 小時；過期前用 `refresh_token` 換新的（90 天內有效，每換一次舊的就作廢）。\n5. 應用程式還沒通過平台審核時，除了建立者自己以外，同一位開發者全部的應用程式加起來最多 10 個帳號可以授權，這些帳號只能授權 `posts:read`、`live:read`、`progress:read`（`scope` 要明確列出，要求其他權限會被擋下）。要給更多人用或需要其他權限，請在「我的應用程式」按「送出審核」。\n\n桌面程式、手機 App 這類沒辦法保管密鑰的，建立時選「公開用戶端」，換 token 時只帶 `client_id` 和 `code_verifier`。創作者隨時可以在後台「帳號資料 / 個人資料」的「應用程式」分頁取消授權，取消後 token 馬上失效。\n","contact":{"name":"API 支援","email":"contact@nekolive.net"}},"servers":[{"url":"https://platform-api.nekolive.net"}],"security":[{"apiKey":[]},{"oauth2":[]}],"tags":[{"name":"金鑰","description":"確認金鑰是否可用"},{"name":"帳號","description":"帳號的基本資料與直播狀態"},{"name":"應用程式授權","description":"OAuth2 換 token、撤銷 token"},{"name":"事件通知","description":"需要 `webhooks:write`。登記一個網址，有事件發生時平台會用 POST 把 JSON 送過去，內容格式見 `WebhookEvent`。\n\n**每個事件需要的權限**\n\n| 事件 | 需要的權限 |\n| --- | --- |\n| `platform.donate`、`platform.tip` | `orders:read` |\n| `platform.membership_join`、`platform.membership_content` | `members:read` |\n| `platform.shop_order` | `store:read` |\n| `platform.crowdfund_pledge`、`platform.crowdfund_goal` | `crowdfunding:read` |\n| `platform.inbox_message` | `inbox:read` |\n| `platform.post_publish` | `posts:read` |\n| `platform.blessing` | `profile:read` |\n| `platform.stream_summary`（Twitch 直播總結，下播大約 15 分鐘後送，一場一次） | `stats:read` |\n| `twitch.*`（追隨、訂閱、續訂、贈送訂閱、小奇點、揪團、忠誠點數兌換、連續觀看、列車、開台、下播、修改直播資料、VIP、廣告開始）以及 `platform.follow`、`platform.signin`、`platform.achievement_unlock`、`platform.media_request`、`platform.song_request`、`platform.timer_adjust`、`platform.youtube_live`、`platform.youtube_video` | `live:read` |\n\n金鑰撤銷、授權取消，或權限被拿掉之後，就不會再送出需要那項權限的事件。\n\n**驗證簽章**\n\n每個請求都帶這些標頭：\n\n- `Nekolive-Event`：事件名稱\n- `Nekolive-Delivery`：送出編號（重送時一樣）\n- `Nekolive-Webhook-Id`：事件通知的編號\n- `Nekolive-Signature`：`t=時間戳記,v1=簽章`\n\n簽章是用登記時拿到的密鑰，對「時間戳記 + `.` + 原始的請求內容」算 HMAC-SHA256（十六進位）。請比對簽章，並拒絕時間戳記跟現在差超過 5 分鐘的請求。\n\n```\nconst expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');\n```\n\n**回應與重送**\n\n10 秒內回完 2xx 就算送達（從連線開始算，包含讀完回應）。其他情況會在 1 分鐘、5 分鐘、30 分鐘、2 小時、6 小時後重送，總共最多 6 次。同一個事件可能會收到不只一次，請用 `id` 去除重複。連續失敗超過 100 次，而且 3 天內都沒有成功過的事件通知會自動停用，用 `PATCH` 把 `active` 改回 `true` 可以重新啟用。"},{"name":"收款紀錄","description":"需要 `orders:read`。付款成功的斗內與小費訂單。"},{"name":"統計","description":"需要 `stats:read`。斗內排行榜與 Twitch 追隨、訂閱人數。"},{"name":"會員訂閱","description":"需要 `members:read`。會員方案與訂閱的觀眾。"},{"name":"創作者商店","description":"需要 `store:read`／`store:write`。商店訂單，不含收件資料。"},{"name":"募資","description":"需要 `crowdfunding:read`。募資專案與贊助紀錄，不含收件資料。"},{"name":"貼文","description":"需要 `posts:read`／`posts:write`。動態牆貼文與貼文圖片。"},{"name":"部落格","description":"需要 `posts:read`／`posts:write`。部落格文章的草稿、發布與排程。"},{"name":"即時操作","description":"需要 `live:read`／`live:write`。直播中的即時操作：通知暫停、媒體點播、排隊、點歌、計時器、計數器、Twitch 通知佇列、整合畫面、重新推播斗內通知。答題互動在「答題互動」。"},{"name":"答題互動","description":"需要 `live:read`／`live:write`。在 Twitch 聊天室出選擇題，觀眾輸入 A／B／C／D 作答，或用 Twitch 預測下注：開始一場、出題、截止、公布答案、切換 OBS 畫面，以及管理題庫與聊天室訊息。讀取題庫也要 `live:write`（題庫裡有答案）。"},{"name":"進度條","description":"需要 `progress:read`／`progress:write`。進度條與 OBS 自訂文字。"},{"name":"Twitch 機器人","description":"需要 `bot:read`／`bot:write`、`points:write`。Twitch 機器人的自訂指令與調整點數。"},{"name":"機器人點數","description":"需要 `points:read`。Twitch 機器人點數的查詢與排行榜。"},{"name":"創作者頁面","description":"需要 `profile:read`／`profile:write`。創作者頁面的週表與願望清單。"},{"name":"直播行事曆","description":"需要 `profile:read`／`profile:write`。直播行事曆的排程活動。"},{"name":"感謝牆","description":"需要 `profile:read`／`profile:write`。創作者頁面的感謝牆。"},{"name":"里程碑","description":"需要 `profile:read`／`profile:write`。創作者頁面的里程碑。"},{"name":"作品集","description":"需要 `profile:read`／`profile:write`。創作者頁面的作品集。"},{"name":"觀眾訊息","description":"需要 `inbox:read`／`inbox:write`。觀眾傳來的訊息，匿名的訊息不會知道是誰傳的。"}],"paths":{"/auth/verify":{"get":{"tags":["金鑰"],"summary":"確認金鑰","description":"回傳 API 金鑰或應用程式 token 所屬的帳號 UUID 與權限。","responses":{"200":{"description":"金鑰有效","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/KeyInfo"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/oauth/token":{"post":{"tags":["應用程式授權"],"summary":"換 token","description":"用授權碼或 refresh_token 換 access_token。一般應用程式用 Basic 驗證（`client_id:client_secret`）或在內容裡帶 `client_id`、`client_secret`；公開用戶端只帶 `client_id`。回應格式照 OAuth2 規格，不是 `success`／`data`。","security":[],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TokenRequest"},"example":{"grant_type":"authorization_code","code":"nkc_xxxxxxxx","redirect_uri":"https://example.com/callback","code_verifier":"dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk","client_id":"nkapp_xxxxxxxx","client_secret":"nks_xxxxxxxx"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"授權碼、refresh_token 或參數不對（invalid_grant、invalid_request、invalid_scope、unsupported_grant_type）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OauthError"}}}},"401":{"description":"client_id 或 client_secret 不對（invalid_client）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OauthError"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/oauth/revoke":{"post":{"tags":["應用程式授權"],"summary":"作廢 token","description":"作廢一組 access_token 或 refresh_token（同一組的另一個也會一起失效）。不管 token 存不存在都回 200。","security":[],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/RevokeRequest"},"example":{"token":"nkr_xxxxxxxx","client_id":"nkapp_xxxxxxxx","client_secret":"nks_xxxxxxxx"}}}},"responses":{"200":{"description":"已處理","content":{"application/json":{"schema":{"type":"object"},"example":{}}}},"401":{"description":"client_id 或 client_secret 不對","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OauthError"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/account":{"get":{"tags":["帳號"],"summary":"帳號基本資料","description":"不需要另外開權限，任何有效的金鑰或應用程式授權都可以讀。讀共同管理的創作者時，只要是對方的共同管理人就可以，不用另外開權限。\n\n暱稱、帳號、大頭貼、創作者頁面與斗內頁面網址、綁定的直播平台，以及現在有沒有在直播。直播狀態讀的是平台已經存下來的開台紀錄，不會即時向各平台查詢。不會回傳電子郵件這類私人資料。","security":[{"apiKey":[]},{"oauth2":[]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要讀共同管理的創作者時填對方的 UUID。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"uuid":{"type":"string","example":"9d653750-4f97-4605-e6a6-facd64d9b38f"},"account":{"type":"string","example":"alice","description":"平台帳號"},"name":{"type":"string","example":"愛麗絲","description":"暱稱"},"avatar":{"type":"string","example":"https://assets.nekolive.net/files/9d653750-4f97-4605-e6a6-facd64d9b38f/abc123def456/avatar.webp","description":"大頭貼網址，沒設定時是平台預設的大頭貼"},"urls":{"type":"object","properties":{"creator_page":{"type":"string","example":"https://user.nekolive.net/creator/alice","description":"創作者頁面"},"donate":{"type":"string","example":"https://nekolive.net/alice","description":"斗內頁面（有設定自訂網址時用自訂網址）"}}},"creator_page_public":{"type":"boolean","example":true,"description":"創作者頁面有沒有公開"},"platforms":{"type":"object","description":"綁定的直播平台，沒綁定是 null","properties":{"twitch":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"123456789","description":"Twitch 使用者 ID"},"login":{"type":"string","example":"alice","nullable":true,"description":"Twitch 帳號"},"url":{"type":"string","example":"https://www.twitch.tv/alice","nullable":true}}},"youtube":{"type":"object","nullable":true,"properties":{"channel_id":{"type":"string","example":"UCxxxxxxxxxxxxxxxxxxxxxx"},"url":{"type":"string","example":"https://www.youtube.com/channel/UCxxxxxxxxxxxxxxxxxxxxxx"}}},"kick":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"12345678","description":"Kick 使用者 ID"},"login":{"type":"string","example":"Alice_TW","nullable":true,"description":"Kick 使用者名稱"},"url":{"type":"string","example":"https://kick.com/alice-tw","nullable":true}}}}},"live":{"type":"object","properties":{"is_live":{"type":"boolean","example":true,"description":"任何一個綁定的平台正在直播就是 true"},"started_at":{"type":"string","example":"2026-11-07T12:00:00.000Z","nullable":true,"description":"最早開台的那一場的開台時間","format":"date-time"},"streams":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["twitch","youtube","kick"],"example":"twitch"},"title":{"type":"string","example":"開台囉","nullable":true,"description":"直播標題"},"game":{"type":"string","example":"Minecraft","nullable":true,"description":"分類（只有 Twitch 有）"},"started_at":{"type":"string","example":"2026-11-07T12:00:00.000Z","nullable":true,"description":"開台時間","format":"date-time"},"url":{"type":"string","example":"https://www.twitch.tv/alice","nullable":true,"description":"直播網址"}}},"description":"每個正在直播的平台各一筆，沒在直播是空陣列"}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/orders":{"get":{"tags":["收款紀錄"],"summary":"列出收款紀錄","description":"付款成功的斗內與小費訂單，新的在前面。可以用 since、until 只讀某段時間的訂單。","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time","example":"2026-11-01T00:00:00+08:00"},"description":"只列出這個時間（含）以後建立的訂單。只寫日期時當成台灣時間 00:00。"},{"name":"until","in":"query","schema":{"type":"string","format":"date-time","example":"2026-12-01T00:00:00+08:00"},"description":"只列出這個時間以前建立的訂單（不含）。只寫日期時當成台灣時間 00:00。"}],"responses":{"200":{"description":"訂單列表","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/orders/{platform_order_id}":{"get":{"tags":["收款紀錄"],"summary":"查詢一筆收款紀錄","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"platform_order_id","in":"path","required":true,"schema":{"type":"string","example":"NEKOLIVE-ABCDEFGH-ABCDEFGHI"},"description":"平台訂單編號"}],"responses":{"200":{"description":"訂單","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/posts":{"get":{"tags":["貼文"],"summary":"列出貼文","description":"需要 posts:read。包含所有公開範圍的貼文，新的在前面。","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"貼文列表","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"posts":{"type":"array","items":{"$ref":"#/components/schemas/Post"}},"pagination":{"type":"object","properties":{"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0},"total":{"type":"integer","example":42}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"tags":["貼文"],"summary":"發布貼文","description":"需要 posts:write。發布後跟在後台發文一樣會通知追隨者、觸發「發佈貼文」自動化規則。","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCreate"}}}},"responses":{"201":{"description":"已發布","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Post"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/posts/{post_id}":{"get":{"tags":["貼文"],"summary":"查詢一篇貼文","description":"需要 posts:read。","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","example":123},"description":"貼文編號"}],"responses":{"200":{"description":"貼文","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Post"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"tags":["貼文"],"summary":"刪除貼文","description":"需要 posts:write。留言、心情一起刪除，不能復原。部落格文章的貼文會連文章一起刪。","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","example":123},"description":"貼文編號"}],"responses":{"200":{"description":"已刪除","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"integer","example":123},"deleted":{"type":"boolean","example":true}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"tags":["貼文"],"summary":"編輯貼文","description":"需要 posts:write。只改有送的欄位，不會再通知追隨者。部落格文章請到後台編輯（回 409）。","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","example":123},"description":"貼文編號"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostUpdate"},"example":{"content":"改成 9 點開台","tags":["開台","延後"]}}}},"responses":{"200":{"description":"已更新","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Post"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"部落格文章不能用 API 編輯","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/images":{"post":{"tags":["貼文"],"summary":"上傳貼文圖片","description":"需要 posts:write。body 直接放圖片檔（JPEG、PNG、WebP，最大 5 MB、長寬最多 8000 像素），拿到的網址 24 小時內要放進貼文的 images。","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"requestBody":{"required":true,"content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"已上傳","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/ImageUpload"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/notify-pause":{"get":{"tags":["即時操作"],"summary":"通知暫停狀態","description":"需要 `live:read`。共同管理的創作者要開「小工具樣式」權限。","security":[{"apiKey":[]},{"oauth2":["live:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"paused":false,"obs":true,"twitch_bot":false,"youtube_bot":false,"kick_bot":false}}}},"example":{"success":true,"data":{"paused":false,"obs":true,"twitch_bot":false,"youtube_bot":false,"kick_bot":false}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"tags":["即時操作"],"summary":"暫停或恢復通知","description":"需要 `live:write`。共同管理的創作者要開「小工具樣式」權限。\n\n`paused` 是全部的總開關，其他是各別暫停 OBS 與各平台聊天室的通知。只改有送的欄位。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"paused":false,"obs":true,"twitch_bot":false,"youtube_bot":false,"kick_bot":false}}}},"example":{"success":true,"data":{"paused":false,"obs":true,"twitch_bot":false,"youtube_bot":false,"kick_bot":false}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"paused":{"type":"boolean","description":"暫停全部通知","example":true},"obs":{"type":"boolean","description":"暫停 OBS 通知"},"twitch_bot":{"type":"boolean","description":"暫停 Twitch 聊天室通知"},"youtube_bot":{"type":"boolean","description":"暫停 YouTube 聊天室通知"},"kick_bot":{"type":"boolean","description":"暫停 Kick 聊天室通知"}}},"example":{"paused":true}}}}}},"/{owner}/media-request":{"get":{"tags":["即時操作"],"summary":"媒體點播狀態","description":"需要 `live:read`。共同管理的創作者要開「控制媒體點播」權限。\n\n`configured` 是 false 代表還沒設定過媒體點播。","security":[{"apiKey":[]},{"oauth2":["live:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"configured":true,"paused":false}}}},"example":{"success":true,"data":{"configured":true,"paused":false}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"tags":["即時操作"],"summary":"暫停或恢復媒體點播","description":"需要 `live:write`。共同管理的創作者要開「控制媒體點播」權限。\n\n暫停時觀眾不能再點播，已經排進去的照常播放。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"configured":true,"paused":true}}}},"example":{"success":true,"data":{"configured":true,"paused":true}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"還沒有設定媒體點播","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"paused":{"type":"boolean","description":"暫停點播","example":true}},"required":["paused"]},"example":{"paused":true}}}}}},"/{owner}/queue":{"get":{"tags":["即時操作"],"summary":"排隊狀態與名單","description":"需要 `live:read`。共同管理的創作者要開「管理排隊功能」權限。\n\n名單最多回傳前 200 位，`count` 是總人數。","security":[{"apiKey":[]},{"oauth2":["live:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"enabled":true,"join_mode":"open","advance_count":1,"max_size":0,"chat_announce":true,"count":1,"entries":[{"id":12,"position":1,"name":"小明","twitch_login":"xiaoming","game_account":"Ming#1234","joined_at":"2026-11-04T12:00:00.000Z"}]}}}},"example":{"success":true,"data":{"enabled":true,"join_mode":"open","advance_count":1,"max_size":0,"chat_announce":true,"count":1,"entries":[{"id":12,"position":1,"name":"小明","twitch_login":"xiaoming","game_account":"Ming#1234","joined_at":"2026-11-04T12:00:00.000Z"}]}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"tags":["即時操作"],"summary":"修改排隊設定","description":"需要 `live:write`。共同管理的創作者要開「管理排隊功能」權限。\n\n只改有送的欄位。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"enabled":true,"join_mode":"open","advance_count":1,"max_size":0,"chat_announce":true}}}},"example":{"success":true,"data":{"enabled":true,"join_mode":"open","advance_count":1,"max_size":0,"chat_announce":true}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"開放排隊","example":false},"join_mode":{"type":"string","description":"open（所有人）、sub（訂閱者）、vip、redeem（忠誠點數兌換）","example":"open"},"advance_count":{"type":"integer","description":"叫下一位時一次叫幾位，1～20","example":1},"chat_announce":{"type":"boolean","description":"叫下一位時在 Twitch 聊天室公告","example":true}}},"example":{"enabled":false}}}}}},"/{owner}/queue/next":{"post":{"tags":["即時操作"],"summary":"叫下一位","description":"需要 `live:write`。共同管理的創作者要開「管理排隊功能」權限。\n\n依「一次叫幾位」移除排在最前面的觀眾。有開 `chat_announce` 的話會在 Twitch 聊天室公告現在輪到誰。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"removed":[{"id":12,"position":1,"name":"小明","twitch_login":"xiaoming","game_account":"Ming#1234","joined_at":"2026-11-04T12:00:00.000Z"}],"now":[],"count":0}}}},"example":{"success":true,"data":{"removed":[{"id":12,"position":1,"name":"小明","twitch_login":"xiaoming","game_account":"Ming#1234","joined_at":"2026-11-04T12:00:00.000Z"}],"now":[],"count":0}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"目前沒有人在排隊","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/queue/entries":{"delete":{"tags":["即時操作"],"summary":"清空排隊","description":"需要 `live:write`。共同管理的創作者要開「管理排隊功能」權限。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"deleted":8,"count":0}}}},"example":{"success":true,"data":{"deleted":8,"count":0}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/queue/entries/{id}":{"delete":{"tags":["即時操作"],"summary":"移除一位排隊的觀眾","description":"需要 `live:write`。共同管理的創作者要開「管理排隊功能」權限。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":12},"description":"排隊編號（GET /{owner}/queue 的 entries[].id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"id":12,"deleted":true,"count":3}}}},"example":{"success":true,"data":{"id":12,"deleted":true,"count":3}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/live-song":{"get":{"tags":["即時操作"],"summary":"點歌列表","description":"需要 `live:read`。共同管理的創作者要開「管理點歌功能」權限。\n\n`playing` 是正在唱的歌，`pending` 是待唱（最多 100 首），`holding` 是付款中保留的名額數。","security":[{"apiKey":[]},{"oauth2":["live:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0}}}},"example":{"success":true,"data":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"tags":["即時操作"],"summary":"開放或關閉點歌","description":"需要 `live:write`。共同管理的創作者要開「管理點歌功能」權限。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0}}}},"example":{"success":true,"data":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"開放點歌","example":true}},"required":["enabled"]},"example":{"enabled":true}}}}}},"/{owner}/live-song/next":{"post":{"tags":["即時操作"],"summary":"唱完，換下一首","description":"需要 `live:write`。共同管理的創作者要開「管理點歌功能」權限。\n\n現在這首記成唱完，待唱第一首換上來。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"已經換下一首"}}}},"example":{"success":true,"data":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"已經換下一首"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"現在不能這樣操作（例如列表是空的）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/live-song/skip":{"post":{"tags":["即時操作"],"summary":"略過，換下一首","description":"需要 `live:write`。共同管理的創作者要開「管理點歌功能」權限。\n\n現在這首記成略過，待唱第一首換上來。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"已經換下一首"}}}},"example":{"success":true,"data":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"已經換下一首"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"現在不能這樣操作（例如列表是空的）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/live-song/back":{"post":{"tags":["即時操作"],"summary":"放回待唱","description":"需要 `live:write`。共同管理的創作者要開「管理點歌功能」權限。\n\n把正在唱的放回待唱最前面。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"已經換下一首"}}}},"example":{"success":true,"data":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"已經換下一首"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"現在不能這樣操作（例如列表是空的）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/live-song/finish":{"post":{"tags":["即時操作"],"summary":"收掉現在這首","description":"需要 `live:write`。共同管理的創作者要開「管理點歌功能」權限。\n\n記成唱完，但不拉下一首上來。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"已經換下一首"}}}},"example":{"success":true,"data":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"已經換下一首"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"現在不能這樣操作（例如列表是空的）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/live-song/clear":{"post":{"tags":["即時操作"],"summary":"清空待唱","description":"需要 `live:write`。共同管理的創作者要開「管理點歌功能」權限。\n\n正在唱的、保留中的、唱過的都不動。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"已經換下一首"}}}},"example":{"success":true,"data":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"已經換下一首"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"現在不能這樣操作（例如列表是空的）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/live-song/queue/{id}/play":{"post":{"tags":["即時操作"],"summary":"直接唱指定的歌","description":"需要 `live:write`。共同管理的創作者要開「管理點歌功能」權限。\n\n原本在唱的記成唱完。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":12},"description":"點歌編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"開始唱《小幸運》"}}}},"example":{"success":true,"data":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"開始唱《小幸運》"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"這首不在待唱列表裡","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/live-song/queue/{id}":{"delete":{"tags":["即時操作"],"summary":"從待唱移除","description":"需要 `live:write`。共同管理的創作者要開「管理點歌功能」權限。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":12},"description":"點歌編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"已經移除"}}}},"example":{"success":true,"data":{"enabled":true,"playing":{"id":31,"title":"小幸運","artist":"田馥甄","status":"playing","position":0,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"},"pending":[{"id":31,"title":"小幸運","artist":"田馥甄","status":"pending","position":1,"name":"小明","login":"xiaoming","source":"donate","amount":100,"want_count":1,"created_at":"2026-11-04T12:00:00.000Z"}],"holding":0,"message":"已經移除"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"這首不在待唱列表裡","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/timers":{"get":{"tags":["即時操作"],"summary":"計時器列表","description":"需要 `live:read`。共同管理的創作者要開「控制計時器」權限。\n\n`seconds` 是 `seconds_at` 那個時間點的剩餘秒數；`obs_online` 是 OBS 裡有沒有開著這個計時器。","security":[{"apiKey":[]},{"oauth2":["live:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"timers":[{"id":"0a1b2c3d-1111-4222-8333-444455556666","name":"主計時器","code":"main","is_default":true,"obs_online":true,"state":"running","seconds":3600,"seconds_at":"2026-11-04T12:00:00Z"}]}}}},"example":{"success":true,"data":{"timers":[{"id":"0a1b2c3d-1111-4222-8333-444455556666","name":"主計時器","code":"main","is_default":true,"obs_online":true,"state":"running","seconds":3600,"seconds_at":"2026-11-04T12:00:00Z"}]}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/timers/{timer}/pause":{"post":{"tags":["即時操作"],"summary":"暫停計時器","description":"需要 `live:write`。共同管理的創作者要開「控制計時器」權限。\n\n送到 OBS 裡的計時器。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"timer","in":"path","required":true,"schema":{"type":"string","example":"0a1b2c3d-1111-4222-8333-444455556666"},"description":"計時器編號（GET /{owner}/timers 的 id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"timer":{"id":"0a1b2c3d-1111-4222-8333-444455556666","name":"主計時器","code":"main","is_default":true,"obs_online":true,"state":"running","seconds":3600,"seconds_at":"2026-11-04T12:00:00Z"},"op":"pause","message":"已暫停"}}}},"example":{"success":true,"data":{"timer":{"id":"0a1b2c3d-1111-4222-8333-444455556666","name":"主計時器","code":"main","is_default":true,"obs_online":true,"state":"running","seconds":3600,"seconds_at":"2026-11-04T12:00:00Z"},"op":"pause","message":"已暫停"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/timers/{timer}/resume":{"post":{"tags":["即時操作"],"summary":"繼續計時","description":"需要 `live:write`。共同管理的創作者要開「控制計時器」權限。\n\n送到 OBS 裡的計時器。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"timer","in":"path","required":true,"schema":{"type":"string","example":"0a1b2c3d-1111-4222-8333-444455556666"},"description":"計時器編號（GET /{owner}/timers 的 id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"timer":{"id":"0a1b2c3d-1111-4222-8333-444455556666","name":"主計時器","code":"main","is_default":true,"obs_online":true,"state":"running","seconds":3600,"seconds_at":"2026-11-04T12:00:00Z"},"op":"resume","message":"已繼續計時"}}}},"example":{"success":true,"data":{"timer":{"id":"0a1b2c3d-1111-4222-8333-444455556666","name":"主計時器","code":"main","is_default":true,"obs_online":true,"state":"running","seconds":3600,"seconds_at":"2026-11-04T12:00:00Z"},"op":"resume","message":"已繼續計時"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/timers/{timer}/adjust":{"post":{"tags":["即時操作"],"summary":"加減時間","description":"需要 `live:write`。共同管理的創作者要開「控制計時器」權限。\n\n正數是增加、負數是減少，要有開著的 OBS 計時器才會調整。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"timer","in":"path","required":true,"schema":{"type":"string","example":"0a1b2c3d-1111-4222-8333-444455556666"},"description":"計時器編號（GET /{owner}/timers 的 id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"timer":{"id":"0a1b2c3d-1111-4222-8333-444455556666","name":"主計時器","code":"main","is_default":true,"obs_online":true,"state":"running","seconds":3600,"seconds_at":"2026-11-04T12:00:00Z"},"seconds":600,"message":"已增加 00:10:00"}}}},"example":{"success":true,"data":{"timer":{"id":"0a1b2c3d-1111-4222-8333-444455556666","name":"主計時器","code":"main","is_default":true,"obs_online":true,"state":"running","seconds":3600,"seconds_at":"2026-11-04T12:00:00Z"},"seconds":600,"message":"已增加 00:10:00"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"OBS 裡沒有開著這個計時器","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"seconds":{"type":"integer","description":"要加減的秒數，不能是 0","example":600},"reason":{"type":"string","description":"原因，會記在計時器紀錄，最多 60 字","example":"抽中加時"}},"required":["seconds"]},"example":{"seconds":600,"reason":"抽中加時"}}}}}},"/{owner}/schedule":{"get":{"tags":["創作者頁面"],"summary":"週表","description":"需要 `profile:read`。共同管理的創作者要開「基本資訊」權限。\n\n一次回傳一週（週一到週日，台北時間）。`locations` 是這個帳號可以用的直播位置。","security":[{"apiKey":[]},{"oauth2":["profile:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"week","in":"query","required":false,"schema":{"type":"string","example":"2026-11-04"},"description":"這一週裡的任何一天（YYYY-MM-DD），不填是本週"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"week_start":"2026-11-02","week_end":"2026-11-08","timezone":"Asia/Taipei","locations":["twitch","other"],"items":[{"id":5,"date":"2026-11-06","start":"20:00","end":"23:00","no_time":false,"location":"twitch","location_text":"","title":"雜談開台","content":"","note":"","sync_calendar":true,"synced_to_calendar":true}]}}}},"example":{"success":true,"data":{"week_start":"2026-11-02","week_end":"2026-11-08","timezone":"Asia/Taipei","locations":["twitch","other"],"items":[{"id":5,"date":"2026-11-06","start":"20:00","end":"23:00","no_time":false,"location":"twitch","location_text":"","title":"雜談開台","content":"","note":"","sync_calendar":true,"synced_to_calendar":true}]}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"tags":["創作者頁面"],"summary":"新增週表","description":"需要 `profile:write`。共同管理的創作者要開「基本資訊」權限。\n\n一週最多 30 筆。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"201":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"id":5,"date":"2026-11-06","start":"20:00","end":"23:00","no_time":false,"location":"twitch","location_text":"","title":"雜談開台","content":"","note":"","sync_calendar":true,"synced_to_calendar":true}}}},"example":{"success":true,"data":{"id":5,"date":"2026-11-06","start":"20:00","end":"23:00","no_time":false,"location":"twitch","location_text":"","title":"雜談開台","content":"","note":"","sync_calendar":true,"synced_to_calendar":true}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"一週太多筆了","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"date":{"type":"string","description":"日期 YYYY-MM-DD（台北時間）","example":"2026-11-06"},"start":{"type":"string","description":"開始時間 HH:MM，留空是「突發」不定時","example":"20:00"},"end":{"type":"string","description":"結束時間 HH:MM，比開始早代表到隔天","example":"23:00"},"location":{"type":"string","description":"直播位置：綁定的平台（twitch、youtube、kick）或 other","example":"twitch"},"location_text":{"type":"string","description":"location 是 other 時必填","example":""},"title":{"type":"string","description":"標題，最多 60 字","example":"雜談開台"},"content":{"type":"string","description":"內容，最多 500 字","example":""},"note":{"type":"string","description":"備註，最多 200 字","example":""},"sync_calendar":{"type":"boolean","description":"同步到直播行事曆（共同管理人另外要有「直播行事曆」權限）","example":true}},"required":["date","location","title"]},"example":{"date":"2026-11-06","start":"20:00","end":"23:00","location":"twitch","title":"雜談開台","sync_calendar":true}}}}}},"/{owner}/schedule/{id}":{"patch":{"tags":["創作者頁面"],"summary":"修改週表","description":"需要 `profile:write`。共同管理的創作者要開「基本資訊」權限。\n\n只改有送的欄位。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":12},"description":"週表編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"id":5,"date":"2026-11-06","start":"20:00","end":"23:00","no_time":false,"location":"twitch","location_text":"","title":"雜談開台","content":"","note":"","sync_calendar":true,"synced_to_calendar":true}}}},"example":{"success":true,"data":{"id":5,"date":"2026-11-06","start":"20:00","end":"23:00","no_time":false,"location":"twitch","location_text":"","title":"雜談開台","content":"","note":"","sync_calendar":true,"synced_to_calendar":true}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"date":{"type":"string","description":"日期 YYYY-MM-DD（台北時間）","example":"2026-11-06"},"start":{"type":"string","description":"開始時間 HH:MM，留空是「突發」不定時","example":"20:00"},"end":{"type":"string","description":"結束時間 HH:MM，比開始早代表到隔天","example":"23:00"},"location":{"type":"string","description":"直播位置：綁定的平台（twitch、youtube、kick）或 other","example":"twitch"},"location_text":{"type":"string","description":"location 是 other 時必填","example":""},"title":{"type":"string","description":"標題，最多 60 字","example":"雜談開台"},"content":{"type":"string","description":"內容，最多 500 字","example":""},"note":{"type":"string","description":"備註，最多 200 字","example":""},"sync_calendar":{"type":"boolean","description":"同步到直播行事曆（共同管理人另外要有「直播行事曆」權限）","example":true}}},"example":{"title":"改成遊戲台"}}}}},"delete":{"tags":["創作者頁面"],"summary":"刪除週表","description":"需要 `profile:write`。共同管理的創作者要開「基本資訊」權限。\n\n有同步到直播行事曆的活動會一起刪掉。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":12},"description":"週表編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"id":5,"deleted":true}}}},"example":{"success":true,"data":{"id":5,"deleted":true}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/wishlist":{"get":{"tags":["創作者頁面"],"summary":"願望清單","description":"需要 `profile:read`。共同管理的創作者要開「管理願望清單」權限。","security":[{"apiKey":[]},{"oauth2":["profile:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"max":30,"items":[{"id":3,"title":"新的麥克風","kind":"physical","description":"","url":"","image":"","goal":6000,"raised":3900,"remaining":2100,"percent":65,"backer_count":12,"deadline":"2026-12-31 23:59","state":"active","closed":false,"reached_at":"","hidden":false,"report":{"status":"none","text":"","url":""}}]}}}},"example":{"success":true,"data":{"max":30,"items":[{"id":3,"title":"新的麥克風","kind":"physical","description":"","url":"","image":"","goal":6000,"raised":3900,"remaining":2100,"percent":65,"backer_count":12,"deadline":"2026-12-31 23:59","state":"active","closed":false,"reached_at":"","hidden":false,"report":{"status":"none","text":"","url":""}}]}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"tags":["創作者頁面"],"summary":"新增願望","description":"需要 `profile:write`。共同管理的創作者要開「管理願望清單」權限。\n\n最多 30 個。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"201":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"id":3,"title":"新的麥克風","kind":"physical","description":"","url":"","image":"","goal":6000,"raised":3900,"remaining":2100,"percent":65,"backer_count":12,"deadline":"2026-12-31 23:59","state":"active","closed":false,"reached_at":"","hidden":false,"report":{"status":"none","text":"","url":""}}}}},"example":{"success":true,"data":{"id":3,"title":"新的麥克風","kind":"physical","description":"","url":"","image":"","goal":6000,"raised":3900,"remaining":2100,"percent":65,"backer_count":12,"deadline":"2026-12-31 23:59","state":"active","closed":false,"reached_at":"","hidden":false,"report":{"status":"none","text":"","url":""}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"願望已經滿了","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","description":"名稱，最多 60 字","example":"新的麥克風"},"kind":{"type":"string","description":"physical（實體商品）或 digital（虛擬商品）","example":"physical"},"description":{"type":"string","description":"說明，最多 500 字","example":""},"goal":{"type":"integer","description":"目標金額","example":6000},"url":{"type":"string","description":"商品連結（https）","example":""},"image":{"type":"string","description":"圖片，只能用自己檔案空間的網址","example":""},"deadline":{"type":"string","description":"期限 YYYY-MM-DD 或 YYYY-MM-DD HH:MM，留空是沒有期限","example":"2026-12-31"},"hidden":{"type":"boolean","description":"不顯示在創作者頁面","example":false}},"required":["title","goal"]},"example":{"title":"新的麥克風","goal":6000}}}}}},"/{owner}/wishlist/{id}":{"patch":{"tags":["創作者頁面"],"summary":"修改願望","description":"需要 `profile:write`。共同管理的創作者要開「管理願望清單」權限。\n\n只改有送的欄位。改了目標金額會重新判斷有沒有達成。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":12},"description":"願望編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"id":3,"title":"新的麥克風","kind":"physical","description":"","url":"","image":"","goal":6000,"raised":3900,"remaining":2100,"percent":65,"backer_count":12,"deadline":"2026-12-31 23:59","state":"active","closed":false,"reached_at":"","hidden":false,"report":{"status":"none","text":"","url":""}}}}},"example":{"success":true,"data":{"id":3,"title":"新的麥克風","kind":"physical","description":"","url":"","image":"","goal":6000,"raised":3900,"remaining":2100,"percent":65,"backer_count":12,"deadline":"2026-12-31 23:59","state":"active","closed":false,"reached_at":"","hidden":false,"report":{"status":"none","text":"","url":""}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","description":"名稱，最多 60 字","example":"新的麥克風"},"kind":{"type":"string","description":"physical（實體商品）或 digital（虛擬商品）","example":"physical"},"description":{"type":"string","description":"說明，最多 500 字","example":""},"goal":{"type":"integer","description":"目標金額","example":6000},"url":{"type":"string","description":"商品連結（https）","example":""},"image":{"type":"string","description":"圖片，只能用自己檔案空間的網址","example":""},"deadline":{"type":"string","description":"期限 YYYY-MM-DD 或 YYYY-MM-DD HH:MM，留空是沒有期限","example":"2026-12-31"},"hidden":{"type":"boolean","description":"不顯示在創作者頁面","example":false},"closed":{"type":"boolean","description":"提前結束（true）或重新開放（false）","example":true}}},"example":{"goal":8000}}}}},"delete":{"tags":["創作者頁面"],"summary":"刪除願望","description":"需要 `profile:write`。共同管理的創作者要開「管理願望清單」權限。\n\n已經有人支持的願望不能用 API 刪除，請改成結束（`closed: true`）或到後台處理。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":12},"description":"願望編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"id":3,"deleted":true}}}},"example":{"success":true,"data":{"id":3,"deleted":true}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"已經有人支持","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/progress-bars":{"get":{"tags":["進度條"],"summary":"進度條列表","description":"需要 `progress:read`。共同管理的創作者要開「小工具樣式」權限。\n\n`current` 是目前的進度，`auto_reset` 是自動重新計算的週期（沒有是 null）。","security":[{"apiKey":[]},{"oauth2":["progress:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"items":[{"key":"money_6a70c0cc16010","version":"v3","metric":"donate","is_points":false,"title":"新麥克風基金","goal":10000,"current":3200,"percent":32,"add_goal":0,"start_time":"2026/11/01 00:00","end_time":"","auto_reset":null,"milestones":false,"sync":null}]}}}},"example":{"success":true,"data":{"items":[{"key":"money_6a70c0cc16010","version":"v3","metric":"donate","is_points":false,"title":"新麥克風基金","goal":10000,"current":3200,"percent":32,"add_goal":0,"start_time":"2026/11/01 00:00","end_time":"","auto_reset":null,"milestones":false,"sync":null}]}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/progress-bars/{key}":{"get":{"tags":["進度條"],"summary":"一條進度條","description":"需要 `progress:read`。共同管理的創作者要開「小工具樣式」權限。\n\n`sync` 是這條進度條跟著別的東西同步的狀態，沒有是 null：`type` 是 crowdfund（同步募資專案，`crowdfund_id` 是專案編號）或 twitch_goal（同步 Twitch 的創作者目標），`active` 是現在有沒有在同步。","security":[{"apiKey":[]},{"oauth2":["progress:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"key","in":"path","required":true,"schema":{"type":"string","example":"money_6a70c0cc16010"},"description":"進度條代碼（GET /{owner}/progress-bars 的 key）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"key":"money_6a70c0cc16010","version":"v3","metric":"donate","is_points":false,"title":"新麥克風基金","goal":10000,"current":3200,"percent":32,"add_goal":0,"start_time":"2026/11/01 00:00","end_time":"","auto_reset":null,"milestones":false,"sync":null}}}},"example":{"success":true,"data":{"key":"money_6a70c0cc16010","version":"v3","metric":"donate","is_points":false,"title":"新麥克風基金","goal":10000,"current":3200,"percent":32,"add_goal":0,"start_time":"2026/11/01 00:00","end_time":"","auto_reset":null,"milestones":false,"sync":null}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"tags":["進度條"],"summary":"修改進度條","description":"需要 `progress:write`。共同管理的創作者要開「小工具樣式」權限。\n\n只能改標題、目標、手動加的數量與計算期間，其他設定請到後台。舊版的進度條要先在後台存一次。有設定 `auto_reset` 時期間以自動計算為準。\n\n同步募資專案的進度條不能改目標、手動加的數量與計算期間，同步 Twitch 創作者目標的不能改手動加的數量，都回 409（改了也不會生效）。","security":[{"apiKey":[]},{"oauth2":["progress:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"key","in":"path","required":true,"schema":{"type":"string","example":"money_6a70c0cc16010"},"description":"進度條代碼（GET /{owner}/progress-bars 的 key）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"key":"money_6a70c0cc16010","version":"v3","metric":"donate","is_points":false,"title":"新麥克風基金","goal":10000,"current":3200,"percent":32,"add_goal":0,"start_time":"2026/11/01 00:00","end_time":"","auto_reset":null,"milestones":false,"sync":null}}}},"example":{"success":true,"data":{"key":"money_6a70c0cc16010","version":"v3","metric":"donate","is_points":false,"title":"新麥克風基金","goal":10000,"current":3200,"percent":32,"add_goal":0,"start_time":"2026/11/01 00:00","end_time":"","auto_reset":null,"milestones":false,"sync":null}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"舊版進度條、有階段目標時改目標，或斗內進度條手動加數量","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","description":"標題，最多 100 字，不能有 < 或 >","example":"新麥克風基金"},"goal":{"type":"integer","description":"目標（有階段目標時不能改）","example":12000},"add_goal":{"type":"integer","description":"手動加的數量（斗內進度條不能用）","example":0},"start_time":{"type":"string","description":"開始時間 YYYY-MM-DD HH:MM，空字串是不限","example":"2026-11-01 00:00"},"end_time":{"type":"string","description":"結束時間 YYYY-MM-DD HH:MM，空字串是不限","example":""}}},"example":{"goal":12000}}}}}},"/{owner}/obs-text":{"get":{"tags":["進度條"],"summary":"OBS 自訂文字","description":"需要 `progress:read`。共同管理的創作者要開「小工具樣式」權限。\n\n`html` 是小工具實際顯示的內容（後台可以寫 HTML），`text` 是轉成純文字的版本。","security":[{"apiKey":[]},{"oauth2":["progress:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"text":"今晚 8 點開台","html":"今晚 8 點開台"}}}},"example":{"success":true,"data":{"text":"今晚 8 點開台","html":"今晚 8 點開台"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"put":{"tags":["進度條"],"summary":"修改 OBS 自訂文字","description":"需要 `progress:write`。共同管理的創作者要開「小工具樣式」權限。\n\n送純文字，換行會變成換行，HTML 不會生效。最多 2000 字。","security":[{"apiKey":[]},{"oauth2":["progress:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"text":"今晚 8 點開台","html":"今晚 8 點開台"}}}},"example":{"success":true,"data":{"text":"今晚 8 點開台","html":"今晚 8 點開台"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"text":{"type":"string","description":"要顯示的文字","example":"今晚 8 點開台"}},"required":["text"]},"example":{"text":"今晚 8 點開台"}}}}}},"/{owner}/bot/commands":{"get":{"tags":["Twitch 機器人"],"summary":"自訂指令列表","description":"需要 `bot:read`。共同管理的創作者要開「Twitch 機器人設定」權限。\n\n`bound_feature` 是 true 的指令綁定了平台功能（簽到、排隊、點播…），只能讀。帳號要綁定 Twitch。","security":[{"apiKey":[]},{"oauth2":["bot:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"items":[{"id":"6650a1b2c3d4e5f6a7b8c9d0","cmd":"!discord","aliases":["!dc"],"response":"歡迎加入 Discord：https://discord.gg/xxxx","enable":true,"permission":"everyone","cooldown":5,"user_cooldown":0,"only_online":false,"group":"社群","public_query":true,"counts":42,"bound_feature":false,"counter_id":null,"progress_key":null,"categories":[],"stream_use_limit":0,"viewer_stream_use_limit":0,"block_notify":false,"block_message":""}]}}}},"example":{"success":true,"data":{"items":[{"id":"6650a1b2c3d4e5f6a7b8c9d0","cmd":"!discord","aliases":["!dc"],"response":"歡迎加入 Discord：https://discord.gg/xxxx","enable":true,"permission":"everyone","cooldown":5,"user_cooldown":0,"only_online":false,"group":"社群","public_query":true,"counts":42,"bound_feature":false,"counter_id":null,"progress_key":null,"categories":[],"stream_use_limit":0,"viewer_stream_use_limit":0,"block_notify":false,"block_message":""}]}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"帳號還沒綁定 Twitch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"tags":["Twitch 機器人"],"summary":"新增自訂指令","description":"需要 `bot:write`。共同管理的創作者要開「Twitch 機器人設定」權限。\n\n回應不能使用 `eval()`，需要的話請到後台設定。\n\n`categories` 會向 Twitch 確認分類名稱，找不到時回 400，Twitch 暫時查不到時回 503。","security":[{"apiKey":[]},{"oauth2":["bot:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"201":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"id":"6650a1b2c3d4e5f6a7b8c9d0","cmd":"!discord","aliases":["!dc"],"response":"歡迎加入 Discord：https://discord.gg/xxxx","enable":true,"permission":"everyone","cooldown":5,"user_cooldown":0,"only_online":false,"group":"社群","public_query":true,"counts":42,"bound_feature":false}}}},"example":{"success":true,"data":{"id":"6650a1b2c3d4e5f6a7b8c9d0","cmd":"!discord","aliases":["!dc"],"response":"歡迎加入 Discord：https://discord.gg/xxxx","enable":true,"permission":"everyone","cooldown":5,"user_cooldown":0,"only_online":false,"group":"社群","public_query":true,"counts":42,"bound_feature":false}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"觸發指令重複，或帳號還沒綁定 Twitch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"cmd":{"type":"string","description":"觸發指令，最多 30 字，不能有空格","example":"!discord"},"response":{"type":"string","description":"回應，最多 500 字，不能用 eval()","example":"歡迎加入 Discord"},"enable":{"type":"boolean","description":"啟用","example":true},"permission":{"type":"string","description":"everyone、subscriber、vip、moderator、broadcaster","example":"everyone"},"cooldown":{"type":"integer","description":"冷卻秒數","example":5},"user_cooldown":{"type":"integer","description":"每位觀眾的冷卻秒數","example":0},"only_online":{"type":"boolean","description":"只在直播中回應","example":false},"aliases":{"type":"array","description":"別名，最多 10 個","example":["!dc"],"items":{"type":"string"}},"group":{"type":"string","description":"指令分類，最多 20 字","example":"社群"},"public_query":{"type":"boolean","description":"在創作者頁面公開","example":true},"counter_id":{"type":"integer","nullable":true,"example":3,"description":"指令選的計數器（GET /{owner}/counters 的 counters[].id），回應裡可以用 {counter_value} 這類參數，也可以用 COUNTER_ADD 這類回應操作它；null 是不選"},"progress_key":{"type":"string","nullable":true,"example":"money_6a70c0cc16010","description":"指令選的進度條（GET /{owner}/progress-bars 的 key），回應裡可以用 {progress_current} 這類參數；null 是不選"},"categories":{"type":"array","maxItems":5,"items":{"type":"string","maxLength":100},"example":["Just Chatting"],"description":"只在這些 Twitch 直播分類回應，要寫分類的完整名稱（大小寫不拘），空陣列是不限"},"stream_use_limit":{"type":"integer","minimum":0,"maximum":100000,"example":0,"description":"每一場直播全部觀眾合計最多用幾次，0 是不限"},"viewer_stream_use_limit":{"type":"integer","minimum":0,"maximum":100000,"example":1,"description":"每一場直播每位觀眾最多用幾次，0 是不限"},"block_notify":{"type":"boolean","example":false,"description":"因為次數、分類這些限制不能用時，機器人要回應"},"block_message":{"type":"string","maxLength":500,"example":"","description":"不能用時的回應，留空是預設訊息，不能用 eval()"}},"required":["cmd","response"]},"example":{"cmd":"!discord","response":"歡迎加入 Discord：https://discord.gg/xxxx"}}}}}},"/{owner}/bot/commands/{id}":{"patch":{"tags":["Twitch 機器人"],"summary":"修改自訂指令","description":"需要 `bot:write`。共同管理的創作者要開「Twitch 機器人設定」權限。\n\n只改有送的欄位。\n\n`categories` 會向 Twitch 確認分類名稱，找不到時回 400，Twitch 暫時查不到時回 503。","security":[{"apiKey":[]},{"oauth2":["bot:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"6650a1b2c3d4e5f6a7b8c9d0"},"description":"指令編號（GET /{owner}/bot/commands 的 id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"id":"6650a1b2c3d4e5f6a7b8c9d0","cmd":"!discord","aliases":["!dc"],"response":"歡迎加入 Discord：https://discord.gg/xxxx","enable":true,"permission":"everyone","cooldown":5,"user_cooldown":0,"only_online":false,"group":"社群","public_query":true,"counts":42,"bound_feature":false}}}},"example":{"success":true,"data":{"id":"6650a1b2c3d4e5f6a7b8c9d0","cmd":"!discord","aliases":["!dc"],"response":"歡迎加入 Discord：https://discord.gg/xxxx","enable":true,"permission":"everyone","cooldown":5,"user_cooldown":0,"only_online":false,"group":"社群","public_query":true,"counts":42,"bound_feature":false}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"指令綁定了平台功能，或觸發指令重複","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"cmd":{"type":"string","description":"觸發指令，最多 30 字，不能有空格","example":"!discord"},"response":{"type":"string","description":"回應，最多 500 字，不能用 eval()","example":"歡迎加入 Discord"},"enable":{"type":"boolean","description":"啟用","example":true},"permission":{"type":"string","description":"everyone、subscriber、vip、moderator、broadcaster","example":"everyone"},"cooldown":{"type":"integer","description":"冷卻秒數","example":5},"user_cooldown":{"type":"integer","description":"每位觀眾的冷卻秒數","example":0},"only_online":{"type":"boolean","description":"只在直播中回應","example":false},"aliases":{"type":"array","description":"別名，最多 10 個","example":["!dc"],"items":{"type":"string"}},"group":{"type":"string","description":"指令分類，最多 20 字","example":"社群"},"public_query":{"type":"boolean","description":"在創作者頁面公開","example":true},"counter_id":{"type":"integer","nullable":true,"example":3,"description":"指令選的計數器（GET /{owner}/counters 的 counters[].id），回應裡可以用 {counter_value} 這類參數，也可以用 COUNTER_ADD 這類回應操作它；null 是不選"},"progress_key":{"type":"string","nullable":true,"example":"money_6a70c0cc16010","description":"指令選的進度條（GET /{owner}/progress-bars 的 key），回應裡可以用 {progress_current} 這類參數；null 是不選"},"categories":{"type":"array","maxItems":5,"items":{"type":"string","maxLength":100},"example":["Just Chatting"],"description":"只在這些 Twitch 直播分類回應，要寫分類的完整名稱（大小寫不拘），空陣列是不限"},"stream_use_limit":{"type":"integer","minimum":0,"maximum":100000,"example":0,"description":"每一場直播全部觀眾合計最多用幾次，0 是不限"},"viewer_stream_use_limit":{"type":"integer","minimum":0,"maximum":100000,"example":1,"description":"每一場直播每位觀眾最多用幾次，0 是不限"},"block_notify":{"type":"boolean","example":false,"description":"因為次數、分類這些限制不能用時，機器人要回應"},"block_message":{"type":"string","maxLength":500,"example":"","description":"不能用時的回應，留空是預設訊息，不能用 eval()"}}},"example":{"enable":false}}}}},"delete":{"tags":["Twitch 機器人"],"summary":"刪除自訂指令","description":"需要 `bot:write`。共同管理的創作者要開「Twitch 機器人設定」權限。","security":[{"apiKey":[]},{"oauth2":["bot:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"6650a1b2c3d4e5f6a7b8c9d0"},"description":"指令編號（GET /{owner}/bot/commands 的 id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"id":"6650a1b2c3d4e5f6a7b8c9d0","deleted":true}}}},"example":{"success":true,"data":{"id":"6650a1b2c3d4e5f6a7b8c9d0","deleted":true}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"指令綁定了平台功能","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/bot/points":{"post":{"tags":["Twitch 機器人"],"summary":"加減機器人點數","description":"需要 `points:write`。共同管理的創作者要開「Twitch 機器人設定」權限。\n\n正數是增加、負數是扣除，一次最多 1,000,000 點，會記在點數紀錄。","security":[{"apiKey":[]},{"oauth2":["points:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","example":{"login":"xiaoming","name":"小明","points":100,"balance":1600,"stars":0}}}},"example":{"success":true,"data":{"login":"xiaoming","name":"小明","points":100,"balance":1600,"stars":0}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"帳號還沒綁定 Twitch，或點數沒有開","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"login":{"type":"string","description":"觀眾的 Twitch 帳號","example":"xiaoming"},"points":{"type":"integer","description":"要加減的點數，不能是 0","example":100},"note":{"type":"string","description":"備註，最多 100 字","example":"答題獎勵"}},"required":["login","points"]},"example":{"login":"xiaoming","points":100,"note":"答題獎勵"}}}}},"get":{"tags":["機器人點數"],"summary":"查詢觀眾的點數","description":"需要 `points:read`。共同管理的創作者要開「Twitch 機器人設定」權限。\n\n用 Twitch 帳號查詢一位觀眾在這個頻道的機器人點數。帳號要綁定 Twitch 並開啟機器人點數。","security":[{"apiKey":[]},{"oauth2":["points:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"login","in":"query","required":true,"schema":{"type":"string","example":"fan_one"},"description":"觀眾的 Twitch 帳號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"login":{"type":"string","example":"fan_one","description":"Twitch 帳號"},"name":{"type":"string","example":"粉絲一","description":"Twitch 顯示名稱"},"point_name":{"type":"string","example":"貓幣","description":"創作者設定的點數名稱"},"points":{"type":"integer","example":500,"description":"目前的點數"},"stars":{"type":"integer","example":0,"description":"星星數，點數超過上限時換成星星，排名先比星星再比點數"},"total_earned":{"type":"integer","example":800,"description":"總共拿到過的點數"},"rank":{"type":"integer","example":2,"description":"在排行榜上的名次；沒有點數或不列入排行榜的帳號是 null","nullable":true},"updated_at":{"type":"string","example":"2026-11-04T20:32:49.000Z","description":"最後一次點數變動的時間","nullable":true,"format":"date-time"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"沒有綁定 Twitch，或沒有開啟機器人點數","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/webhooks":{"get":{"tags":["事件通知"],"summary":"列出事件通知","description":"需要 `webhooks:write`。只會列出這把金鑰（或這個應用程式的授權）自己建立的事件通知。","security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"事件通知只能設定在金鑰或授權所屬的帳號本人，填 `me`。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}},"example":{"success":true,"data":{"items":[{"id":3,"url":"https://example.com/nekolive/webhook","events":["platform.donate","twitch.follow"],"description":"開台小幫手","secret_hint":"…a1B2","active":true,"disabled_reason":null,"fail_streak":0,"last_success_at":"2026-11-05T04:00:00.000Z","last_failure_at":null,"created_at":"2026-11-05T03:00:00.000Z"}]}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"tags":["事件通知"],"summary":"登記事件通知","description":"需要 `webhooks:write`，加上每個事件各自需要的權限。回傳的 `secret` 是簽章密鑰，只會出現這一次。每把金鑰或每個應用程式最多 5 個，每個帳號最多 20 個。登記後一分鐘內開始送出。","security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"事件通知只能設定在金鑰或授權所屬的帳號本人，填 `me`。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"已建立","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","allOf":[{"$ref":"#/components/schemas/Webhook"}],"properties":{"secret":{"type":"string","example":"nkwhs_Xx9…"}}}}},"example":{"success":true,"data":{"id":3,"url":"https://example.com/nekolive/webhook","events":["platform.donate","twitch.follow"],"description":"開台小幫手","secret_hint":"…a1B2","active":true,"disabled_reason":null,"fail_streak":0,"last_success_at":null,"last_failure_at":null,"created_at":"2026-11-05T03:00:00.000Z","secret":"nkwhs_9mQ0cZ3cR2xvX0yq1bH7nV4mUeYbQyLqk1PpA2a1B2"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"已經到上限","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"事件通知還在準備中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/{owner}/webhooks/{id}":{"patch":{"tags":["事件通知"],"summary":"修改事件通知","description":"需要 `webhooks:write`。只送要改的欄位。","security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"事件通知只能設定在金鑰或授權所屬的帳號本人，填 `me`。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":3},"description":"事件通知的編號"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Webhook"}}},"example":{"success":true,"data":{"id":3,"url":"https://example.com/nekolive/webhook","events":["platform.donate"],"description":"開台小幫手","secret_hint":"…a1B2","active":true,"disabled_reason":null,"fail_streak":0,"last_success_at":null,"last_failure_at":null,"created_at":"2026-11-05T03:00:00.000Z"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"tags":["事件通知"],"summary":"刪除事件通知","description":"需要 `webhooks:write`。送出紀錄會一起刪掉。","security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"事件通知只能設定在金鑰或授權所屬的帳號本人，填 `me`。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":3},"description":"事件通知的編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"deleted":{"type":"boolean","example":true}}}}},"example":{"success":true,"data":{"deleted":true}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/webhooks/{id}/rotate-secret":{"post":{"tags":["事件通知"],"summary":"重新產生簽章密鑰","description":"需要 `webhooks:write`。舊的密鑰馬上失效，之後送出的事件都用新的密鑰簽章。","security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"事件通知只能設定在金鑰或授權所屬的帳號本人，填 `me`。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":3},"description":"事件通知的編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"integer","example":3},"secret":{"type":"string","example":"nkwhs_Xx9…"}}}}},"example":{"success":true,"data":{"id":3,"secret":"nkwhs_b7Rk2oP9sX1vM3nQ8tY5wZ0cE4fH6jL2aU7iD3gK9mN"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/webhooks/{id}/test":{"post":{"tags":["事件通知"],"summary":"送出測試事件","description":"需要 `webhooks:write`。送一個 `webhook.ping` 事件，確認網址收得到、簽章驗證寫對了。每把金鑰每小時 30 次。","security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"事件通知只能設定在金鑰或授權所屬的帳號本人，填 `me`。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":3},"description":"事件通知的編號"}],"responses":{"202":{"description":"已排入送出","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"delivery_id":{"type":"integer","example":1025}}}}},"example":{"success":true,"data":{"delivery_id":1025}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"事件通知已經停用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/webhooks/{id}/deliveries":{"get":{"tags":["事件通知"],"summary":"送出紀錄","description":"需要 `webhooks:write`。最新的在前面，紀錄保留 30 天。","security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"事件通知只能設定在金鑰或授權所屬的帳號本人，填 `me`。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":3},"description":"事件通知的編號"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}},"example":{"success":true,"data":{"items":[{"id":1024,"event":"platform.donate","status":"delivered","attempts":1,"response_status":200,"error":null,"created_at":"2026-11-05T04:00:00.000Z","delivered_at":"2026-11-05T04:00:01.000Z","next_attempt_at":null}]}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/webhooks/{id}/deliveries/{delivery_id}/retry":{"post":{"tags":["事件通知"],"summary":"重新送出","description":"需要 `webhooks:write`。把已經送出或失敗的那一筆重新送一次，內容不變。","security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"事件通知只能設定在金鑰或授權所屬的帳號本人，填 `me`。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":3},"description":"事件通知的編號"},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"integer","example":1024}}],"responses":{"202":{"description":"已排入送出","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"integer","example":1024},"status":{"type":"string","example":"pending"}}}}},"example":{"success":true,"data":{"id":1024,"status":"pending"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/counters":{"get":{"tags":["即時操作"],"summary":"計數器列表","description":"需要 `live:read`。共同管理的創作者要開「管理計數器」權限。\n\n`percent` 是 `value` 占 `goal` 的百分比，沒有設定目標（`goal` 是 0）時是 null。`reset_mode`：none 不自動歸零、stream 每次開台、daily 每天。","security":[{"apiKey":[]},{"oauth2":["live:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/LiveCounterList"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}}}},"/{owner}/counters/{id}/increment":{"post":{"tags":["即時操作"],"summary":"計數器加一","description":"需要 `live:write`。共同管理的創作者要開「管理計數器」權限。\n\n數字加 1。OBS 小工具與直播中控台會馬上更新，變動紀錄的來源是「平台 API」。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":3},"description":"計數器編號（GET /{owner}/counters 的 counters[].id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/LiveCounterResult"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/counters/{id}/decrement":{"post":{"tags":["即時操作"],"summary":"計數器減一","description":"需要 `live:write`。共同管理的創作者要開「管理計數器」權限。\n\n數字減 1，可以減到負數。OBS 小工具與直播中控台會馬上更新，變動紀錄的來源是「平台 API」。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":3},"description":"計數器編號（GET /{owner}/counters 的 counters[].id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/LiveCounterResult"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/counters/{id}/reset":{"post":{"tags":["即時操作"],"summary":"計數器歸零","description":"需要 `live:write`。共同管理的創作者要開「管理計數器」權限。\n\n回到創作者設定的「歸零後的數字」（`reset_value`），設定成「每位觀眾只算一次」的規則會重新計算。OBS 小工具與直播中控台會馬上更新，變動紀錄的來源是「平台 API」。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":3},"description":"計數器編號（GET /{owner}/counters 的 counters[].id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/LiveCounterResult"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/counters/{id}/value":{"put":{"tags":["即時操作"],"summary":"設定計數器的數字","description":"需要 `live:write`。共同管理的創作者要開「管理計數器」權限。\n\n把數字直接改成 `value`（-999999999999 到 999999999999）。OBS 小工具與直播中控台會馬上更新。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":3},"description":"計數器編號（GET /{owner}/counters 的 counters[].id）"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["value"],"properties":{"value":{"type":"integer","minimum":-999999999999,"maximum":999999999999,"example":50,"description":"要設定的數字"}},"example":{"value":50}}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/LiveCounterResult"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/quiz":{"get":{"tags":["答題互動"],"summary":"答題互動目前的狀態","description":"需要 `live:read`。共同管理的創作者要開「管理答題互動」權限。\n\n`session` 是進行中的這一場，沒有的話整個是 null（`round`、`next_question` 也是 null）。`round` 是這一場最新的一題：`status` 是 open（作答中）、closed（已截止）、revealed（已公布）、cancelled（已取消）；時間到了還沒截止的題目會顯示成 closed。`answer` 是正確答案在 `options` 裡的位置（0 是 A），`counts` 是每個選項的作答人數，`closes_at` 是 null 代表不限時。`session.mode` 是 prediction 時這一場是用 Twitch 預測下注：`counts` 是每個選項的下注人數，另外有 `point_counts`（每個選項的下注點數）與 `total_points`，`board` 是空的。`round.prediction` 是這一題的 Twitch 預測（聊天室作答的題目是 null）。`board` 是本場排行（只算已公布的題目，最多 30 名），`next_question` 是題庫裡下一題還沒出過的題目，`sets` 是全部的題庫。","security":[{"apiKey":[]},{"oauth2":["live:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/LiveQuizState"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}}}},"/{owner}/quiz/start":{"post":{"tags":["答題互動"],"summary":"開始一場","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n`set_id` 是要用的題庫，沒送就是不用題庫，出題時直接送題目內容。`mode` 是作答方式：chat（預設）在聊天室輸入 A／B／C／D，prediction 用 Twitch 預測下注（不送機器人點數，`points` 只能是 0；頻道裡有別的進行中預測時回 409，可以先用 GET /{owner}/quiz/prediction 查）。\n\n`points` 是每答對一題送的機器人點數，只有金鑰或授權有 `points:write`，而且是創作者本人或有「Twitch 機器人設定」、「機器人點數」權限的共同管理人才會採用；沒送或沒有這個權限時用題庫設定的點數（沒用題庫是 0）。`title` 沒填用題庫名稱。已經有一場在進行時回 409。觀眾是在 Twitch 聊天室作答，帳號要綁定 Twitch。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"set_id":{"type":"integer","example":2,"description":"題庫編號（GET /{owner}/quiz/sets 的 items[].id）"},"title":{"type":"string","maxLength":60,"example":"週五晚場","description":"這一場的名稱"},"points":{"type":"integer","minimum":0,"maximum":100000,"example":30,"description":"每答對一題送的點數"},"mode":{"type":"string","enum":["chat","prediction"],"example":"chat","description":"作答方式"}}},"example":{"set_id":2,"title":"週五晚場","points":30}}}},"responses":{"201":{"description":"已建立","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"allOf":[{"$ref":"#/components/schemas/LiveQuizState"},{"type":"object","properties":{"message":{"type":"string","example":"已經開始，可以出題了"}}}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}}}},"/{owner}/quiz/next":{"post":{"tags":["答題互動"],"summary":"出下一題","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n有三種送法：\n\n- 什麼都不送：照題庫的順序出下一題還沒出過的題目（這一場沒有用題庫、或題目都出過了時回 409）。\n- `question_id`：出題庫裡指定的那一題，可以重出。\n- 直接送題目內容（`question`、`options`、`answer`，可以加 `time_limit`、`show_live`）：臨時出一題；有送 `save_set_id` 時順便存進那個題庫。\n\n聊天室會照設定發出題訊息。用 Twitch 預測的場次會同時建立這一題的預測（題目最多 45 字、選項最多 25 字，太長會截掉）；頻道裡有別的進行中的預測、或建立預測失敗時回 409，題目不會出。上一題還沒公布答案或取消時回 409。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"allOf":[{"$ref":"#/components/schemas/LiveQuizState"},{"type":"object","properties":{"message":{"type":"string","example":"已出題，觀眾可以開始作答"}}}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"question":{"type":"string","maxLength":200,"example":"下列哪一部是吉卜力的作品？","description":"題目，新增時必填"},"options":{"type":"array","minItems":2,"maxItems":4,"items":{"type":"string","maxLength":60},"example":["龍貓","你的名字","鬼滅之刃"],"description":"2 到 4 個選項，新增時必填。不能重複，也不能只有一個英文字母（會跟 A／B／C／D 混在一起）"},"answer":{"type":"integer","minimum":0,"maximum":3,"example":0,"description":"正確答案在 options 裡的位置（0 是 A），新增時必填"},"time_limit":{"type":"integer","minimum":0,"maximum":600,"example":30,"description":"作答秒數，0 是不限時（Twitch 預測最短 30 秒、不限時是 30 分鐘）"},"show_live":{"type":"boolean","example":true,"description":"作答中在 OBS 即時顯示每個選項的人數"},"question_id":{"type":"integer","example":16,"description":"題庫裡的題目編號，不能跟題目內容一起送"},"save_set_id":{"type":"integer","example":2,"description":"把這一題存進哪個題庫"}}},"example":{"question":"下列哪一首是 YOASOBI 的歌？","options":["夜に駆ける","紅蓮華","残酷な天使のテーゼ"],"answer":0,"time_limit":30}}}}}},"/{owner}/quiz/close":{"post":{"tags":["答題互動"],"summary":"截止作答","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n截止最新這一題，之後的作答不算。沒有作答中的題目時回 409（作答時間已經到的題目會自動截止，也回 409）。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"allOf":[{"$ref":"#/components/schemas/LiveQuizState"},{"type":"object","properties":{"message":{"type":"string","example":"已截止作答"}}}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}}}},"/{owner}/quiz/reveal":{"post":{"tags":["答題互動"],"summary":"公布答案","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n公布最新這一題的答案（作答中的也可以直接公布），聊天室照設定發公布訊息，答對的人照題目的點數自動拿到機器人點數。用 Twitch 預測的場次會用這個答案結算預測，不送機器人點數。已經公布或取消時回 409。\n\n可以送 `answer` 換掉這一題的正確答案（例如題目出錯了），沒送就用出題時的答案。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"allOf":[{"$ref":"#/components/schemas/LiveQuizState"},{"type":"object","properties":{"message":{"type":"string","example":"已公布答案"}}}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"answer":{"type":"integer","minimum":0,"maximum":3,"example":1,"description":"正確答案在 options 裡的位置（0 是 A）"}}},"example":{"answer":1}}}}}},"/{owner}/quiz/end":{"post":{"tags":["答題互動"],"summary":"結束這一場","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n結束進行中的這一場，還沒公布答案的題目一律取消、不算分，聊天室照設定發結束訊息。回應的狀態是結束之後的（`session` 是 null）。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"allOf":[{"$ref":"#/components/schemas/LiveQuizState"},{"type":"object","properties":{"message":{"type":"string","example":"這一場已結束"},"ended_session_id":{"type":"integer","example":8}}}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}}}},"/{owner}/twitch-alerts/queue":{"get":{"tags":["即時操作"],"summary":"Twitch 通知佇列","description":"需要 `live:read`。共同管理的創作者要開「小工具樣式」權限。\n\n`paused` 是有沒有暫停；`online` 是讀不讀得到 OBS 那邊的佇列（讀不到時 `items` 是空的）；`screens` 是開著的 OBS 畫面（kind 是 widget 或 overlay）；`items` 是排隊中的通知，`state` 是 playing（正在播）或 waiting，`age` 是收到到現在幾秒。","security":[{"apiKey":[]},{"oauth2":["live:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"paused":{"type":"boolean","example":false},"online":{"type":"boolean","example":true},"screens":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","example":"overlay"},"paused":{"type":"boolean","example":false}}}},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"twitch-m3x9k2-ab12cd34"},"event":{"type":"string","example":"follow"},"label":{"type":"string","example":"追隨"},"text":{"type":"string","example":"小明 追隨了頻道"},"test":{"type":"boolean","example":false},"state":{"type":"string","example":"playing"},"age":{"type":"integer","example":3}}}},"waiting":{"type":"integer","example":0}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"tags":["即時操作"],"summary":"清空 Twitch 通知佇列","description":"需要 `live:write`。共同管理的創作者要開「小工具樣式」權限。\n\n正在播的與排隊中的 Twitch 通知全部清掉。`receivers` 是當下開著的 OBS 畫面數。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"cleared":{"type":"boolean","example":true},"receivers":{"type":"integer","example":1},"message":{"type":"string","example":"已清空 Twitch 通知的佇列"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}}}},"/{owner}/twitch-alerts/queue/pause":{"post":{"tags":["即時操作"],"summary":"暫停 Twitch 通知","description":"需要 `live:write`。共同管理的創作者要開「小工具樣式」權限。\n\n暫停之後新的通知會先排著，繼續之後照順序播；正在播的那一則會播完。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"paused":{"type":"boolean","example":true},"message":{"type":"string","example":"已暫停 Twitch 通知，新的通知會先排著"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/twitch-alerts/queue/resume":{"post":{"tags":["即時操作"],"summary":"繼續播放 Twitch 通知","description":"需要 `live:write`。共同管理的創作者要開「小工具樣式」權限。\n\n繼續播放暫停期間排著的通知。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"paused":{"type":"boolean","example":false},"message":{"type":"string","example":"已繼續播放 Twitch 通知"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/twitch-alerts/queue/{alert_id}":{"delete":{"tags":["即時操作"],"summary":"移除一則 Twitch 通知","description":"需要 `live:write`。共同管理的創作者要開「小工具樣式」權限。\n\n正在播的會馬上收掉，還在排的直接拿掉。`receivers` 是當下開著的 OBS 畫面數，0 代表沒有開著的畫面。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$","example":"twitch-m3x9k2-ab12cd34"},"description":"通知編號（GET /{owner}/twitch-alerts/queue 的 items[].id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"string","example":"twitch-m3x9k2-ab12cd34"},"removed":{"type":"boolean","example":true},"receivers":{"type":"integer","example":1},"message":{"type":"string","example":"已移除這則通知"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}}}},"/{owner}/overlays":{"get":{"tags":["即時操作"],"summary":"整合畫面與圖層","description":"需要 `live:read`。共同管理的創作者要開「小工具樣式」權限。\n\n`online` 是 OBS 最近 3 分鐘內有沒有開著這個整合畫面。`layers` 最上面的圖層排第一個；`kind` 是內建通知（donate、achievement、membership、twitch）、widget（小工具）或 url（網址）；`can_mute` 是能不能從這裡靜音；`skip` 是跳過時會做什麼（notify 收掉正在播的通知、media 跳過正在播的點播、null 不能跳過）。","security":[{"apiKey":[]},{"oauth2":["live:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"overlays":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":4},"name":{"type":"string","example":"主畫面"},"online":{"type":"boolean","example":true},"layers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4e5"},"kind":{"type":"string","example":"donate"},"name":{"type":"string","example":"斗內通知"},"visible":{"type":"boolean","example":true},"muted":{"type":"boolean","example":false},"can_mute":{"type":"boolean","example":true},"can_skip":{"type":"boolean","example":true},"skip":{"type":"string","example":"notify","nullable":true}}}}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/overlays/{id}/layers/{layer}":{"patch":{"tags":["即時操作"],"summary":"顯示／隱藏、靜音一個圖層","description":"需要 `live:write`。共同管理的創作者要開「小工具樣式」權限。\n\n只改有送的欄位，馬上套用到 OBS，會一直維持到再改一次。別的網站的網址層不能靜音（回 409）。`changed` 是 false 代表本來就是這個狀態。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":4},"description":"整合畫面編號（GET /{owner}/overlays 的 overlays[].id）"},{"name":"layer","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9]{4,16}$","example":"a1b2c3d4e5"},"description":"圖層編號（overlays[].layers[].id）"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"visible":{"type":"boolean","example":false,"description":"顯示或隱藏"},"muted":{"type":"boolean","example":true,"description":"靜音或取消靜音"}},"example":{"visible":false}}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"overlay_id":{"type":"integer","example":4},"layer":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4e5"},"kind":{"type":"string","example":"donate"},"name":{"type":"string","example":"斗內通知"},"visible":{"type":"boolean","example":false},"muted":{"type":"boolean","example":false},"can_mute":{"type":"boolean","example":true},"can_skip":{"type":"boolean","example":true},"skip":{"type":"string","example":"notify","nullable":true}}},"changed":{"type":"boolean","example":true}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/overlays/{id}/layers/{layer}/skip":{"post":{"tags":["即時操作"],"summary":"跳過圖層正在播的內容","description":"需要 `live:write`。共同管理的創作者要開「小工具樣式」權限。跳過媒體點播另外要「控制媒體點播」權限。\n\n通知層會收掉正在播的通知；媒體點播的小工具會跳過正在播的點播。圖層是隱藏的、或沒有可以跳過的東西時回 409。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":4},"description":"整合畫面編號（GET /{owner}/overlays 的 overlays[].id）"},{"name":"layer","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9]{4,16}$","example":"a1b2c3d4e5"},"description":"圖層編號（overlays[].layers[].id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"overlay_id":{"type":"integer","example":4},"layer_id":{"type":"string","example":"a1b2c3d4e5"},"skipped":{"type":"string","example":"notify"},"message":{"type":"string","example":"已跳過「斗內通知」正在播的通知"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/orders/{platform_order_id}/resend":{"post":{"tags":["即時操作"],"summary":"重新推播一筆斗內通知","description":"需要 `live:write`。共同管理的創作者要開「檢視收款列表」權限。\n\n重新送出這筆的 OBS 通知、聊天室通知與 Discord 通知（照目前的通知設定），計時器不會加減時。只能推付款成功、不是測試金流的訂單。`media=true` 時這筆有點播的話也會重新播放（`media` 是實際有沒有重送點播）。通知是在回應之後才送出，`queued` 一律是 true。同一筆訂單 30 秒內只能重新推播一次，每把金鑰每小時 60 次。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"platform_order_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,100}$","example":"NEKOLIVE-ABCDEFGH-ABCDEFGHI"},"description":"平台訂單編號"},{"name":"media","in":"query","required":false,"schema":{"type":"string","enum":["true","false"],"default":"false","example":"false"},"description":"是否連點播一起重送"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"order_id":{"type":"string","example":"NEKOLIVE-ABCDEFGH-ABCDEFGHI"},"media":{"type":"boolean","example":false},"queued":{"type":"boolean","example":true},"message":{"type":"string","example":"已重新傳送通知"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/bot/points/leaderboard":{"get":{"tags":["機器人點數"],"summary":"點數排行榜","description":"需要 `points:read`。共同管理的創作者要開「Twitch 機器人設定」權限。\n\n名次跟聊天室的排行榜指令一樣：先比星星再比點數，不列機器人帳號與「活動紀錄」設定的排除帳號。帳號要綁定 Twitch 並開啟機器人點數。","security":[{"apiKey":[]},{"oauth2":["points:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"example":20},"description":"一頁幾筆，1～100，預設 20"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"example":0},"description":"略過前面幾筆"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"point_name":{"type":"string","example":"貓幣","description":"創作者設定的點數名稱"},"items":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer","example":1},"login":{"type":"string","example":"fan_one","description":"Twitch 帳號"},"name":{"type":"string","example":"粉絲一","description":"Twitch 顯示名稱"},"points":{"type":"integer","example":500},"stars":{"type":"integer","example":0}}}},"total":{"type":"integer","example":42,"description":"符合條件的總筆數"},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"沒有綁定 Twitch，或沒有開啟機器人點數","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/membership/tiers":{"get":{"tags":["會員訂閱"],"summary":"會員方案","description":"需要 `members:read`。共同管理的創作者要開「管理會員訂閱功能」權限。\n\n列出所有方案，包含已停止的。","security":[{"apiKey":[]},{"oauth2":["members:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"基本會員"},"description":{"type":"string","example":"每月一篇幕後花絮"},"price":{"type":"integer","example":100,"description":"每月價格（新台幣）"},"status":{"type":"string","example":"active","description":"active 開放訂閱、disabled 已停止","enum":["active","disabled"]},"sort":{"type":"integer","example":1},"current_members":{"type":"integer","example":12,"description":"目前有效的訂閱人數"},"created_at":{"type":"string","example":"2026-10-01T04:00:00.000Z","nullable":true,"format":"date-time"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"帳號不能使用會員訂閱","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/membership/members":{"get":{"tags":["會員訂閱"],"summary":"訂閱者","description":"需要 `members:read`。共同管理的創作者要開「管理會員訂閱功能」權限。\n\n一筆是一期訂閱，新的在前面。觀眾先付款續訂的下一期會是另一筆 `scheduled`，開始之後才會變成 `active`。","security":[{"apiKey":[]},{"oauth2":["members:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","cancelled","expired","scheduled","current"],"example":"current"},"description":"篩選狀態；current 是現在有效的（訂閱中或已取消但還沒到期）"},{"name":"tier_id","in":"query","required":false,"schema":{"type":"integer","example":1},"description":"只看這個方案"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"example":20},"description":"一頁幾筆，1～100，預設 20"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"example":0},"description":"略過前面幾筆"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":31,"description":"訂閱紀錄編號，一筆是一期"},"viewer":{"type":"object","properties":{"name":{"type":"string","example":"小明","description":"觀眾的顯示名稱；帳號已刪除時是「已刪除的帳號」"},"twitch_login":{"type":"string","example":"xiaoming","description":"觀眾綁定的 Twitch 帳號，沒有綁定是 null","nullable":true}}},"tier":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"基本會員"}}},"next_tier_id":{"type":"integer","example":null,"description":"到期後要切換的方案，沒有是 null","nullable":true},"status":{"type":"string","example":"active","description":"active 訂閱中、cancelled 已取消（到期前照樣有效）、expired 已到期、scheduled 已經先付款續訂、還沒開始的下一期","enum":["active","cancelled","expired","scheduled"]},"is_current":{"type":"boolean","example":true,"description":"現在是不是有效的訂閱"},"auto_renew":{"type":"boolean","example":true,"description":"是否自動續訂"},"months":{"type":"integer","example":1,"description":"這一期買了幾個月"},"consecutive_months":{"type":"integer","example":3,"description":"連續訂閱的月數"},"start_at":{"type":"string","example":"2026-10-25T12:00:00.000Z","format":"date-time"},"expire_at":{"type":"string","example":"2026-11-25T12:00:00.000Z","format":"date-time"},"prepaid_until":{"type":"string","example":"2026-12-25T12:00:00.000Z","description":"有效的這一期如果已經先付款續訂，續訂到什麼時候；沒有是 null","nullable":true,"format":"date-time"},"created_at":{"type":"string","example":"2026-10-25T12:00:00.000Z","nullable":true,"format":"date-time"}}}},"total":{"type":"integer","example":42,"description":"符合條件的總筆數"},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"帳號不能使用會員訂閱","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/leaderboard":{"get":{"tags":["統計"],"summary":"斗內排行榜","description":"需要 `stats:read`。共同管理的創作者要開「檢視收款列表」權限。\n\n算法跟 OBS 的排行榜小工具一樣：計算來源、合併方式照創作者的排行榜設定，不列設定成不算進排行榜的斗內；專案有開「在直播畫面顯示」的募資贊助也算進去。\n\n不帶期間就照排行榜設定（包含設定裡指定的進度條）。用 `period` 或 `start`、`end` 自己指定期間時不套用設定裡的進度條；要只算某條進度條就帶 `progress`，這時期間跟著進度條，不能再指定期間。\n\n同一位觀眾只要有任何一筆匿名斗內或匿名募資（不分期間），在排行榜上一律顯示匿名。每把金鑰每小時最多查 300 次。","security":[{"apiKey":[]},{"oauth2":["stats:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["setting","month","year","all"],"example":"month"},"description":"setting 照排行榜設定（預設）、month 本月、year 今年、all 全部"},{"name":"start","in":"query","required":false,"schema":{"type":"string","example":"2026-11-01"},"description":"自己指定開始日（YYYY-MM-DD，台北時間），不能跟 period 一起用"},{"name":"end","in":"query","required":false,"schema":{"type":"string","example":"2026-11-30"},"description":"自己指定結束日（含當天）"},{"name":"progress","in":"query","required":false,"schema":{"type":"string","example":"money_a"},"description":"只算這條進度條的斗內，all 是全部斗內"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"example":20},"description":"一頁幾筆，1～100，預設 20"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"example":0},"description":"略過前面幾筆"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"period":{"type":"object","properties":{"type":{"type":"string","example":"setting","description":"setting 照排行榜設定、month、year、all、custom 自己指定、progress 跟著進度條","enum":["setting","month","year","all","custom","progress"]},"start":{"type":"string","example":"2026-10-31T16:00:00.000Z","nullable":true,"format":"date-time"},"end":{"type":"string","example":"2026-11-30T15:59:59.000Z","nullable":true,"format":"date-time"}}},"progress":{"type":"string","example":null,"description":"只算這條進度條的斗內時是進度條代號，否則是 null","nullable":true},"calc_method":{"type":"string","example":"login","description":"合併同一個人的方式（排行榜設定）","enum":["login","nickname","platform"]},"sources":{"type":"object","properties":{"donate":{"type":"boolean","example":true},"bits":{"type":"boolean","example":true},"subgift":{"type":"boolean","example":false}},"description":"這次有算進去的來源（排行榜設定）"},"items":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer","example":1},"name":{"type":"string","example":"小明","description":"顯示名稱；這段期間有任何一筆是匿名的就是「匿名」"},"anonymous":{"type":"boolean","example":false},"avatar":{"type":"string","example":"https://user.nekolive.net/assets/default-avatar.png","description":"頭貼網址，匿名時是預設頭貼"},"amount":{"type":"integer","example":1150,"description":"排序用的總數：斗內金額＋小奇點＋贈送訂閱數，直接相加不換算"},"donate_amount":{"type":"integer","example":1000,"description":"斗內與募資金額（新台幣，募資不含運費）"},"bits_amount":{"type":"integer","example":150,"description":"小奇點"},"subgift_amount":{"type":"integer","example":0,"description":"贈送訂閱數"}}}},"total":{"type":"integer","example":42,"description":"符合條件的總筆數"},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/twitch/stats":{"get":{"tags":["統計"],"summary":"Twitch 統計","description":"需要 `stats:read`。共同管理的創作者要開「Twitch 機器人設定」權限。\n\n追隨人數、訂閱人數與現在是不是在直播。讀的是平台已經存下來的資料，不會即時向 Twitch 查詢。帳號要綁定 Twitch。","security":[{"apiKey":[]},{"oauth2":["stats:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"login":{"type":"string","example":"alice","description":"創作者的 Twitch 帳號"},"followers":{"type":"object","properties":{"count":{"type":"integer","example":1234,"description":"追隨人數，還沒取得過是 null","nullable":true},"updating":{"type":"boolean","example":true,"description":"平台會不會自動更新（機器人授權少了追隨者權限時是 false）"},"updated_at":{"type":"string","example":"2026-11-04T20:27:49.000Z","description":"最後更新時間","nullable":true,"format":"date-time"}},"description":"平台大約每 10 分鐘更新一次；沒有資料是 null","nullable":true},"subscribers":{"type":"object","properties":{"count":{"type":"integer","example":3,"description":"目前訂閱中的人數（含被贈送的，不含創作者自己）"},"gifted":{"type":"integer","example":1,"description":"其中被贈送的人數"},"tiers":{"type":"object","properties":{"1":{"type":"integer","example":2},"2":{"type":"integer","example":1},"3":{"type":"integer","example":0}},"description":"各等級人數"},"updated_at":{"type":"string","example":"2026-11-04T19:32:49.000Z","description":"最後一筆訂閱狀態更新的時間","nullable":true,"format":"date-time"}},"description":"依平台收到的訂閱事件與同步的名單計算","nullable":true},"live":{"type":"object","properties":{"is_live":{"type":"boolean","example":true},"started_at":{"type":"string","example":"2026-11-04T19:32:49.000Z","description":"開台時間","nullable":true,"format":"date-time"},"title":{"type":"string","example":"開台囉","nullable":true},"game":{"type":"string","example":"Minecraft","nullable":true},"url":{"type":"string","example":"https://www.twitch.tv/alice","nullable":true}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"帳號沒有綁定 Twitch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/calendar/events":{"get":{"tags":["直播行事曆"],"summary":"行事曆活動","description":"需要 `profile:read`。共同管理的創作者要開「管理行事曆」權限。\n\n開始時間新的在前面。週表同步過來的活動也會列出來（`from_schedule`）。","security":[{"apiKey":[]},{"oauth2":["profile:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"from","in":"query","required":false,"schema":{"type":"string","example":"2026-11-01"},"description":"開始日在這天之後（YYYY-MM-DD，台北時間）"},{"name":"to","in":"query","required":false,"schema":{"type":"string","example":"2026-11-30"},"description":"開始日在這天之前（含當天）"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"example":20},"description":"一頁幾筆，1～100，預設 20"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"example":0},"description":"略過前面幾筆"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"timezone":{"type":"string","example":"Asia/Taipei"},"discord_sync_enabled":{"type":"boolean","example":false,"description":"行事曆設定有沒有打開 Discord 活動同步"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":510},"title":{"type":"string","example":"雜談開台"},"description":{"type":"string","example":"聊聊天"},"game":{"type":"string","example":"Just Chatting","description":"遊戲或分類"},"start_time":{"type":"string","example":"2026-11-10T12:00:00.000Z","format":"date-time"},"end_time":{"type":"string","example":"2026-11-10T15:00:00.000Z","description":"沒有結束時間是 null","nullable":true,"format":"date-time"},"location_type":{"type":"string","example":"twitch","enum":["twitch","youtube","custom"]},"location_value":{"type":"string","example":"https://www.twitch.tv/alice","description":"直播網址或地點"},"status":{"type":"string","example":"scheduled","enum":["scheduled","cancelled"]},"from_schedule":{"type":"boolean","example":false,"description":"從週表同步過來的活動，要改週表那一筆，不能用 API 修改或刪除"},"discord":{"type":"object","properties":{"sync":{"type":"boolean","example":true,"description":"這個活動有沒有勾同步到 Discord 活動"},"synced":{"type":"boolean","example":false,"description":"已經建立 Discord 活動"},"error":{"type":"string","example":null,"description":"上次同步失敗的原因","nullable":true}}},"created_at":{"type":"string","example":"2026-11-04T20:32:49.000Z","nullable":true,"format":"date-time"},"updated_at":{"type":"string","example":null,"nullable":true,"format":"date-time"}}}},"total":{"type":"integer","example":42,"description":"符合條件的總筆數"},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"tags":["直播行事曆"],"summary":"新增活動","description":"需要 `profile:write`。共同管理的創作者要開「管理行事曆」權限。\n\n有勾 `discord_sync`、行事曆設定也打開同步時，會在回應送出後建立 Discord 活動，結果之後讀活動時看 `discord`。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"201":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"integer","example":510},"title":{"type":"string","example":"雜談開台"},"description":{"type":"string","example":"聊聊天"},"game":{"type":"string","example":"Just Chatting","description":"遊戲或分類"},"start_time":{"type":"string","example":"2026-11-10T12:00:00.000Z","format":"date-time"},"end_time":{"type":"string","example":"2026-11-10T15:00:00.000Z","description":"沒有結束時間是 null","nullable":true,"format":"date-time"},"location_type":{"type":"string","example":"twitch","enum":["twitch","youtube","custom"]},"location_value":{"type":"string","example":"https://www.twitch.tv/alice","description":"直播網址或地點"},"status":{"type":"string","example":"scheduled","enum":["scheduled","cancelled"]},"from_schedule":{"type":"boolean","example":false,"description":"從週表同步過來的活動，要改週表那一筆，不能用 API 修改或刪除"},"discord":{"type":"object","properties":{"sync":{"type":"boolean","example":true,"description":"這個活動有沒有勾同步到 Discord 活動"},"synced":{"type":"boolean","example":false,"description":"已經建立 Discord 活動"},"error":{"type":"string","example":null,"description":"上次同步失敗的原因","nullable":true}}},"created_at":{"type":"string","example":"2026-11-04T20:32:49.000Z","nullable":true,"format":"date-time"},"updated_at":{"type":"string","example":null,"nullable":true,"format":"date-time"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["title","start_time","location_value"],"properties":{"title":{"type":"string","example":"雜談開台","description":"最多 255 字"},"description":{"type":"string","example":"聊聊天","description":"最多 500 字"},"game":{"type":"string","example":"Just Chatting","description":"最多 255 字"},"start_time":{"type":"string","example":"2026-11-10T20:00:00+08:00","description":"ISO 8601，可以帶時區；沒帶時區當作台北時間","format":"date-time"},"end_time":{"type":"string","example":"2026-11-10T23:00:00+08:00","description":"要晚於開始時間；送 null 清掉","nullable":true,"format":"date-time"},"location_type":{"type":"string","example":"twitch","description":"預設 twitch","enum":["twitch","youtube","custom"]},"location_value":{"type":"string","example":"https://www.twitch.tv/alice","description":"直播網址或地點，最多 512 字"},"discord_sync":{"type":"boolean","example":true,"description":"同步到 Discord 活動（行事曆設定要先打開同步）"}}}}}}}},"/{owner}/calendar/events/{id}":{"patch":{"tags":["直播行事曆"],"summary":"修改活動","description":"需要 `profile:write`。共同管理的創作者要開「管理行事曆」權限。\n\n只改有送的欄位，Discord 活動會跟著更新。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":510},"description":"活動編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"integer","example":510},"title":{"type":"string","example":"雜談開台"},"description":{"type":"string","example":"聊聊天"},"game":{"type":"string","example":"Just Chatting","description":"遊戲或分類"},"start_time":{"type":"string","example":"2026-11-10T12:00:00.000Z","format":"date-time"},"end_time":{"type":"string","example":"2026-11-10T15:00:00.000Z","description":"沒有結束時間是 null","nullable":true,"format":"date-time"},"location_type":{"type":"string","example":"twitch","enum":["twitch","youtube","custom"]},"location_value":{"type":"string","example":"https://www.twitch.tv/alice","description":"直播網址或地點"},"status":{"type":"string","example":"scheduled","enum":["scheduled","cancelled"]},"from_schedule":{"type":"boolean","example":false,"description":"從週表同步過來的活動，要改週表那一筆，不能用 API 修改或刪除"},"discord":{"type":"object","properties":{"sync":{"type":"boolean","example":true,"description":"這個活動有沒有勾同步到 Discord 活動"},"synced":{"type":"boolean","example":false,"description":"已經建立 Discord 活動"},"error":{"type":"string","example":null,"description":"上次同步失敗的原因","nullable":true}}},"created_at":{"type":"string","example":"2026-11-04T20:32:49.000Z","nullable":true,"format":"date-time"},"updated_at":{"type":"string","example":null,"nullable":true,"format":"date-time"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"週表同步過來的活動","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"minProperties":1,"description":"只改有送的欄位","properties":{"title":{"type":"string","example":"雜談開台","description":"最多 255 字"},"description":{"type":"string","example":"聊聊天","description":"最多 500 字"},"game":{"type":"string","example":"Just Chatting","description":"最多 255 字"},"start_time":{"type":"string","example":"2026-11-10T20:00:00+08:00","description":"ISO 8601，可以帶時區；沒帶時區當作台北時間","format":"date-time"},"end_time":{"type":"string","example":"2026-11-10T23:00:00+08:00","description":"要晚於開始時間；送 null 清掉","nullable":true,"format":"date-time"},"location_type":{"type":"string","example":"twitch","description":"預設 twitch","enum":["twitch","youtube","custom"]},"location_value":{"type":"string","example":"https://www.twitch.tv/alice","description":"直播網址或地點，最多 512 字"},"discord_sync":{"type":"boolean","example":true,"description":"同步到 Discord 活動（行事曆設定要先打開同步）"}}}}}}},"delete":{"tags":["直播行事曆"],"summary":"刪除活動","description":"需要 `profile:write`。共同管理的創作者要開「管理行事曆」權限。\n\n建立過的 Discord 活動會一起刪掉。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":510},"description":"活動編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"integer","example":510},"deleted":{"type":"boolean","example":true}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"週表同步過來的活動","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/store/orders":{"get":{"tags":["創作者商店"],"summary":"訂單","description":"需要 `store:read`。共同管理的創作者要開「訂單管理」權限。\n\n新的在前面。不含收件地址、電話、觀眾填寫的欄位與備註，這些請到後台查看。還沒付款完成的線上付款不會列出來。","security":[{"apiKey":[]},{"oauth2":["store:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","processing","completed","cancelled","refunded"],"example":"pending"},"description":"篩選狀態"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"example":20},"description":"一頁幾筆，1～100，預設 20"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"example":0},"description":"略過前面幾筆"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"NEKOLIVE-1A2B3C4D-5E6F7A8B9C","description":"訂單編號"},"item":{"type":"object","properties":{"id":{"type":"string","example":"3f2a9c1e-8b7d-4e6f-9a0b-1c2d3e4f5a6b","description":"商品編號"},"name":{"type":"string","example":"簽名照","description":"下單當時的商品名稱"},"image":{"type":"string","example":"https://assets.nekolive.net/files/x.webp","nullable":true}}},"variant":{"type":"object","properties":{"name":{"type":"string","example":"L"},"price":{"type":"integer","example":120,"nullable":true}},"description":"選的規格，沒有是 null","nullable":true},"quantity":{"type":"integer","example":1,"description":"總件數"},"lines":{"type":"array","description":"這筆訂單的每一項商品。從購物車結帳的訂單會有好幾項，item 與 variant 是第一項","items":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","example":"3f2a9c1e-8b7d-4e6f-9a0b-1c2d3e4f5a6b","description":"商品編號"},"name":{"type":"string","example":"簽名照","description":"下單當時的商品名稱"},"image":{"type":"string","example":"https://assets.nekolive.net/files/x.webp","nullable":true}}},"variant":{"type":"object","nullable":true,"description":"選的規格，沒有是 null","properties":{"name":{"type":"string","example":"L"}}},"quantity":{"type":"integer","example":2},"unit_points":{"type":"integer","example":100,"description":"一件的點數，線上付款是 0"},"unit_amount":{"type":"integer","example":null,"nullable":true,"description":"一件的金額（新台幣），點數兌換是 null"}}}},"pay_method":{"type":"string","example":"points","description":"points 點數兌換，payuni／oen 線上付款"},"points":{"type":"integer","example":100,"description":"花的點數，線上付款是 0"},"amount":{"type":"integer","example":null,"description":"線上付款的金額（新台幣，含運費），點數兌換是 null","nullable":true},"shipping_fee":{"type":"integer","example":0,"description":"運費（新台幣），點數兌換與不收運費時是 0"},"status":{"type":"string","example":"completed","enum":["pending","processing","completed","cancelled","refunded"]},"status_label":{"type":"string","example":"已完成"},"needs_shipping":{"type":"boolean","example":true,"description":"觀眾有填收件資料（API 不提供收件資料，請到後台查看）"},"viewer":{"type":"object","properties":{"name":{"type":"string","example":"小明","description":"下單時的顯示名稱"},"twitch_login":{"type":"string","example":"xiaoming","nullable":true}}},"admin_note":{"type":"string","example":"已寄出，單號 123","description":"創作者備註"},"completed_at":{"type":"string","example":"2026-11-04T20:32:49.000Z","nullable":true,"format":"date-time"},"created_at":{"type":"string","example":"2026-11-04T17:32:49.000Z","nullable":true,"format":"date-time"}}}},"total":{"type":"integer","example":42,"description":"符合條件的總筆數"},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/store/orders/{order}":{"get":{"tags":["創作者商店"],"summary":"一筆訂單","description":"需要 `store:read`。共同管理的創作者要開「訂單管理」權限。","security":[{"apiKey":[]},{"oauth2":["store:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"order","in":"path","required":true,"schema":{"type":"string","example":"NEKOLIVE-1A2B3C4D-5E6F7A8B9C"},"description":"訂單編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"string","example":"NEKOLIVE-1A2B3C4D-5E6F7A8B9C","description":"訂單編號"},"item":{"type":"object","properties":{"id":{"type":"string","example":"3f2a9c1e-8b7d-4e6f-9a0b-1c2d3e4f5a6b","description":"商品編號"},"name":{"type":"string","example":"簽名照","description":"下單當時的商品名稱"},"image":{"type":"string","example":"https://assets.nekolive.net/files/x.webp","nullable":true}}},"variant":{"type":"object","properties":{"name":{"type":"string","example":"L"},"price":{"type":"integer","example":120,"nullable":true}},"description":"選的規格，沒有是 null","nullable":true},"quantity":{"type":"integer","example":1,"description":"總件數"},"lines":{"type":"array","description":"這筆訂單的每一項商品。從購物車結帳的訂單會有好幾項，item 與 variant 是第一項","items":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","example":"3f2a9c1e-8b7d-4e6f-9a0b-1c2d3e4f5a6b","description":"商品編號"},"name":{"type":"string","example":"簽名照","description":"下單當時的商品名稱"},"image":{"type":"string","example":"https://assets.nekolive.net/files/x.webp","nullable":true}}},"variant":{"type":"object","nullable":true,"description":"選的規格，沒有是 null","properties":{"name":{"type":"string","example":"L"}}},"quantity":{"type":"integer","example":2},"unit_points":{"type":"integer","example":100,"description":"一件的點數，線上付款是 0"},"unit_amount":{"type":"integer","example":null,"nullable":true,"description":"一件的金額（新台幣），點數兌換是 null"}}}},"pay_method":{"type":"string","example":"points","description":"points 點數兌換，payuni／oen 線上付款"},"points":{"type":"integer","example":100,"description":"花的點數，線上付款是 0"},"amount":{"type":"integer","example":null,"description":"線上付款的金額（新台幣，含運費），點數兌換是 null","nullable":true},"shipping_fee":{"type":"integer","example":0,"description":"運費（新台幣），點數兌換與不收運費時是 0"},"status":{"type":"string","example":"completed","enum":["pending","processing","completed","cancelled","refunded"]},"status_label":{"type":"string","example":"已完成"},"needs_shipping":{"type":"boolean","example":true,"description":"觀眾有填收件資料（API 不提供收件資料，請到後台查看）"},"viewer":{"type":"object","properties":{"name":{"type":"string","example":"小明","description":"下單時的顯示名稱"},"twitch_login":{"type":"string","example":"xiaoming","nullable":true}}},"admin_note":{"type":"string","example":"已寄出，單號 123","description":"創作者備註"},"completed_at":{"type":"string","example":"2026-11-04T20:32:49.000Z","nullable":true,"format":"date-time"},"created_at":{"type":"string","example":"2026-11-04T17:32:49.000Z","nullable":true,"format":"date-time"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"tags":["創作者商店"],"summary":"更新訂單狀態","description":"需要 `store:write`。共同管理的創作者要開「訂單管理」權限。\n\n只能在待處理、處理中、已完成之間切換，或修改創作者備註。取消、退款、退點與回補庫存請到後台處理；已經取消或退款的訂單不能再改。","security":[{"apiKey":[]},{"oauth2":["store:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"order","in":"path","required":true,"schema":{"type":"string","example":"NEKOLIVE-1A2B3C4D-5E6F7A8B9C"},"description":"訂單編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"string","example":"NEKOLIVE-1A2B3C4D-5E6F7A8B9C","description":"訂單編號"},"item":{"type":"object","properties":{"id":{"type":"string","example":"3f2a9c1e-8b7d-4e6f-9a0b-1c2d3e4f5a6b","description":"商品編號"},"name":{"type":"string","example":"簽名照","description":"下單當時的商品名稱"},"image":{"type":"string","example":"https://assets.nekolive.net/files/x.webp","nullable":true}}},"variant":{"type":"object","properties":{"name":{"type":"string","example":"L"},"price":{"type":"integer","example":120,"nullable":true}},"description":"選的規格，沒有是 null","nullable":true},"quantity":{"type":"integer","example":1,"description":"總件數"},"lines":{"type":"array","description":"這筆訂單的每一項商品。從購物車結帳的訂單會有好幾項，item 與 variant 是第一項","items":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","example":"3f2a9c1e-8b7d-4e6f-9a0b-1c2d3e4f5a6b","description":"商品編號"},"name":{"type":"string","example":"簽名照","description":"下單當時的商品名稱"},"image":{"type":"string","example":"https://assets.nekolive.net/files/x.webp","nullable":true}}},"variant":{"type":"object","nullable":true,"description":"選的規格，沒有是 null","properties":{"name":{"type":"string","example":"L"}}},"quantity":{"type":"integer","example":2},"unit_points":{"type":"integer","example":100,"description":"一件的點數，線上付款是 0"},"unit_amount":{"type":"integer","example":null,"nullable":true,"description":"一件的金額（新台幣），點數兌換是 null"}}}},"pay_method":{"type":"string","example":"points","description":"points 點數兌換，payuni／oen 線上付款"},"points":{"type":"integer","example":100,"description":"花的點數，線上付款是 0"},"amount":{"type":"integer","example":null,"description":"線上付款的金額（新台幣，含運費），點數兌換是 null","nullable":true},"shipping_fee":{"type":"integer","example":0,"description":"運費（新台幣），點數兌換與不收運費時是 0"},"status":{"type":"string","example":"completed","enum":["pending","processing","completed","cancelled","refunded"]},"status_label":{"type":"string","example":"已完成"},"needs_shipping":{"type":"boolean","example":true,"description":"觀眾有填收件資料（API 不提供收件資料，請到後台查看）"},"viewer":{"type":"object","properties":{"name":{"type":"string","example":"小明","description":"下單時的顯示名稱"},"twitch_login":{"type":"string","example":"xiaoming","nullable":true}}},"admin_note":{"type":"string","example":"已寄出，單號 123","description":"創作者備註"},"completed_at":{"type":"string","example":"2026-11-04T20:32:49.000Z","nullable":true,"format":"date-time"},"created_at":{"type":"string","example":"2026-11-04T17:32:49.000Z","nullable":true,"format":"date-time"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"訂單已經取消或退款","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"status":{"type":"string","example":"completed","description":"pending 待處理、processing 處理中、completed 已完成","enum":["pending","processing","completed"]},"admin_note":{"type":"string","example":"已寄出，單號 123","description":"創作者備註，最多 1000 字；空字串清掉"}}}}}}}},"/{owner}/crowdfunding/projects":{"get":{"tags":["募資"],"summary":"募資專案","description":"需要 `crowdfunding:read`。共同管理的創作者要開「管理募資」權限。\n\n照後台的排序。","security":[{"apiKey":[]},{"oauth2":["crowdfunding:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"example":20},"description":"一頁幾筆，1～100，預設 20"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"example":0},"description":"略過前面幾筆"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1},"title":{"type":"string","example":"新衣裝募資"},"state":{"type":"string","example":"active","description":"draft 草稿、upcoming 即將開始、active 募資中、ended 已結束","enum":["draft","upcoming","active","ended"]},"state_label":{"type":"string","example":"募資中"},"goal":{"type":"integer","example":10000,"description":"目標金額（新台幣）"},"raised":{"type":"integer","example":800,"description":"募得金額：成功付款、沒有退款的贊助扣掉運費"},"percent":{"type":"integer","example":8},"backers":{"type":"integer","example":2,"description":"贊助筆數"},"start_at":{"type":"string","example":"2026-11-01T20:32:49.000Z","nullable":true,"format":"date-time"},"end_at":{"type":"string","example":"2026-11-24T20:32:49.000Z","nullable":true,"format":"date-time"},"ended_at":{"type":"string","example":null,"description":"實際結束時間（提前結束時是按下結束的時間），還沒結束是 null","nullable":true,"format":"date-time"},"url":{"type":"string","example":"https://user.nekolive.net/crowdfunding/alice/1","description":"公開頁面，草稿是 null","nullable":true}}}},"total":{"type":"integer","example":42,"description":"符合條件的總筆數"},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"帳號不能使用收款相關功能","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"募資功能還在準備中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/{owner}/crowdfunding/projects/{id}/pledges":{"get":{"tags":["募資"],"summary":"贊助紀錄","description":"需要 `crowdfunding:read`。共同管理的創作者要開「管理募資」權限。\n\n成功付款的贊助（含之後退款的），新的在前面。不含收件資料、填寫欄位與留言。","security":[{"apiKey":[]},{"oauth2":["crowdfunding:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":1},"description":"專案編號"},{"name":"fulfill_status","in":"query","required":false,"schema":{"type":"string","enum":["pending","shipped","done","cancelled"],"example":"pending"},"description":"篩選出貨狀態"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"example":20},"description":"一頁幾筆，1～100，預設 20"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"example":0},"description":"略過前面幾筆"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"integer","example":1},"title":{"type":"string","example":"新衣裝募資"}}},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":17},"name":{"type":"string","example":"小華","description":"贊助者名稱；選了不公開名稱的是「匿名」"},"anonymous":{"type":"boolean","example":false},"twitch_login":{"type":"string","example":null,"description":"贊助者綁定的 Twitch 帳號，匿名或沒有綁定是 null","nullable":true},"plan":{"type":"object","properties":{"id":{"type":"integer","example":1},"title":{"type":"string","example":"壓克力立牌"}},"description":"回饋方案，無回饋支持是 null","nullable":true},"quantity":{"type":"integer","example":1},"amount":{"type":"integer","example":600,"description":"付款金額（含運費）"},"shipping_fee":{"type":"integer","example":100},"net_amount":{"type":"integer","example":500,"description":"不含運費的金額，算進募得金額的部分"},"manual":{"type":"boolean","example":false,"description":"創作者在後台手動新增的贊助"},"refunded":{"type":"boolean","example":false,"description":"已經退款"},"ship_needed":{"type":"boolean","example":true,"description":"回饋方案需要寄送"},"fulfill_status":{"type":"string","example":"shipped","description":"pending 準備中、shipped 已寄出、done 已完成、cancelled 已取消","enum":["pending","shipped","done","cancelled"]},"fulfill_label":{"type":"string","example":"已寄出"},"paid_at":{"type":"string","example":"2026-11-04T20:30:49.000Z","nullable":true,"format":"date-time"}}}},"total":{"type":"integer","example":42,"description":"符合條件的總筆數"},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"帳號不能使用收款相關功能","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"募資功能還在準備中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/{owner}/blog":{"get":{"tags":["部落格"],"summary":"部落格文章列表","description":"需要 `posts:read`。共同管理的創作者要開「管理貼文」權限。\n\n草稿、排程中、已發布的都列，最近改過的在前面。列表不含內文，要內文請讀單篇。","security":[{"apiKey":[]},{"oauth2":["posts:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"status","in":"query","required":false,"schema":{"type":"string","example":"published","enum":["published","draft","scheduled"]},"description":"只列這個狀態：published（已發布）、draft（草稿）、scheduled（排程中）"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","example":20,"minimum":1,"maximum":100},"description":"一頁幾筆，1～100，預設 20"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","example":0,"minimum":0},"description":"從第幾筆開始，預設 0"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BlogArticle"}},"total":{"type":"integer","example":1},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0},"blog_url":{"type":"string","example":"https://user.nekolive.net/creator/alice/blog"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"tags":["部落格"],"summary":"新增文章草稿","description":"需要 `posts:write`。共同管理的創作者要開「管理貼文」權限。\n\n新增的文章一律是草稿，要公開請再呼叫發布。草稿最多 500 篇。","security":[{"apiKey":[]},{"oauth2":["posts:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"201":{"description":"已建立","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/BlogArticle"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogArticleInput"},"example":{"title":"我的配信設備大公開","content":"## 麥克風\n\n目前用的是…","tags":["設備"]}}}}}},"/{owner}/blog/{id}":{"get":{"tags":["部落格"],"summary":"讀一篇文章","description":"需要 `posts:read`。共同管理的創作者要開「管理貼文」權限。\n\n`content` 是 Markdown 原文。","security":[{"apiKey":[]},{"oauth2":["posts:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":12},"description":"文章編號（`id`，不是貼文編號）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/BlogArticle"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"tags":["部落格"],"summary":"修改文章","description":"需要 `posts:write`。共同管理的創作者要開「管理貼文」權限。\n\n只改有送的欄位。草稿只改草稿（排程中的維持排程）；已經發布的文章會直接更新公開的內容，不會再通知追隨者。","security":[{"apiKey":[]},{"oauth2":["posts:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":12},"description":"文章編號（`id`，不是貼文編號）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/BlogArticle"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogArticleInput"},"example":{"summary":"更新了燈光的部分"}}}}},"delete":{"tags":["部落格"],"summary":"刪除文章","description":"需要 `posts:write`。共同管理的創作者要開「管理貼文」權限。\n\n已經發布的文章會連同留言、心情一起刪掉。","security":[{"apiKey":[]},{"oauth2":["posts:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":12},"description":"文章編號（`id`，不是貼文編號）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"integer","example":12},"deleted":{"type":"boolean","example":true}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/blog/{id}/publish":{"post":{"tags":["部落格"],"summary":"馬上發布文章","description":"需要 `posts:write`。共同管理的創作者要開「管理貼文」權限。\n\n只能發布草稿（排程中的也可以，排程會取消），會通知追隨者。發布次數跟發文一起算：一小時最多 20 篇、一天最多 100 篇。不需要送出內容。","security":[{"apiKey":[]},{"oauth2":["posts:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":12},"description":"文章編號（`id`，不是貼文編號）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/BlogArticle"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/blog/{id}/schedule":{"post":{"tags":["部落格"],"summary":"排程發布文章","description":"需要 `posts:write`。共同管理的創作者要開「管理貼文」權限。\n\n時間到了會自動發布並通知追隨者，最遠 180 天後。同一個小時最多 20 篇、還沒發出的排程最多 100 篇。","security":[{"apiKey":[]},{"oauth2":["posts:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":12},"description":"文章編號（`id`，不是貼文編號）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/BlogArticle"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"scheduled_at":{"type":"string","description":"發布時間（ISO 8601），沒寫時區的當成台北時間","example":"2026-11-20T12:00:00Z"}},"required":["scheduled_at"]},"example":{"scheduled_at":"2026-11-20T12:00:00Z"}}}}},"delete":{"tags":["部落格"],"summary":"取消排程","description":"需要 `posts:write`。共同管理的創作者要開「管理貼文」權限。\n\n文章回到草稿。","security":[{"apiKey":[]},{"oauth2":["posts:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":12},"description":"文章編號（`id`，不是貼文編號）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/BlogArticle"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/thanks":{"get":{"tags":["感謝牆"],"summary":"感謝牆列表","description":"需要 `profile:read`。共同管理的創作者要開「個人資料／收款方式／相關連結／自訂文字」權限。\n\n照創作者頁面的順序（置頂、沒填日期、日期新到舊），隱藏的也會列出來。觀眾選了不公開名字的，`name` 一律是「一位觀眾」、`anonymous` 是 true，也不帶 Twitch 帳號。","security":[{"apiKey":[]},{"oauth2":["profile:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","example":20,"minimum":1,"maximum":100},"description":"一頁幾筆，1～100，預設 20"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","example":0,"minimum":0},"description":"從第幾筆開始，預設 0"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ThanksItem"}},"total":{"type":"integer","example":1},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0},"max":{"type":"integer","example":500}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"tags":["感謝牆"],"summary":"新增感謝","description":"需要 `profile:write`。共同管理的創作者要開「個人資料／收款方式／相關連結／自訂文字」權限。\n\n手動新增一則感謝，最多 500 則。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"201":{"description":"已建立","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/ThanksItem"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThanksInput"},"example":{"kind":"gift","name":"小明","title":"生日禮物","message":"謝謝你的支持！"}}}}}},"/{owner}/thanks/from-record":{"post":{"tags":["感謝牆"],"summary":"從收款紀錄新增感謝","description":"需要 `profile:write` 和 `orders:read`。共同管理的創作者要開「個人資料／收款方式／相關連結／自訂文字」與「檢視收款列表」權限。\n\n從斗內、小費（`source: sponsor`，`ref` 是訂單編號）或 Twitch 小奇點、贈送訂閱、訂閱紀錄（`source: twitch`，`ref` 是紀錄編號）新增一則感謝。類型、名稱、金額、日期都照紀錄帶入，不能自己填；同一筆紀錄只能放一次。","security":[{"apiKey":[]},{"oauth2":["profile:write","orders:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"201":{"description":"已建立","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/ThanksItem"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","description":"紀錄來源","example":"sponsor","enum":["sponsor","twitch"]},"ref":{"type":"string","description":"訂單編號或 Twitch 紀錄編號","example":"NK2026110412345"},"title":{"type":"string","description":"感謝什麼，最多 60 字","example":""},"message":{"type":"string","description":"感謝的話，最多 1,000 字","example":"謝謝你的支持！"},"images":{"type":"array","description":"圖片，最多 4 張，只能用自己檔案空間的網址","example":[],"items":{"type":"string","example":"https://widgets.nekolive.net/UserAssets/0e2b8c1a-7f3d-4c55-9a61-2f4a0b6c9d11/gift.webp"}},"show_amount":{"type":"boolean","description":"在創作者頁面顯示金額或數量","example":true},"pinned":{"type":"boolean","description":"置頂","example":false},"hidden":{"type":"boolean","description":"不顯示在創作者頁面","example":false}},"required":["source","ref"]},"example":{"source":"sponsor","ref":"NK2026110412345","message":"謝謝你的支持！","show_amount":true}}}}}},"/{owner}/thanks/{id}":{"patch":{"tags":["感謝牆"],"summary":"修改感謝","description":"需要 `profile:write`。共同管理的創作者要開「個人資料／收款方式／相關連結／自訂文字」權限。\n\n只改有送的欄位，置頂（`pinned`）、隱藏（`hidden`）也用這個。從紀錄新增的感謝，對應的觀眾不會變。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":8},"description":"感謝編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/ThanksItem"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThanksInput"},"example":{"pinned":true}}}}},"delete":{"tags":["感謝牆"],"summary":"刪除感謝","description":"需要 `profile:write`。共同管理的創作者要開「個人資料／收款方式／相關連結／自訂文字」權限。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":8},"description":"感謝編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"integer","example":8},"deleted":{"type":"boolean","example":true}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/milestones":{"get":{"tags":["里程碑"],"summary":"里程碑列表","description":"需要 `profile:read`。共同管理的創作者要開「個人資料／收款方式／相關連結／自訂文字」權限。\n\n時間由新到舊，隱藏的也會列出來。","security":[{"apiKey":[]},{"oauth2":["profile:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","example":20,"minimum":1,"maximum":100},"description":"一頁幾筆，1～100，預設 20"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","example":0,"minimum":0},"description":"從第幾筆開始，預設 0"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MilestoneItem"}},"total":{"type":"integer","example":1},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0},"max":{"type":"integer","example":200}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"tags":["里程碑"],"summary":"新增里程碑","description":"需要 `profile:write`。共同管理的創作者要開「個人資料／收款方式／相關連結／自訂文字」權限。\n\n最多 200 個。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"201":{"description":"已建立","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/MilestoneItem"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneInput"},"example":{"date":"2025-05-01","time":"20:30","title":"第一次開台"}}}}}},"/{owner}/milestones/{id}":{"patch":{"tags":["里程碑"],"summary":"修改里程碑","description":"需要 `profile:write`。共同管理的創作者要開「個人資料／收款方式／相關連結／自訂文字」權限。\n\n只改有送的欄位。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":4},"description":"里程碑編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/MilestoneItem"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneInput"},"example":{"hidden":true}}}}},"delete":{"tags":["里程碑"],"summary":"刪除里程碑","description":"需要 `profile:write`。共同管理的創作者要開「個人資料／收款方式／相關連結／自訂文字」權限。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":4},"description":"里程碑編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"integer","example":4},"deleted":{"type":"boolean","example":true}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/portfolio":{"get":{"tags":["作品集"],"summary":"作品列表","description":"需要 `profile:read`。共同管理的創作者要開「個人資料／收款方式／相關連結／自訂文字」權限。\n\n照後台排的順序，隱藏的也會列出來。`categories` 是目前的類別。","security":[{"apiKey":[]},{"oauth2":["profile:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"category_id","in":"query","required":false,"schema":{"type":"integer","example":1},"description":"只列這個類別，0 是未分類"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","example":20,"minimum":1,"maximum":100},"description":"一頁幾筆，1～100，預設 20"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","example":0,"minimum":0},"description":"從第幾筆開始，預設 0"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PortfolioItem"}},"total":{"type":"integer","example":1},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0},"max":{"type":"integer","example":100},"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"插畫"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"tags":["作品集"],"summary":"新增作品","description":"需要 `profile:write`。共同管理的創作者要開「個人資料／收款方式／相關連結／自訂文字」權限。\n\n新增的作品排在最前面，最多 100 件。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"201":{"description":"已建立","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/PortfolioItem"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioItemInput"},"example":{"title":"Vtuber 立繪","category_id":1,"images":["https://widgets.nekolive.net/UserAssets/0e2b8c1a-7f3d-4c55-9a61-2f4a0b6c9d11/work.webp"]}}}}}},"/{owner}/portfolio/{id}":{"patch":{"tags":["作品集"],"summary":"修改作品","description":"需要 `profile:write`。共同管理的創作者要開「個人資料／收款方式／相關連結／自訂文字」權限。\n\n只改有送的欄位，顯示或隱藏（`hidden`）也用這個。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":21},"description":"作品編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/PortfolioItem"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioItemInput"},"example":{"hidden":true}}}}},"delete":{"tags":["作品集"],"summary":"刪除作品","description":"需要 `profile:write`。共同管理的創作者要開「個人資料／收款方式／相關連結／自訂文字」權限。\n\n檔案空間裡的圖片不會被刪掉。","security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":21},"description":"作品編號"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"integer","example":21},"deleted":{"type":"boolean","example":true}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/inbox":{"get":{"tags":["觀眾訊息"],"summary":"觀眾訊息列表","description":"需要 `inbox:read`。共同管理的創作者要開「管理觀眾訊息」權限。\n\n新的在前面。匿名的訊息 `anonymous` 是 true、`sender` 是 null，不會知道是誰傳的。`counts` 是全部訊息的數量。","security":[{"apiKey":[]},{"oauth2":["inbox:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"status","in":"query","required":false,"schema":{"type":"string","example":"unread","enum":["all","unread","unreplied","replied","public"]},"description":"all 全部、unread 未讀、unreplied 未回覆、replied 已回覆、public 已公開"},{"name":"sender","in":"query","required":false,"schema":{"type":"string","example":"all","enum":["all","anonymous","named"]},"description":"all 全部、anonymous 匿名、named 具名"},{"name":"q","in":"query","required":false,"schema":{"type":"string","example":"開台"},"description":"關鍵字，比對訊息、回覆、具名觀眾的名稱，最多 100 字"},{"name":"from","in":"query","required":false,"schema":{"type":"string","example":"2026-11-01"},"description":"傳送日期從這天開始（YYYY-MM-DD）"},{"name":"to","in":"query","required":false,"schema":{"type":"string","example":"2026-11-30"},"description":"傳送日期到這天為止（YYYY-MM-DD）"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","example":20,"minimum":1,"maximum":100},"description":"一頁幾筆，1～100，預設 20"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","example":0,"minimum":0},"description":"從第幾筆開始，預設 0"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/InboxMessage"}},"total":{"type":"integer","example":1},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0},"counts":{"type":"object","properties":{"total":{"type":"integer","example":12},"unread":{"type":"integer","example":3},"unreplied":{"type":"integer","example":5},"public":{"type":"integer","example":2}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/inbox/{message}":{"get":{"tags":["觀眾訊息"],"summary":"讀一則觀眾訊息","description":"需要 `inbox:read`。共同管理的創作者要開「管理觀眾訊息」權限。\n\n讀取不會標成已讀，要標成已讀請用修改訊息送 `read: true`。","security":[{"apiKey":[]},{"oauth2":["inbox:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"message","in":"path","required":true,"schema":{"type":"string","example":"3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","format":"uuid"},"description":"訊息編號（UUID）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/InboxMessage"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"tags":["觀眾訊息"],"summary":"公開或標成已讀","description":"需要 `inbox:write`。共同管理的創作者要開「管理觀眾訊息」權限。\n\n`public` 是公開到創作者頁面（公開的訊息不會顯示傳訊息的人）或取消公開；`read` 只能是 true。","security":[{"apiKey":[]},{"oauth2":["inbox:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"message","in":"path","required":true,"schema":{"type":"string","example":"3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","format":"uuid"},"description":"訊息編號（UUID）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/InboxMessage"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"public":{"type":"boolean","description":"公開或取消公開","example":true},"read":{"type":"boolean","description":"標成已讀，只能是 true","example":true}}},"example":{"public":true}}}}},"delete":{"tags":["觀眾訊息"],"summary":"刪除觀眾訊息","description":"需要 `inbox:write`。共同管理的創作者要開「管理觀眾訊息」權限。\n\n傳訊息的觀眾在「我的訊息」會看到這則已被刪除。","security":[{"apiKey":[]},{"oauth2":["inbox:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"message","in":"path","required":true,"schema":{"type":"string","example":"3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","format":"uuid"},"description":"訊息編號（UUID）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"string","example":"3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"deleted":{"type":"boolean","example":true}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/inbox/{message}/reply":{"put":{"tags":["觀眾訊息"],"summary":"回覆觀眾訊息","description":"需要 `inbox:write`。共同管理的創作者要開「管理觀眾訊息」權限。\n\n有登入傳訊息的觀眾會收到通知。`reply` 是空字串或 null 會拿掉回覆。","security":[{"apiKey":[]},{"oauth2":["inbox:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"message","in":"path","required":true,"schema":{"type":"string","example":"3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","format":"uuid"},"description":"訊息編號（UUID）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/InboxMessage"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"reply":{"type":"string","description":"回覆（純文字），最多 2,000 字","example":"這週五晚上八點！","nullable":true}},"required":["reply"]},"example":{"reply":"這週五晚上八點！"}}}}}},"/{owner}/quiz/rounds":{"get":{"tags":["答題互動"],"summary":"這一場出過的題目","description":"需要 `live:read`。共同管理的創作者要開「管理答題互動」權限。\n\n最新的在前面，最多 100 題。還沒公布的題目 `answer`、`correct` 是 null。沒有進行中的場次時 `session_id` 是 null、`items` 是空的。","security":[{"apiKey":[]},{"oauth2":["live:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"session_id":{"type":"integer","nullable":true,"example":8},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":41},"seq":{"type":"integer","example":1},"mode":{"type":"string","enum":["chat","prediction"],"example":"chat"},"question_id":{"type":"integer","nullable":true,"example":15},"question":{"type":"string","example":"下列哪一部是吉卜力的作品？"},"options":{"type":"array","items":{"type":"string"},"example":["龍貓","你的名字","鬼滅之刃"]},"status":{"type":"string","example":"revealed","description":"open、closed、revealed、cancelled"},"answer":{"type":"integer","nullable":true,"example":0},"total":{"type":"integer","example":16},"correct":{"type":"integer","nullable":true,"example":12},"points":{"type":"integer","example":30}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/quiz/session":{"patch":{"tags":["答題互動"],"summary":"修改這一場","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n只送要改的欄位。`points` 的規則跟開始一場一樣，改了之後只影響還沒公布的題目。換 `mode` 要在目前這一題公布或取消之後。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":60,"example":"週五晚場"},"points":{"type":"integer","minimum":0,"maximum":100000,"example":50},"mode":{"type":"string","enum":["chat","prediction"],"example":"chat"}}},"example":{"points":50}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"allOf":[{"$ref":"#/components/schemas/LiveQuizState"},{"type":"object","properties":{"message":{"type":"string","example":"已更新"}}}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}}}},"/{owner}/quiz/cancel":{"post":{"tags":["答題互動"],"summary":"取消這一題","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n取消最新這一題，不算分、不發聊天室訊息。用 Twitch 預測的題目會一起取消預測，點數退回給觀眾。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"allOf":[{"$ref":"#/components/schemas/LiveQuizState"},{"type":"object","properties":{"message":{"type":"string","example":"這一題已取消，不算分"}}}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}}}},"/{owner}/quiz/view":{"put":{"tags":["答題互動"],"summary":"切換 OBS 畫面","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n`view` 是 round（題目）、board（本場排行）或 hidden（藏起來）。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["view"],"properties":{"view":{"type":"string","enum":["round","board","hidden"],"example":"board"}}},"example":{"view":"board"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"allOf":[{"$ref":"#/components/schemas/LiveQuizState"},{"type":"object","properties":{"message":{"type":"string","example":"OBS 畫面已切換"}}}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}}}},"/{owner}/quiz/prediction":{"get":{"tags":["答題互動"],"summary":"查詢頻道進行中的 Twitch 預測","description":"需要 `live:read`。共同管理的創作者要開「管理答題互動」權限。\n\n開始用 Twitch 預測的場次、或出題前可以先查。`available` 是現在能不能用 Twitch 預測出題，不能的話原因在 `message`；`prediction` 是頻道裡進行中或已鎖定的預測，沒有是 null。`from_quiz` 是 false 的預測會擋住出題，可以用 DELETE /{owner}/quiz/prediction/{prediction} 取消。每把金鑰每小時 120 次。","security":[{"apiKey":[]},{"oauth2":["live:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"available":{"type":"boolean","example":false},"message":{"type":"string","example":"頻道裡有一個進行中的 Twitch 預測「今晚會贏幾場？」，要先結束它才能用 Twitch 預測出題"},"prediction":{"allOf":[{"$ref":"#/components/schemas/QuizPrediction"}],"nullable":true}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/quiz/prediction/{prediction}":{"delete":{"tags":["答題互動"],"summary":"取消頻道裡別的 Twitch 預測","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n取消擋住出題的預測，下注的點數會退回給觀眾。答題互動自己建立的預測不能用這裡取消（回 409），請用 POST /{owner}/quiz/cancel 取消那一題。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"prediction","in":"path","required":true,"schema":{"type":"string","example":"1243456c-1e5b-4f8a-9b3d-0123456789ab"},"description":"預測的編號（GET /{owner}/quiz/prediction 的 prediction.id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"message":{"type":"string","example":"Twitch 預測已取消，點數已退回"},"id":{"type":"string","example":"1243456c-1e5b-4f8a-9b3d-0123456789ab"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/LiveUnavailable"}}}},"/{owner}/quiz/sets":{"get":{"tags":["答題互動"],"summary":"列出題庫","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n題庫裡有答案，所以讀取也要 `live:write`。題目內容請用 GET /{owner}/quiz/sets/{id}。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":2},"title":{"type":"string","example":"動漫題庫"},"points":{"type":"integer","example":30},"question_count":{"type":"integer","example":10}}}},"limits":{"type":"object","description":"上限","example":{"sets":50,"questions":100,"title":60,"question":200,"option":60,"option_min":2,"option_max":4,"time_limit":600,"points":100000,"batch":30}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"tags":["答題互動"],"summary":"新增題庫","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n最多 50 個題庫。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":60,"example":"動漫題庫","description":"名稱，新增時必填"},"points":{"type":"integer","minimum":0,"maximum":100000,"example":30,"description":"每答對一題送的機器人點數。要有 `points:write`，而且是創作者本人或有「Twitch 機器人設定」、「機器人點數」權限的共同管理人才會採用，不然是 0（修改時維持原本的）"}},"required":["title"]},"example":{"title":"動漫題庫","points":30}}}},"responses":{"201":{"description":"已建立","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/QuizSet"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/quiz/sets/{id}":{"get":{"tags":["答題互動"],"summary":"查詢題庫與題目","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":2},"description":"題庫編號（GET /{owner}/quiz/sets 的 items[].id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/QuizSet"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"tags":["答題互動"],"summary":"修改題庫","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n只送要改的欄位。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":2},"description":"題庫編號（GET /{owner}/quiz/sets 的 items[].id）"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":60,"example":"動漫題庫","description":"名稱，新增時必填"},"points":{"type":"integer","minimum":0,"maximum":100000,"example":30,"description":"每答對一題送的機器人點數。要有 `points:write`，而且是創作者本人或有「Twitch 機器人設定」、「機器人點數」權限的共同管理人才會採用，不然是 0（修改時維持原本的）"}}},"example":{"title":"動漫題庫（第二季）"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/QuizSet"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"tags":["答題互動"],"summary":"刪除題庫","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n題庫裡的題目一起刪掉，已經出過的題目紀錄不受影響。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":2},"description":"題庫編號（GET /{owner}/quiz/sets 的 items[].id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"integer","example":2},"deleted":{"type":"boolean","example":true}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/quiz/sets/{id}/questions":{"post":{"tags":["答題互動"],"summary":"新增題目","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n加在題庫最後面，一個題庫最多 100 題。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":2},"description":"題庫編號（GET /{owner}/quiz/sets 的 items[].id）"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"question":{"type":"string","maxLength":200,"example":"下列哪一部是吉卜力的作品？","description":"題目，新增時必填"},"options":{"type":"array","minItems":2,"maxItems":4,"items":{"type":"string","maxLength":60},"example":["龍貓","你的名字","鬼滅之刃"],"description":"2 到 4 個選項，新增時必填。不能重複，也不能只有一個英文字母（會跟 A／B／C／D 混在一起）"},"answer":{"type":"integer","minimum":0,"maximum":3,"example":0,"description":"正確答案在 options 裡的位置（0 是 A），新增時必填"},"time_limit":{"type":"integer","minimum":0,"maximum":600,"example":30,"description":"作答秒數，0 是不限時（Twitch 預測最短 30 秒、不限時是 30 分鐘）"},"show_live":{"type":"boolean","example":true,"description":"作答中在 OBS 即時顯示每個選項的人數"}},"required":["question","options","answer"]},"example":{"question":"下列哪一部是吉卜力的作品？","options":["龍貓","你的名字","鬼滅之刃"],"answer":0,"time_limit":30,"show_live":true}}}},"responses":{"201":{"description":"已建立","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/QuizQuestion"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/quiz/sets/{id}/questions/batch":{"post":{"tags":["答題互動"],"summary":"一次新增好幾題","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n一次最多 30 題，照順序加在題庫最後面。有任何一題格式不對就整批不新增，錯誤訊息會寫是第幾題。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":2},"description":"題庫編號（GET /{owner}/quiz/sets 的 items[].id）"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["questions"],"properties":{"questions":{"type":"array","minItems":1,"maxItems":30,"items":{"$ref":"#/components/schemas/QuizQuestionInput"}}}},"example":{"questions":[{"question":"下列哪一部是吉卜力的作品？","options":["龍貓","你的名字","鬼滅之刃"],"answer":0,"time_limit":30,"show_live":true},{"question":"下列哪一首是 YOASOBI 的歌？","options":["夜に駆ける","紅蓮華"],"answer":0}]}}}},"responses":{"201":{"description":"已建立","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"allOf":[{"$ref":"#/components/schemas/QuizSet"},{"type":"object","properties":{"added":{"type":"integer","example":2,"description":"這次新增了幾題"}}}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/LiveConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/quiz/sets/{id}/questions/order":{"put":{"tags":["答題互動"],"summary":"調整題目順序","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n`ids` 要剛好是這個題庫的每一題（不能重複也不能少），照出題的順序排。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":2},"description":"題庫編號（GET /{owner}/quiz/sets 的 items[].id）"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"integer"},"example":[16,15,17]}}},"example":{"ids":[16,15,17]}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/QuizSet"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/quiz/sets/{id}/questions/{question_id}":{"patch":{"tags":["答題互動"],"summary":"修改題目","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n只送要改的欄位；改了 `options` 要確認 `answer` 還在選項裡。已經出過的題目紀錄不受影響。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":2},"description":"題庫編號（GET /{owner}/quiz/sets 的 items[].id）"},{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","example":15},"description":"題目編號（題庫的 questions[].id）"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuizQuestionInput"},"example":{"answer":1}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/QuizQuestion"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"tags":["答題互動"],"summary":"刪除題目","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"},{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":2},"description":"題庫編號（GET /{owner}/quiz/sets 的 items[].id）"},{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","example":15},"description":"題目編號（題庫的 questions[].id）"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"integer","example":15},"deleted":{"type":"boolean","example":true}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/{owner}/quiz/settings":{"get":{"tags":["答題互動"],"summary":"查詢聊天室訊息設定","description":"需要 `live:read`。共同管理的創作者要開「管理答題互動」權限。\n\n出題、截止、公布答案、結束這一場時要不要在聊天室發訊息，以及訊息的內容。","security":[{"apiKey":[]},{"oauth2":["live:read"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/QuizSettings"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"tags":["答題互動"],"summary":"修改聊天室訊息設定","description":"需要 `live:write`。共同管理的創作者要開「管理答題互動」權限。\n\n`messages` 只送要改的時機，每個時機也只送要改的欄位（`on`、`style`、`pin`、`pin_sec`、`text`）。時機的名稱與可以用的參數見 GET 回傳的 `variables`。","security":[{"apiKey":[]},{"oauth2":["live:write"]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","example":"me"},"description":"`me` 是金鑰所屬的帳號；要操作共同管理的創作者時填對方的 UUID（對方要在「共同管理人」開給你對應的權限）。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["messages"],"properties":{"messages":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/QuizMessage"}}}},"example":{"messages":{"reveal":{"text":"答案是 {answer_letter}. {answer}，有 {correct} 位答對！","style":"announcepurple"},"close":{"on":true}}}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/QuizSettings"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"nk_...","description":"後台「帳號資料 / 平台 API」建立的金鑰"},"oauth2":{"type":"oauth2","description":"其他創作者授權給應用程式後拿到的 access token（nka_ 開頭）","flows":{"authorizationCode":{"authorizationUrl":"https://streamer.nekolive.net/oauth/authorize","tokenUrl":"https://platform-api.nekolive.net/oauth/token","refreshUrl":"https://platform-api.nekolive.net/oauth/token","scopes":{"orders:read":"讀取收款紀錄","posts:read":"讀取貼文","posts:write":"發布與管理貼文","live:read":"讀取直播中的狀態","live:write":"直播中的即時操作","profile:read":"讀取創作者頁面資料","profile:write":"管理創作者頁面資料","progress:read":"讀取進度條","progress:write":"修改進度條","bot:read":"讀取聊天室指令","bot:write":"管理聊天室指令","points:read":"讀取機器人點數","points:write":"調整機器人點數","members:read":"讀取會員訂閱","stats:read":"讀取統計","store:read":"讀取商店訂單","store:write":"處理商店訂單","crowdfunding:read":"讀取募資","inbox:read":"讀取觀眾訊息","inbox:write":"回覆觀眾訊息","webhooks:write":"事件通知"}}}}},"schemas":{"KeyInfo":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","example":"9d653750-4f97-4605-e6a6-facd64d9b38f"},"type":{"type":"string","enum":["key","oauth"],"description":"key 是 API 金鑰，oauth 是應用程式授權"},"scopes":{"type":"array","items":{"type":"string"},"example":["orders:read","posts:write"]},"key":{"type":"object","description":"API 金鑰才有","properties":{"id":{"type":"integer","example":2},"name":{"type":"string","example":"讀取收款紀錄、發布與管理貼文"}}},"app":{"type":"object","description":"應用程式授權才有","nullable":true,"properties":{"id":{"type":"integer","example":10},"name":{"type":"string","example":"開台小幫手"}}}}},"Order":{"type":"object","properties":{"order_id":{"type":"string","description":"平台訂單編號","example":"NEKOLIVE-ABCDEFGH-ABCDEFGHI"},"gateway_trade_no":{"type":"string","nullable":true,"description":"金流的交易編號，對帳用","example":"2611011200001234"},"type":{"type":"string","enum":["donate","tip"],"description":"donate 是斗內，tip 是小費","example":"donate"},"tip":{"type":"object","nullable":true,"description":"小費才有。kind：once 單次、first 定期定額的第一筆、renew 定期定額之後的扣款","properties":{"kind":{"type":"string","enum":["once","first","renew"],"example":"renew"}},"example":null},"amount":{"type":"integer","description":"訂單金額","example":150},"currency":{"type":"string","description":"幣別","example":"TWD"},"fee":{"type":"number","nullable":true,"description":"金流手續費","example":4},"net_amount":{"type":"number","nullable":true,"description":"扣掉金流手續費後的金額","example":146},"platform_fee":{"type":"integer","nullable":true,"description":"這筆訂單的平台費用","example":0},"nickname":{"type":"string","description":"斗內暱稱，匿名斗內是「匿名」","example":"路過的貓"},"is_anonymous":{"type":"boolean","description":"是不是匿名斗內。匿名時 user_id、user_name、avatar、viewer 一律是 null","example":false},"message":{"type":"string","description":"斗內留言","example":"今天的歌好好聽"},"has_secret_message":{"type":"boolean","description":"有沒有只給創作者看的悄悄話（內容不會透過 API 提供）","example":false},"user_id":{"type":"string","nullable":true,"description":"斗內時登入的帳號 ID，匿名斗內是 null","example":"12345678"},"user_name":{"type":"string","nullable":true,"description":"斗內時登入的帳號名稱","example":"路過的貓"},"avatar":{"type":"string","nullable":true,"description":"斗內時登入的帳號頭貼","example":"https://example.com/avatar.png"},"viewer":{"type":"object","nullable":true,"description":"有對應到 Nekolive 觀眾帳號時才有","properties":{"display_name":{"type":"string","nullable":true,"example":"路過的貓"},"avatar":{"type":"string","nullable":true,"example":"https://user.nekolive.net/assets/images/avatar/abc.webp"}}},"platform":{"type":"string","description":"付款金流","example":"PAYUNi"},"payment_method":{"type":"string","nullable":true,"description":"付款方式（金流回傳的代號）","example":"Credit"},"progress_number":{"type":"string","description":"算進哪一條進度條（進度條的 key），跟 progress.key 一樣","example":"main"},"progress":{"type":"object","nullable":true,"properties":{"key":{"type":"string","example":"main"},"title":{"type":"string","nullable":true,"example":"新麥克風基金"}}},"media":{"type":"object","nullable":true,"description":"有點播影片時才有，start、end 是播放的秒數範圍（0 是沒有限制）","properties":{"url":{"type":"string","example":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"},"title":{"type":"string","nullable":true,"example":"影片標題"},"platform":{"type":"string","nullable":true,"example":"youtube"},"start":{"type":"integer","example":0},"end":{"type":"integer","example":0}}},"live_song":{"type":"object","nullable":true,"description":"有點歌時才有","properties":{"keyword":{"type":"string","example":"夜に駆ける"},"artist":{"type":"string","nullable":true,"example":"YOASOBI"}}},"wish":{"type":"object","nullable":true,"description":"有選願望清單時才有","properties":{"id":{"type":"integer","example":12},"title":{"type":"string","example":"新的電競椅"}}},"earned_points":{"type":"integer","nullable":true,"description":"這筆斗內得到的斗內點數","example":15},"bot_earned_points":{"type":"integer","nullable":true,"description":"這筆斗內得到的機器人點數","example":150},"leaderboard":{"type":"object","properties":{"hidden":{"type":"boolean","description":"不算進排行榜","example":false},"name":{"type":"string","nullable":true,"description":"排行榜上用的名稱，null 是用斗內暱稱","example":null}}},"invoice_no":{"type":"string","nullable":true,"description":"電子發票號碼","example":null},"remark":{"type":"string","nullable":true,"description":"創作者在收款列表寫的備註","example":null},"is_test":{"type":"boolean","description":"是不是測試訂單","example":false},"paid_at":{"type":"string","format":"date-time","nullable":true,"description":"金流回傳的付款時間","example":"2026-11-01T04:00:12.000Z"},"created_at":{"type":"string","format":"date-time","description":"訂單建立時間","example":"2026-11-01T04:00:00.000Z"}}},"Pagination":{"type":"object","properties":{"page":{"type":"integer","example":1},"limit":{"type":"integer","example":10},"total":{"type":"integer","example":25},"totalPages":{"type":"integer","example":3}}},"OrderListResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}},"OrderResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Order"}}},"Post":{"type":"object","properties":{"id":{"type":"integer","example":123},"url":{"type":"string","example":"https://user.nekolive.net/post/123","description":"觀眾看到的網址（知道連結的人可見的貼文會帶 ?k=）"},"content_html":{"type":"string","description":"轉好的內容 HTML","example":"<p>今晚 8 點開台！</p>"},"excerpt":{"type":"string","description":"純文字摘要","example":"今晚 8 點開台！"},"visibility":{"type":"string","enum":["public","login","follower","mutual","unlisted","private"],"example":"public"},"comment_scope":{"type":"string","enum":["all","follower","none"],"example":"all"},"pinned":{"type":"boolean","example":false},"hidden":{"type":"boolean","description":"隱藏（觀眾看不到）","example":false},"tags":{"type":"array","items":{"type":"string"},"example":["開台"]},"images":{"type":"array","items":{"type":"string","format":"uri"},"example":["https://assets.nekolive.net/posts/202611/3f9c0d2b7a1e4c5d8b6a9f0e1d2c3b4a.png"]},"video":{"type":"object","nullable":true,"properties":{"src":{"type":"string"},"poster":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}},"example":null},"article":{"type":"object","nullable":true,"description":"部落格文章才有","properties":{"title":{"type":"string"},"url":{"type":"string"}},"example":null},"comment_count":{"type":"integer","example":3},"reaction_count":{"type":"integer","example":12},"created_at":{"type":"string","format":"date-time","example":"2026-11-01T12:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-11-01T12:00:00.000Z"},"content_text":{"type":"string","nullable":true,"description":"內容的 Markdown 文字，編輯時可以拿來改（部落格文章是 null）","example":"今晚 8 點開台！"},"attachment":{"type":"object","nullable":true,"description":"附加內容，格式跟發文時送的一樣","properties":{"type":{"type":"string","enum":["youtube","twitch","event","form","store_item","membership","commission_item","portfolio","blessing","commission"]},"url":{"type":"string"},"id":{"type":"integer"}},"example":{"type":"event","id":42}},"poll":{"type":"object","nullable":true,"description":"投票，沒有是 null","properties":{"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"text":{"type":"string"},"image":{"type":"string","nullable":true},"votes":{"type":"integer"}}}},"multiple":{"type":"boolean"},"anonymous":{"type":"boolean"},"hide_results":{"type":"boolean"},"allow_unvote":{"type":"boolean"},"ends_at":{"type":"string","format":"date-time","nullable":true},"closed":{"type":"boolean"},"voters":{"type":"integer","description":"投票的人數"},"locked":{"type":"boolean","description":"已經有人投票，選項、複選、匿名不能再改"}},"example":{"options":[{"id":7,"text":"恐怖遊戲","image":null,"votes":12},{"id":8,"text":"音樂遊戲","image":null,"votes":5}],"multiple":false,"anonymous":false,"hide_results":false,"allow_unvote":true,"ends_at":"2026-12-01T12:00:00.000Z","closed":false,"voters":17,"locked":true}},"link_preview":{"type":"string","nullable":true,"example":"auto","description":"auto、none 或指定的連結網址；連結預覽還沒開放時是 null"},"comment_images":{"type":"boolean","example":false,"description":"留言可以放圖片"}}},"PostCreate":{"type":"object","additionalProperties":false,"properties":{"content":{"type":"string","maxLength":10000,"description":"貼文內容，格式跟發文框一樣（粗體、連結、清單等 Markdown 寫法）。內容、圖片、影片、附加內容、投票至少要有一項。","example":"今晚 8 點開台！\n\n**這次玩新遊戲**"},"visibility":{"type":"string","enum":["public","login","follower","mutual","unlisted","private"],"default":"public","description":"public 所有人、login 登入的使用者、follower 追隨者、mutual 互相追隨、unlisted 知道連結的人、private 只有自己"},"comment_scope":{"type":"string","enum":["all","follower","none"],"default":"all","description":"all 所有人可以留言、follower 只有追隨者、none 不開放留言"},"tags":{"type":"array","maxItems":5,"items":{"type":"string","maxLength":16},"example":["開台"]},"images":{"type":"array","maxItems":4,"items":{"type":"string","format":"uri"},"description":"自己檔案空間裡的圖片網址，或用 `POST /{owner}/images` 上傳拿到的網址"},"video":{"type":"string","format":"uri","description":"影片空間裡上傳好的影片網址"},"pinned":{"type":"boolean","default":false,"description":"置頂（會取消原本置頂的貼文）"},"attachment":{"type":"object","nullable":true,"additionalProperties":false,"description":"附加內容，一篇一個。youtube、twitch 是影片或頻道（給 url），commission 是委託頁面（只給 type），其他給 id：event 直播行事曆活動、form 觀眾表單、store_item 商店商品、membership 會員方案、commission_item 委託品項、portfolio 作品集的作品、blessing 祝福牆。只能附加自己的項目，成人向與不公開的不行。修改時給 null 是拿掉","properties":{"type":{"type":"string","enum":["youtube","twitch","event","form","store_item","membership","commission_item","portfolio","blessing","commission"]},"url":{"type":"string","maxLength":500},"id":{"type":"integer"}},"example":{"type":"event","id":42}},"poll":{"type":"object","nullable":true,"additionalProperties":false,"description":"投票。新增時要有 options；修改時只送要改的欄位。已經有人投票之後 options、multiple、anonymous 不能改（回 409），hide_results、allow_unvote、ends_at、closed 照樣可以改。修改時給 null 是拿掉投票（投過的票一起刪掉）","properties":{"options":{"type":"array","minItems":2,"maxItems":10,"items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"integer","description":"修改時沿用原本的選項就帶它的 id（投票數會留著），沒帶是新的選項"},"text":{"type":"string","maxLength":80},"image":{"type":"string","format":"uri","nullable":true,"description":"自己檔案空間或用 POST /{owner}/images 上傳的圖片"}}}},"multiple":{"type":"boolean","description":"可以複選"},"anonymous":{"type":"boolean","description":"不公開誰投了什麼"},"hide_results":{"type":"boolean","description":"投票結束前不顯示結果"},"allow_unvote":{"type":"boolean","description":"可以取消投票"},"ends_at":{"type":"string","format":"date-time","nullable":true,"description":"截止時間（ISO 8601），null 是不設截止時間"},"closed":{"type":"boolean","description":"手動結束或重新開放投票，只能用在已經有投票的貼文"}},"example":{"options":[{"text":"恐怖遊戲"},{"text":"音樂遊戲"}],"ends_at":"2026-12-01T20:00:00+08:00"}},"link_preview":{"type":"string","example":"auto","description":"連結預覽：auto 是內文第一個可以預覽的連結（預設）、none 是不顯示，或給內文裡的某個連結網址（程式碼、`<網址>` 寫法、影片與音效的連結不算）"},"comment_images":{"type":"boolean","example":false,"description":"留言可以放圖片"}}},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"錯誤訊息"}}},"PostUpdate":{"type":"object","additionalProperties":false,"properties":{"content":{"type":"string","maxLength":10000,"description":"貼文內容，格式跟發文框一樣（粗體、連結、清單等 Markdown 寫法）。內容、圖片、影片、附加內容、投票至少要有一項。","example":"今晚 8 點開台！\n\n**這次玩新遊戲**"},"visibility":{"type":"string","enum":["public","login","follower","mutual","unlisted","private"],"description":"public 所有人、login 登入的使用者、follower 追隨者、mutual 互相追隨、unlisted 知道連結的人、private 只有自己"},"comment_scope":{"type":"string","enum":["all","follower","none"],"description":"all 所有人可以留言、follower 只有追隨者、none 不開放留言"},"tags":{"type":"array","maxItems":5,"items":{"type":"string","maxLength":16},"example":["開台"]},"images":{"type":"array","maxItems":4,"items":{"type":"string","format":"uri"},"description":"自己檔案空間裡的圖片網址，或用 `POST /{owner}/images` 上傳拿到的網址"},"video":{"type":"string","format":"uri","description":"影片空間裡上傳好的影片網址","nullable":true},"pinned":{"type":"boolean","description":"置頂（會取消原本置頂的貼文）"},"attachment":{"type":"object","nullable":true,"additionalProperties":false,"description":"附加內容，一篇一個。youtube、twitch 是影片或頻道（給 url），commission 是委託頁面（只給 type），其他給 id：event 直播行事曆活動、form 觀眾表單、store_item 商店商品、membership 會員方案、commission_item 委託品項、portfolio 作品集的作品、blessing 祝福牆。只能附加自己的項目，成人向與不公開的不行。修改時給 null 是拿掉","properties":{"type":{"type":"string","enum":["youtube","twitch","event","form","store_item","membership","commission_item","portfolio","blessing","commission"]},"url":{"type":"string","maxLength":500},"id":{"type":"integer"}},"example":{"type":"event","id":42}},"poll":{"type":"object","nullable":true,"additionalProperties":false,"description":"投票。新增時要有 options；修改時只送要改的欄位。已經有人投票之後 options、multiple、anonymous 不能改（回 409），hide_results、allow_unvote、ends_at、closed 照樣可以改。修改時給 null 是拿掉投票（投過的票一起刪掉）","properties":{"options":{"type":"array","minItems":2,"maxItems":10,"items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"integer","description":"修改時沿用原本的選項就帶它的 id（投票數會留著），沒帶是新的選項"},"text":{"type":"string","maxLength":80},"image":{"type":"string","format":"uri","nullable":true,"description":"自己檔案空間或用 POST /{owner}/images 上傳的圖片"}}}},"multiple":{"type":"boolean","description":"可以複選"},"anonymous":{"type":"boolean","description":"不公開誰投了什麼"},"hide_results":{"type":"boolean","description":"投票結束前不顯示結果"},"allow_unvote":{"type":"boolean","description":"可以取消投票"},"ends_at":{"type":"string","format":"date-time","nullable":true,"description":"截止時間（ISO 8601），null 是不設截止時間"},"closed":{"type":"boolean","description":"手動結束或重新開放投票，只能用在已經有投票的貼文"}},"example":{"options":[{"text":"恐怖遊戲"},{"text":"音樂遊戲"}],"ends_at":"2026-12-01T20:00:00+08:00"}},"link_preview":{"type":"string","example":"auto","description":"連結預覽：auto 是內文第一個可以預覽的連結（預設）、none 是不顯示，或給內文裡的某個連結網址（程式碼、`<網址>` 寫法、影片與音效的連結不算）"},"comment_images":{"type":"boolean","example":false,"description":"留言可以放圖片"},"hidden":{"type":"boolean","example":false,"description":"隱藏（觀眾看不到）"}},"description":"只送要修改的欄位，沒送的維持原樣。images 會整組換掉，原本這篇的圖片可以照樣放回去；video 給 null 是拿掉影片；attachment、poll 給 null 是拿掉。部落格文章不能用 API 改；引用了別篇的貼文可以改，但引用不能換或拿掉。"},"ImageUpload":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"放進貼文 images 用的網址","example":"https://assets.nekolive.net/posts/202611/3f9c0d2b7a1e4c5d8b6a9f0e1d2c3b4a.png"},"width":{"type":"integer","example":1280},"height":{"type":"integer","example":720},"type":{"type":"string","example":"image/png"},"expires_at":{"type":"string","format":"date-time","description":"這個時間之前沒拿去發文就會被刪掉","example":"2026-11-02T12:00:00.000Z"}}},"TokenRequest":{"type":"object","required":["grant_type"],"properties":{"grant_type":{"type":"string","enum":["authorization_code","refresh_token"],"description":"用授權碼換 token，或用 refresh_token 換新的"},"code":{"type":"string","description":"授權頁導回來帶的 code（grant_type 是 authorization_code 時必填）","example":"nkc_xxxxxxxx"},"redirect_uri":{"type":"string","description":"要跟授權時用的回呼網址一模一樣（authorization_code 必填）","example":"https://example.com/callback"},"code_verifier":{"type":"string","description":"PKCE 的 code_verifier（authorization_code 必填）","example":"dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"},"refresh_token":{"type":"string","description":"grant_type 是 refresh_token 時必填","example":"nkr_xxxxxxxx"},"scope":{"type":"string","description":"refresh 時可以縮小權限，用空白分開，不能比原本的多"},"client_id":{"type":"string","description":"沒有用 Basic 驗證時放這裡","example":"nkapp_xxxxxxxx"},"client_secret":{"type":"string","description":"一般應用程式要帶（或用 Basic 驗證），公開用戶端不用","example":"nks_xxxxxxxx"}}},"TokenResponse":{"type":"object","properties":{"access_token":{"type":"string","example":"nka_xxxxxxxx"},"token_type":{"type":"string","example":"Bearer"},"expires_in":{"type":"integer","example":3600,"description":"access_token 幾秒後過期"},"refresh_token":{"type":"string","example":"nkr_xxxxxxxx"},"scope":{"type":"string","example":"orders:read posts:write"}}},"OauthError":{"type":"object","properties":{"error":{"type":"string","example":"invalid_grant"},"error_description":{"type":"string","example":"authorization code has expired"}}},"RevokeRequest":{"type":"object","required":["token"],"properties":{"token":{"type":"string","description":"要作廢的 access_token 或 refresh_token","example":"nkr_xxxxxxxx"},"client_id":{"type":"string","example":"nkapp_xxxxxxxx"},"client_secret":{"type":"string","description":"一般應用程式要帶","example":"nks_xxxxxxxx"}}},"Webhook":{"type":"object","properties":{"id":{"type":"integer","example":3},"url":{"type":"string","example":"https://example.com/nekolive/webhook"},"events":{"type":"array","items":{"type":"string","enum":["twitch.follow","twitch.subscribe","twitch.resub","twitch.subgift","twitch.cheer","twitch.raid","twitch.redeem","twitch.watch_streak","twitch.hype_train_begin","twitch.hype_train_end","twitch.stream_online","twitch.stream_offline","twitch.channel_update","twitch.vip_add","twitch.vip_remove","twitch.ad_break_begin","platform.follow","platform.signin","platform.achievement_unlock","platform.media_request","platform.song_request","platform.timer_adjust","platform.youtube_live","platform.youtube_video","platform.donate","platform.tip","platform.crowdfund_pledge","platform.crowdfund_goal","platform.shop_order","platform.membership_join","platform.membership_content","platform.inbox_message","platform.post_publish","platform.blessing","platform.stream_summary"]},"example":["platform.donate","twitch.follow"]},"description":{"type":"string","example":"開台小幫手"},"secret_hint":{"type":"string","description":"簽章密鑰的最後 4 碼","example":"…a1B2"},"active":{"type":"boolean","description":"會不會送出。連續失敗太多次會自動停用","example":true},"disabled_reason":{"type":"string","nullable":true,"example":null},"fail_streak":{"type":"integer","description":"連續送出失敗的次數","example":0},"last_success_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-11-05T04:00:00.000Z"},"last_failure_at":{"type":"string","format":"date-time","nullable":true,"example":null},"created_at":{"type":"string","format":"date-time","example":"2026-11-05T03:00:00.000Z"}}},"WebhookCreate":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","description":"接收事件的網址，要用 https、443 連接埠，不能是內部網路或 Nekolive 自己的網址","example":"https://example.com/nekolive/webhook"},"events":{"type":"array","items":{"type":"string","enum":["twitch.follow","twitch.subscribe","twitch.resub","twitch.subgift","twitch.cheer","twitch.raid","twitch.redeem","twitch.watch_streak","twitch.hype_train_begin","twitch.hype_train_end","twitch.stream_online","twitch.stream_offline","twitch.channel_update","twitch.vip_add","twitch.vip_remove","twitch.ad_break_begin","platform.follow","platform.signin","platform.achievement_unlock","platform.media_request","platform.song_request","platform.timer_adjust","platform.youtube_live","platform.youtube_video","platform.donate","platform.tip","platform.crowdfund_pledge","platform.crowdfund_goal","platform.shop_order","platform.membership_join","platform.membership_content","platform.inbox_message","platform.post_publish","platform.blessing","platform.stream_summary"]},"description":"要收的事件，每個事件都要有對應的權限（見上方說明）","example":["platform.donate","twitch.follow"]},"description":{"type":"string","description":"自己看的備註，最多 100 個字","example":"開台小幫手"}}},"WebhookUpdate":{"type":"object","properties":{"url":{"type":"string","description":"接收事件的網址，要用 https，不能是內部網路或 Nekolive 自己的網址","example":"https://example.com/nekolive/webhook"},"events":{"type":"array","items":{"type":"string","enum":["twitch.follow","twitch.subscribe","twitch.resub","twitch.subgift","twitch.cheer","twitch.raid","twitch.redeem","twitch.watch_streak","twitch.hype_train_begin","twitch.hype_train_end","twitch.stream_online","twitch.stream_offline","twitch.channel_update","twitch.vip_add","twitch.vip_remove","twitch.ad_break_begin","platform.follow","platform.signin","platform.achievement_unlock","platform.media_request","platform.song_request","platform.timer_adjust","platform.youtube_live","platform.youtube_video","platform.donate","platform.tip","platform.crowdfund_pledge","platform.crowdfund_goal","platform.shop_order","platform.membership_join","platform.membership_content","platform.inbox_message","platform.post_publish","platform.blessing","platform.stream_summary"]},"description":"要收的事件，每個事件都要有對應的權限（見上方說明）","example":["platform.donate","twitch.follow"]},"description":{"type":"string","description":"自己看的備註，最多 100 個字","example":"開台小幫手"},"active":{"type":"boolean","description":"false 暫停送出；true 重新啟用（連續失敗的次數會歸零）","example":true}}},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"integer","description":"送出編號，跟 Nekolive-Delivery 標頭一樣","example":1024},"event":{"type":"string","example":"platform.donate"},"status":{"type":"string","enum":["pending","delivered","failed"],"example":"delivered"},"attempts":{"type":"integer","example":1},"response_status":{"type":"integer","nullable":true,"example":200},"error":{"type":"string","nullable":true,"example":null},"created_at":{"type":"string","format":"date-time","example":"2026-11-05T04:00:00.000Z"},"delivered_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-11-05T04:00:01.000Z"},"next_attempt_at":{"type":"string","format":"date-time","nullable":true,"example":null}}},"WebhookEvent":{"type":"object","description":"送到網址的內容（POST，JSON）","properties":{"id":{"type":"string","description":"事件編號，同一個事件重送時一樣，可以拿來去除重複","example":"evt_88213"},"event":{"type":"string","example":"platform.donate"},"created_at":{"type":"string","format":"date-time","example":"2026-11-05T04:00:00.000Z"},"owner":{"type":"string","description":"創作者 UUID","example":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"},"data":{"type":"object","description":"user 是觸發的人（匿名時是 null），其他欄位依事件而定","example":{"user":{"id":"123456","login":"xiaoming","name":"小明"},"amount":150,"currency":"TWD","message":"今天的歌好好聽","platform":"PAYUNi","is_anonymous":false}}}},"LiveQuizState":{"type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"integer","example":8},"set_id":{"type":"integer","example":2,"nullable":true,"description":"用的題庫，沒有用題庫是 null"},"title":{"type":"string","example":"動漫題庫"},"mode":{"type":"string","enum":["chat","prediction"],"example":"chat","description":"作答方式：chat 是在聊天室輸入 A／B／C／D 作答，prediction 是用 Twitch 預測下注（沒有本場排行，也不發機器人點數）"},"points":{"type":"integer","example":30},"view":{"type":"string","example":"round","description":"OBS 顯示的畫面：round 題目、board 本場排行、hidden 藏起來"},"rounds":{"type":"integer","example":1},"set_total":{"type":"integer","example":10,"nullable":true},"started_at":{"type":"string","example":"2026-11-04T12:00:00.000Z"}},"nullable":true},"round":{"type":"object","properties":{"id":{"type":"integer","example":41},"seq":{"type":"integer","example":1},"question_id":{"type":"integer","example":15,"nullable":true},"question":{"type":"string","example":"下列哪一部是吉卜力的作品？"},"options":{"type":"array","items":{"type":"string","example":"龍貓"}},"status":{"type":"string","example":"open"},"answer":{"type":"integer","example":0},"counts":{"type":"array","items":{"type":"integer","example":12}},"point_counts":{"type":"array","nullable":true,"items":{"type":"integer","example":3200},"description":"Twitch 預測的場次才有：每個選項下注的忠誠點數，順序跟 options 一樣"},"total":{"type":"integer","example":16},"total_points":{"type":"integer","nullable":true,"example":15400,"description":"Twitch 預測的場次才有：下注的總點數"},"correct":{"type":"integer","example":12},"points":{"type":"integer","example":30},"show_live":{"type":"boolean","example":true},"time_limit":{"type":"integer","example":30},"opened_at":{"type":"string","example":"2026-11-04T12:01:00.000Z"},"closes_at":{"type":"string","example":"2026-11-04T12:01:30.000Z","nullable":true},"mode":{"type":"string","enum":["chat","prediction"],"example":"chat","description":"這一題的作答方式"},"prediction":{"type":"object","nullable":true,"example":null,"description":"用 Twitch 預測的題目才有：預測的編號、在 Twitch 上的狀態，同步失敗時 error 是原因","properties":{"id":{"type":"string"},"status":{"type":"string"},"error":{"type":"string"}}}},"nullable":true},"board":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer","example":1},"name":{"type":"string","example":"小明"},"login":{"type":"string","example":"xiaoming"},"correct":{"type":"integer","example":3},"points":{"type":"integer","example":90}}}},"players":{"type":"integer","example":16},"next_question":{"type":"object","properties":{"id":{"type":"integer","example":16},"question":{"type":"string","example":"下列哪一首是 YOASOBI 的歌？"}},"nullable":true},"sets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":2},"title":{"type":"string","example":"動漫題庫"},"points":{"type":"integer","example":30},"question_count":{"type":"integer","example":10}}}}}},"LiveCounter":{"type":"object","properties":{"id":{"type":"integer","example":3},"name":{"type":"string","example":"死亡次數"},"unit":{"type":"string","example":"次"},"value":{"type":"integer","example":12},"goal":{"type":"integer","example":100},"percent":{"type":"integer","example":12,"nullable":true},"reset_mode":{"type":"string","example":"stream"},"reset_value":{"type":"integer","example":0},"updated_at":{"type":"string","example":"2026-11-04T12:00:00.000Z"}}},"LiveCounterList":{"type":"object","properties":{"counters":{"type":"array","items":{"$ref":"#/components/schemas/LiveCounter"}}}},"LiveCounterResult":{"type":"object","properties":{"counter":{"$ref":"#/components/schemas/LiveCounter"},"message":{"type":"string","example":"「死亡次數」目前是 13 次"}}},"BlogArticle":{"type":"object","properties":{"id":{"type":"integer","example":12},"post_id":{"type":"integer","example":340,"nullable":true},"status":{"type":"string","example":"published"},"title":{"type":"string","example":"我的配信設備大公開"},"slug":{"type":"string","example":"my-setup"},"summary":{"type":"string","example":"整理了這幾年用過的麥克風與燈光"},"cover":{"type":"string","example":"https://widgets.nekolive.net/UserAssets/0e2b8c1a-7f3d-4c55-9a61-2f4a0b6c9d11/cover.webp"},"visibility":{"type":"string","example":"public"},"tags":{"type":"array","items":{"type":"string","example":"設備"}},"comment_scope":{"type":"string","example":"all"},"toc":{"type":"boolean","example":true},"series_id":{"type":"integer","nullable":true,"example":null},"featured":{"type":"boolean","example":false},"hidden":{"type":"boolean","example":false},"password_set":{"type":"boolean","example":false},"password_listed":{"type":"boolean","example":true},"password_hint":{"type":"string","example":""},"read_minutes":{"type":"integer","example":4},"url":{"type":"string","example":"https://user.nekolive.net/creator/alice/blog/my-setup","nullable":true},"scheduled_at":{"type":"string","nullable":true,"example":null},"last_error":{"type":"string","nullable":true,"example":null},"published_at":{"type":"string","example":"2026-11-04T12:00:00.000Z","nullable":true},"updated_at":{"type":"string","example":"2026-11-04T12:30:00.000Z"},"comment_count":{"type":"integer","example":3},"reaction_count":{"type":"integer","example":18},"content":{"type":"string","example":"## 麥克風\n\n目前用的是…\n\n![桌面](https://widgets.nekolive.net/UserAssets/0e2b8c1a-7f3d-4c55-9a61-2f4a0b6c9d11/desk.webp \"現在的桌面\")","description":"內文（Markdown 原文），只有讀單篇、新增、修改、發布的回應才有"}}},"BlogArticleInput":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","description":"標題，最多 80 字；發布時必填","example":"我的配信設備大公開"},"summary":{"type":"string","description":"摘要，最多 200 字，留空是從內文擷取","example":"整理了這幾年用過的麥克風與燈光"},"slug":{"type":"string","description":"網址代稱，英文字母、數字和 -，留空是文章編號","example":"my-setup"},"cover":{"type":"string","description":"封面，只能用自己檔案空間或用 API 上傳（POST /{owner}/images）的圖片，空字串是拿掉","example":"https://widgets.nekolive.net/UserAssets/0e2b8c1a-7f3d-4c55-9a61-2f4a0b6c9d11/cover.webp"},"content":{"type":"string","description":"內文（Markdown），最多 30,000 字。一行一張圖片 `![替代文字](網址 \"說明\")`，圖片規則跟封面一樣","example":"## 麥克風\n\n目前用的是…"},"visibility":{"type":"string","description":"公開範圍","example":"public","enum":["public","login","follower","mutual","unlisted","private","password"]},"tags":{"type":"array","description":"標籤，最多 5 個、每個最多 16 字","example":["設備"],"items":{"type":"string","example":"設備"}},"comment_scope":{"type":"string","description":"誰可以留言","example":"all","enum":["all","follower","none"]},"toc":{"type":"boolean","description":"顯示文章目錄","example":true},"series_id":{"type":"integer","description":"系列編號，null 是不放進系列","example":3,"nullable":true},"featured":{"type":"boolean","description":"精選文章（最多 3 篇）","example":false},"password":{"type":"string","description":"visibility 是 password 時的密碼，4～64 字；不改密碼就不要送","example":"neko1234"},"password_listed":{"type":"boolean","description":"需要密碼的文章要不要列在部落格列表","example":true},"password_hint":{"type":"string","description":"密碼提示，最多 100 字","example":""}}},"ThanksItem":{"type":"object","properties":{"id":{"type":"integer","example":8},"kind":{"type":"string","example":"donate"},"name":{"type":"string","example":"小明"},"anonymous":{"type":"boolean","example":false},"title":{"type":"string","example":"生日禮物"},"message":{"type":"string","example":"謝謝你的支持！"},"images":{"type":"array","items":{"type":"string","example":"https://widgets.nekolive.net/UserAssets/0e2b8c1a-7f3d-4c55-9a61-2f4a0b6c9d11/gift.webp"}},"amount":{"type":"integer","example":500,"nullable":true},"amount_label":{"type":"string","example":"NT$ 500"},"show_amount":{"type":"boolean","example":true},"happened_on":{"type":"string","example":"2026-10-01","nullable":true},"source":{"type":"string","example":"manual"},"linked":{"type":"boolean","example":true},"twitch_login":{"type":"string","example":"xiaoming","nullable":true},"pinned":{"type":"boolean","example":false},"hidden":{"type":"boolean","example":false}}},"ThanksInput":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","description":"類型：gift 禮物、donate 斗內、tip 小費、subscribe 訂閱、gift_sub 贈送訂閱、bits 小奇點、other 其他","example":"donate","enum":["gift","donate","tip","subscribe","gift_sub","bits","other"]},"name":{"type":"string","description":"要感謝的人，最多 32 字；新增時必填","example":"小明"},"title":{"type":"string","description":"感謝什麼，最多 60 字","example":"生日禮物"},"message":{"type":"string","description":"感謝的話（純文字，可以換行），最多 1,000 字","example":"謝謝你的支持！"},"images":{"type":"array","description":"圖片，最多 4 張，只能用自己檔案空間的網址","example":["https://widgets.nekolive.net/UserAssets/0e2b8c1a-7f3d-4c55-9a61-2f4a0b6c9d11/gift.webp"],"items":{"type":"string","example":"https://widgets.nekolive.net/UserAssets/0e2b8c1a-7f3d-4c55-9a61-2f4a0b6c9d11/gift.webp"}},"amount":{"type":"integer","description":"金額或數量（只有斗內、小費、訂閱、贈送訂閱、小奇點可以填），null 是不填","example":500,"nullable":true},"show_amount":{"type":"boolean","description":"在創作者頁面顯示金額或數量","example":true},"happened_on":{"type":"string","description":"日期 YYYY-MM-DD，null 是不填","example":"2026-10-01","nullable":true},"twitch_login":{"type":"string","description":"觀眾的 Twitch 帳號，填了觀眾登入後看得到自己被感謝","example":"xiaoming"},"pinned":{"type":"boolean","description":"置頂","example":false},"hidden":{"type":"boolean","description":"不顯示在創作者頁面","example":false}}},"MilestoneItem":{"type":"object","properties":{"id":{"type":"integer","example":4},"date":{"type":"string","example":"2025-05-01"},"time":{"type":"string","example":"20:30","nullable":true},"title":{"type":"string","example":"第一次開台"},"content":{"type":"string","example":"緊張到忘記開麥克風"},"url":{"type":"string","example":"https://www.twitch.tv/videos/123456789"},"hidden":{"type":"boolean","example":false},"images":{"type":"array","maxItems":4,"items":{"type":"string","format":"uri"},"example":["https://assets.nekolive.net/files/aaaa/3f9c0d2b7a1e/first-stream.webp"],"description":"圖片網址"}}},"MilestoneInput":{"type":"object","additionalProperties":false,"properties":{"date":{"type":"string","description":"日期 YYYY-MM-DD；新增時必填","example":"2025-05-01"},"time":{"type":"string","description":"時間 HH:MM，null 是只有日期","example":"20:30","nullable":true},"title":{"type":"string","description":"標題，最多 100 字；新增時必填","example":"第一次開台"},"content":{"type":"string","description":"內容（純文字，可以換行），最多 1,000 字","example":"緊張到忘記開麥克風"},"url":{"type":"string","description":"連結，只收 http／https","example":"https://www.twitch.tv/videos/123456789"},"hidden":{"type":"boolean","description":"不顯示在創作者頁面","example":false},"images":{"type":"array","maxItems":4,"items":{"type":"string","format":"uri"},"example":["https://assets.nekolive.net/files/aaaa/3f9c0d2b7a1e/first-stream.webp"],"description":"圖片，最多 4 張，要是自己檔案空間裡的圖片。修改時整組換掉，給空陣列是拿掉；沒送維持原樣"}}},"PortfolioItem":{"type":"object","properties":{"id":{"type":"integer","example":21},"title":{"type":"string","example":"Vtuber 立繪"},"category_id":{"type":"integer","example":1},"category":{"type":"string","example":"插畫"},"description":{"type":"string","example":"全身立繪與表情差分"},"images":{"type":"array","items":{"type":"string","example":"https://widgets.nekolive.net/UserAssets/0e2b8c1a-7f3d-4c55-9a61-2f4a0b6c9d11/work.webp"}},"cover":{"type":"string","example":"https://widgets.nekolive.net/UserAssets/0e2b8c1a-7f3d-4c55-9a61-2f4a0b6c9d11/work.webp"},"video":{"type":"string","example":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"},"embed":{"type":"object","properties":{"provider":{"type":"string","example":"youtube"},"src":{"type":"string","example":"https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ"}},"nullable":true},"url":{"type":"string","example":"https://example.com/works/21"},"client":{"type":"string","example":"某某工作室"},"tags":{"type":"array","items":{"type":"string","example":"原創"}},"made_on":{"type":"string","example":"2026-03","nullable":true},"hidden":{"type":"boolean","example":false},"r18":{"type":"boolean","example":false},"commission_ref":{"type":"boolean","example":true},"sort":{"type":"integer","example":0}}},"PortfolioItemInput":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","description":"作品名稱，最多 60 字；新增時必填","example":"Vtuber 立繪"},"category_id":{"type":"integer","description":"類別編號（列表的 `categories`），0 或 null 是未分類","example":1,"nullable":true},"description":{"type":"string","description":"說明（純文字，可以換行），最多 2,000 字","example":"全身立繪與表情差分"},"images":{"type":"array","description":"圖片，最多 12 張，只能用自己檔案空間的網址","example":["https://widgets.nekolive.net/UserAssets/0e2b8c1a-7f3d-4c55-9a61-2f4a0b6c9d11/work.webp"],"items":{"type":"string","example":"https://widgets.nekolive.net/UserAssets/0e2b8c1a-7f3d-4c55-9a61-2f4a0b6c9d11/work.webp"}},"video":{"type":"string","description":"影片：YouTube、Vimeo、Twitch、Bilibili 的網址，或自己影片空間的影片","example":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"},"url":{"type":"string","description":"作品連結，只收 http／https","example":"https://example.com/works/21"},"client":{"type":"string","description":"委託人或合作對象，最多 40 字","example":"某某工作室"},"tags":{"type":"array","description":"標籤，最多 8 個、每個最多 12 字","example":["原創"],"items":{"type":"string","example":"原創"}},"made_on":{"type":"string","description":"完成時間 YYYY-MM，null 是不填","example":"2026-03","nullable":true},"hidden":{"type":"boolean","description":"不顯示在創作者頁面","example":false},"r18":{"type":"boolean","description":"成人向作品","example":false},"commission_ref":{"type":"boolean","description":"觀眾發委託時可以選這件當參考作品","example":true}}},"InboxMessage":{"type":"object","properties":{"id":{"type":"string","example":"3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"content":{"type":"string","example":"請問下次什麼時候開台？"},"reply":{"type":"string","example":"這週五晚上八點！","nullable":true},"replied_at":{"type":"string","example":"2026-11-04T13:00:00.000Z","nullable":true},"is_public":{"type":"boolean","example":false},"is_read":{"type":"boolean","example":true},"anonymous":{"type":"boolean","example":false},"sender":{"type":"object","properties":{"name":{"type":"string","example":"小明"},"avatar":{"type":"string","example":"https://user.nekolive.net/assets/images/avatar/xxx.webp"}},"nullable":true},"created_at":{"type":"string","example":"2026-11-04T12:00:00.000Z"}}},"QuizQuestion":{"type":"object","properties":{"id":{"type":"integer","example":15},"set_id":{"type":"integer","example":2},"question":{"type":"string","example":"下列哪一部是吉卜力的作品？"},"options":{"type":"array","items":{"type":"string"},"example":["龍貓","你的名字","鬼滅之刃"]},"answer":{"type":"integer","example":0,"description":"正確答案在 options 裡的位置（0 是 A）"},"show_live":{"type":"boolean","example":true,"description":"作答中在 OBS 即時顯示每個選項的人數"},"time_limit":{"type":"integer","example":30,"description":"作答秒數，0 是不限時"}}},"QuizQuestionInput":{"type":"object","additionalProperties":false,"properties":{"question":{"type":"string","maxLength":200,"example":"下列哪一部是吉卜力的作品？","description":"題目，新增時必填"},"options":{"type":"array","minItems":2,"maxItems":4,"items":{"type":"string","maxLength":60},"example":["龍貓","你的名字","鬼滅之刃"],"description":"2 到 4 個選項，新增時必填。不能重複，也不能只有一個英文字母（會跟 A／B／C／D 混在一起）"},"answer":{"type":"integer","minimum":0,"maximum":3,"example":0,"description":"正確答案在 options 裡的位置（0 是 A），新增時必填"},"time_limit":{"type":"integer","minimum":0,"maximum":600,"example":30,"description":"作答秒數，0 是不限時（Twitch 預測最短 30 秒、不限時是 30 分鐘）"},"show_live":{"type":"boolean","example":true,"description":"作答中在 OBS 即時顯示每個選項的人數"}}},"QuizSet":{"type":"object","properties":{"id":{"type":"integer","example":2},"title":{"type":"string","example":"動漫題庫"},"points":{"type":"integer","example":30,"description":"用這個題庫開始一場時，每答對一題送的機器人點數"},"question_count":{"type":"integer","example":1},"questions":{"type":"array","items":{"$ref":"#/components/schemas/QuizQuestion"},"description":"照出題的順序"}}},"QuizMessage":{"type":"object","properties":{"on":{"type":"boolean","example":true,"description":"要不要發這則訊息"},"style":{"type":"string","enum":["chat","announce","announcepurple","announceblue","announceorange","announcegreen"],"example":"chat","description":"chat 是一般聊天室文字，announce 開頭的是醒目公告（顏色不同）"},"pin":{"type":"boolean","example":false,"description":"發出後置頂"},"pin_sec":{"type":"integer","minimum":5,"maximum":1800,"example":60,"description":"置頂幾秒"},"text":{"type":"string","maxLength":300,"example":"第 {no} 題：{question} {options}","description":"訊息內容，可以用 variables 列的參數"}}},"QuizSettings":{"type":"object","properties":{"messages":{"type":"object","description":"每個時機的聊天室訊息。open、close、reveal、end 是聊天室作答的場次；p_open、p_close、p_reveal、p_end 是用 Twitch 預測的場次","additionalProperties":{"$ref":"#/components/schemas/QuizMessage"},"example":{"open":{"on":true,"style":"chat","pin":false,"pin_sec":60,"text":"第 {no} 題：{question} {options}"},"reveal":{"on":true,"style":"announce","pin":false,"pin_sec":60,"text":"答案是 {answer_letter}. {answer}，{correct} 位答對"}}},"variables":{"type":"object","description":"每則訊息可以用的參數名稱（寫成 {名稱}）","additionalProperties":{"type":"array","items":{"type":"string"}},"example":{"open":["title","no","question","options","letters","time"],"end":["title","rounds","players","top"]}}}},"QuizPrediction":{"type":"object","properties":{"id":{"type":"string","example":"1243456c-1e5b-4f8a-9b3d-0123456789ab"},"title":{"type":"string","example":"今晚會贏幾場？"},"status":{"type":"string","example":"active","description":"active 下注中、locked 已鎖定"},"outcomes":{"type":"array","items":{"type":"string"},"example":["0 到 2 場","3 場以上"]},"users":{"type":"integer","example":18,"description":"下注的人數"},"from_quiz":{"type":"boolean","example":false,"description":"是答題互動自己建立的預測"}}}},"responses":{"BadRequest":{"description":"內容格式不正確","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"圖片只能用自己檔案空間裡的、或用 API 上傳的圖片網址：https://example.com/a.png"}}}},"Unauthorized":{"description":"沒有帶金鑰，或金鑰無效、已撤銷、已過期","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"金鑰無效、已撤銷或已過期。"}}}},"Forbidden":{"description":"金鑰沒有這項權限，或沒有權限管理這位創作者","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"這把金鑰沒有「發布與管理貼文」（posts:write）權限，請到後台建立有這項權限的金鑰。"}}}},"NotFound":{"description":"找不到","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"找不到這篇貼文"}}}},"TooManyRequests":{"description":"請求太頻繁","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"請求太頻繁了，請稍後再試。"}}}},"UnsupportedMediaType":{"description":"不是支援的圖片格式","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"圖片只能是 JPEG、PNG、WebP"}}}},"PayloadTooLarge":{"description":"檔案太大","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"送出的內容太大了。"}}}},"LiveConflict":{"description":"目前的狀態不能這樣操作，原因在 message","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"目前的狀態不能這樣操作"}}},"example":{"success":false,"message":"目前的狀態不能這樣操作"}}}},"LiveUnavailable":{"description":"功能還在準備中，或通知伺服器暫時連不上","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"功能還在準備中，或通知伺服器暫時連不上，請稍後再試"}}},"example":{"success":false,"message":"功能還在準備中，或通知伺服器暫時連不上，請稍後再試"}}}}}}}