{"openapi":"3.0.1","info":{"title":"CNV Chat API","description":"Internal chat service cho các module CNV","contact":{"name":"CNV Engineering"},"version":"0.1.0"},"servers":[{"url":"https://chatapi.cnvwork.com","description":"Generated server url"}],"security":[{"bearer-jwt":[]}],"tags":[{"name":"Room Draft","description":"Nháp tin nhắn (per-user, sync cross-device)"},{"name":"Mentions Inbox","description":"List mention của user (Slack/Discord Mentions tab pattern)"},{"name":"Me","description":"Thông tin user hiện tại"},{"name":"My Threads","description":"List threads tôi đang follow (Lark Topics tab) + global unread badge"},{"name":"Channels","description":"Channel = container tầng trên cùng (giống Discord Server / Slack Workspace)"},{"name":"Presence","description":"Trạng thái online/offline của account"},{"name":"Health","description":"Healthcheck & smoke endpoints"},{"name":"Contacts","description":"Kết bạn để nhắn tin xuyên tenant (external chat)"},{"name":"Scheduled Messages","description":"Schedule message để gửi sau (giống Lark)"},{"name":"Room Labels","description":"Nhãn phân loại room (per-user, many-to-many)"},{"name":"Messages","description":"CRUD message + recall + delete-for-me"},{"name":"Thread Follow","description":"Follow/unfollow thread + mark read (Lark pattern)"},{"name":"Accounts","description":"Quản lý account (register proactive + metadata cho rule)"},{"name":"Join Requests","description":"Duyệt yêu cầu thêm member (chế độ cần duyệt)"},{"name":"Polls","description":"Quản lý poll trong room"},{"name":"Reminders","description":"Self-reminder one-time hoặc recurring (giống Lark)"},{"name":"Admin/Modules","description":"Quản lý module + verify key (CNV Admin only)"},{"name":"Members","description":"Quản lý thành viên room"}],"paths":{"/api/v1/me/rooms/{roomId}/labels":{"put":{"tags":["Room Labels"],"summary":"Set (replace) toàn bộ nhãn cho 1 room — body {labelIds:[...]}, rỗng = gỡ hết","operationId":"setRoomLabels","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRoomLabelsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringObject"}}}}}}},"/api/v1/me/rooms/{roomId}/draft":{"get":{"tags":["Room Draft"],"summary":"Lấy nháp của room (FE gọi khi switch vào room). Không có nháp → text=null","operationId":"get","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDraftResponse"}}}}}},"put":{"tags":["Room Draft"],"summary":"Lưu/ghi đè nháp (FE gọi khi unfocus composer). text rỗng → xoá nháp","operationId":"save","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveDraftRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDraftResponse"}}}}}},"delete":{"tags":["Room Draft"],"summary":"Xoá nháp của room (tuỳ chọn — gửi tin đã tự xoá)","operationId":"delete","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/channels/{id}/rule":{"put":{"tags":["Channels"],"summary":"Update rule (chỉ khi membershipMode=RULE) — trigger re-evaluate sync","operationId":"updateRule","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRuleRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseChannelResponse"}}}}}}},"/bot/{token}/setWebhook":{"post":{"tags":["Bot API"],"operationId":"setWebhook","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetWebhookBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/bot/{token}/sendMessage":{"post":{"tags":["Bot API"],"operationId":"sendMessage","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/bot/{token}/editMessage":{"post":{"tags":["Bot API"],"operationId":"editMessage","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditMessageBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/bot/{token}/deleteWebhook":{"post":{"tags":["Bot API"],"operationId":"deleteWebhook","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/bot/{token}/deleteMessage":{"post":{"tags":["Bot API"],"operationId":"deleteMessage","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMessageBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/bot/{token}/answerCallbackQuery":{"post":{"tags":["Bot API"],"operationId":"answerCallback","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackAnswerBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/api/v1/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook","operationId":"list","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListWebhookResp"}}}}}},"post":{"tags":["Webhooks"],"summary":"Đăng ký webhook (trả secret chỉ 1 lần)","operationId":"create","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseWebhookResp"}}}}}}},"/api/v1/threads/{rootId}/read":{"post":{"tags":["Thread Follow"],"summary":"Mark thread read up to messageId","operationId":"markRead","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"rootId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseThreadFollowResponse"}}}}}}},"/api/v1/threads/{rootId}/follow":{"post":{"tags":["Thread Follow"],"summary":"Manual follow thread","operationId":"follow","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"rootId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseThreadFollowResponse"}}}}}},"delete":{"tags":["Thread Follow"],"summary":"Unfollow thread (idempotent). User đã unfollow KHÔNG auto re-follow.","operationId":"unfollow","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"rootId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/rooms":{"get":{"tags":["Rooms"],"summary":"List room user là member. Filter: ?standalone=true → chỉ room KHÔNG thuộc channel; ?channelId=<uuid> → chỉ room trong channel đó. ?archived=true → chỉ room user đã ẩn (\"Xong\"); mặc định/false → chỉ room đang hiện (REQ-003). ?q=<text> (chỉ khi archived=true) → lọc theo tên room (GROUP/CHANNEL có tên). ?include=members → kèm members[{accountId,role,joinedAt}] mỗi room (REQ-002); phòng > cnv.chat.rooms.inline-members-max → members rỗng + membersTruncated=true, FE fan-out /rooms/{id}/members riêng. memberCount luôn có sẵn tại room.memberCount.","operationId":"list_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"standalone","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"channelId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"include","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListMapStringObject"}}}}}},"post":{"tags":["Rooms"],"summary":"Tạo room (GROUP/CHANNEL/CROSS_MODULE)","operationId":"create_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoomRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseRoomResponse"}}}}}}},"/api/v1/rooms/{roomId}/read":{"post":{"tags":["Read receipts"],"summary":"Đánh dấu đã đọc tới message X","operationId":"read","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringObject"}}}}}}},"/api/v1/rooms/{roomId}/messages":{"get":{"tags":["Messages"],"summary":"Scroll lùi/xuôi cursor-based hoặc lấy 50 message gần nhất nếu không có cursor. ?topLevelOnly=true (D36): chỉ tin NGOÀI luồng, mỗi tin gốc có reply kèm object `thread` (replyCount, lastReplyAt, lastReply, unreadCount, following). meta.hasMore/nextCursor tính trên dòng thô TRƯỚC khi lọc tin bạn đã ẩn.","operationId":"scroll","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"before","in":"query","required":false,"schema":{"type":"string"}},{"name":"after","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}},{"name":"topLevelOnly","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListMessageResponse"}}}}}},"post":{"tags":["Messages"],"summary":"Gửi message","operationId":"send","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMessageResponse"}}}}}}},"/api/v1/rooms/{roomId}/messages/{messageId}/snap":{"post":{"tags":["Pin & Snap-to-top"],"summary":"Snap-to-top — set 1 message hiển thị banner trên cùng","operationId":"snap","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringObject"}}}}}}},"/api/v1/rooms/{roomId}/messages/{messageId}/restore":{"post":{"tags":["Messages"],"summary":"Bỏ ẩn message","operationId":"restore","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/rooms/{roomId}/messages/{messageId}/recall":{"post":{"tags":["Messages"],"summary":"Thu hồi cho mọi người (D8)","operationId":"recall","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMessageResponse"}}}}}}},"/api/v1/rooms/{roomId}/messages/{messageId}/reactions":{"get":{"tags":["Reactions"],"summary":"Tóm tắt reaction (count theo emoji)","operationId":"summary","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListReactionSummary"}}}}}},"post":{"tags":["Reactions"],"summary":"Thêm reaction","operationId":"add","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/rooms/{roomId}/messages/{messageId}/pin":{"post":{"tags":["Pin & Snap-to-top"],"summary":"Pin message (unlimited). ?scope=ROOM (mặc định, cả phòng, owner/admin) hoặc ?scope=PERSONAL (ghim riêng tôi, member nào cũng được, không phát event)","operationId":"pin","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"ROOM","enum":["ROOM","PERSONAL"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponsePinnedResponse"}}}}}},"delete":{"tags":["Pin & Snap-to-top"],"summary":"Bỏ pin. ?scope=ROOM (mặc định) bỏ ghim chung; ?scope=PERSONAL bỏ ghim riêng tôi","operationId":"unpin","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"ROOM","enum":["ROOM","PERSONAL"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/rooms/{roomId}/messages/scheduled":{"post":{"tags":["Scheduled Messages"],"summary":"Tạo scheduled message — gửi vào room {roomId} tại {sendAt}","operationId":"create_2","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduledMessageRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseScheduledMessageResponse"}}}}}}},"/api/v1/rooms/{roomId}/members":{"get":{"tags":["Members"],"summary":"List member của room — kèm displayName/avatarUrl/accountType (enrich từ accounts)","operationId":"list_2","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListMemberResponse"}}}}}},"post":{"tags":["Members"],"summary":"Add member vào room. Hành vi tuỳ addMemberPolicy của phòng: ADMIN_ONLY (chỉ owner/admin) / ALL_MEMBERS (ai cũng add thẳng) / ALL_MEMBERS_WITH_APPROVAL (member thường → tạo yêu cầu chờ duyệt). Response.status = ADDED hoặc PENDING_APPROVAL.","operationId":"add_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMembersRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseAddMembersResponse"}}}}}}},"/api/v1/rooms/{roomId}/join-requests/{requestId}/reject":{"post":{"tags":["Join Requests"],"summary":"Từ chối yêu cầu (owner/admin)","operationId":"reject","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/rooms/{roomId}/join-requests/{requestId}/approve":{"post":{"tags":["Join Requests"],"summary":"Duyệt yêu cầu → người được add thành member thật (owner/admin)","operationId":"approve","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMemberResponse"}}}}}}},"/api/v1/rooms/{roomId}/forward":{"post":{"tags":["Forward"],"summary":"Forward 1+ message từ room khác sang room hiện tại","operationId":"forward","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListMessageResponse"}}}}}}},"/api/v1/rooms/{id}/unarchive":{"post":{"tags":["Rooms"],"summary":"Bỏ archive","operationId":"unarchive","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseRoomResponse"}}}}}}},"/api/v1/rooms/{id}/mute":{"post":{"tags":["Rooms"],"summary":"Mute room (shortcut). Body: {until?: Instant}; until=null → mute vĩnh viễn","operationId":"mute","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MuteRoomRequest"}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMemberResponse"}}}}}},"delete":{"tags":["Rooms"],"summary":"Unmute room (clear mutedUntil). Idempotent","operationId":"unmute","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMemberResponse"}}}}}}},"/api/v1/rooms/{id}/leave":{"post":{"tags":["Rooms"],"summary":"Rời phòng","operationId":"leave","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/rooms/{id}/archive":{"post":{"tags":["Rooms"],"summary":"Archive / unarchive room","operationId":"archive","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseRoomResponse"}}}}}}},"/api/v1/rooms/self":{"post":{"tags":["Rooms"],"summary":"Get-or-create saved-messages room (singleton per user, giống Telegram)","operationId":"createSelf","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseRoomResponse"}}}}}}},"/api/v1/rooms/reminders":{"post":{"tags":["Rooms"],"summary":"Get-or-create reminder bot DM (idempotent). FE gọi trước khi user đặt reminder đầu tiên để sidebar show bot DM ngay.","operationId":"createReminderRoom","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseRoomResponse"}}}}}}},"/api/v1/rooms/private":{"post":{"tags":["Rooms"],"summary":"Get-or-create private chat 1-1","operationId":"createPrivate","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePrivateRoomRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseRoomResponse"}}}}}}},"/api/v1/reminders":{"get":{"tags":["Reminders"],"summary":"List reminder ACTIVE của tôi","operationId":"listMine","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListReminderResponse"}}}}}},"post":{"tags":["Reminders"],"summary":"Tạo reminder cho chính mình","operationId":"create_3","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReminderRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseReminderResponse"}}}}}}},"/api/v1/polls/{pollId}/votes":{"post":{"tags":["Polls"],"summary":"Vote (replace toàn bộ vote của user trong poll)","operationId":"vote","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"pollId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VotePollRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponsePollResponse"}}}}}}},"/api/v1/polls/{pollId}/close":{"post":{"tags":["Polls"],"summary":"Close poll (chỉ creator hoặc owner/admin room)","operationId":"close","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"pollId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponsePollResponse"}}}}}}},"/api/v1/me/saved":{"get":{"tags":["Tin đã lưu (Saved Messages)"],"summary":"Feed Tin đã lưu của tôi (card + origin để jump)","operationId":"feed","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseSavedFeedView"}}}}}},"post":{"tags":["Tin đã lưu (Saved Messages)"],"summary":"Lưu 1 message vào Tin đã lưu (kèm note tuỳ chọn). Idempotent — lưu lại = update note.","operationId":"save_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseSavedCardView"}}}}}}},"/api/v1/me/labels":{"get":{"tags":["Room Labels"],"summary":"List nhãn của tôi — kèm roomCount (số room đang gắn nhãn)","operationId":"list_3","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListLabelResponse"}}}}}},"post":{"tags":["Room Labels"],"summary":"Tạo nhãn (per-user) — name + color hex","operationId":"create_4","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLabelRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseLabelResponse"}}}}}}},"/api/v1/me/broadcasts/read":{"post":{"tags":["Broadcast CNVWork (me)"],"summary":"Đánh dấu đã đọc broadcast tới id (null = mới nhất)","operationId":"read_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadBody"}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringObject"}}}}}}},"/api/v1/files/upload-session":{"post":{"tags":["Files"],"summary":"Tạo upload session cho client upload trực tiếp tới media service","operationId":"createSession","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUploadSessionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseUploadSession"}}}}}}},"/api/v1/contacts/requests":{"get":{"tags":["Contacts"],"summary":"Lời mời đang chờ — ?direction=incoming (mặc định) | outgoing","operationId":"requests","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"incoming"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListContactResponse"}}}}}},"post":{"tags":["Contacts"],"summary":"Gửi lời mời kết bạn (idempotent; 2 bên cùng mời → tự ACCEPTED)","operationId":"request","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseContactResponse"}}}}}}},"/api/v1/contacts/requests/{requestId}/accept":{"post":{"tags":["Contacts"],"summary":"Chấp nhận lời mời (chỉ người được mời)","operationId":"accept","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseContactResponse"}}}}}}},"/api/v1/channels":{"get":{"tags":["Channels"],"summary":"List channel user là member","operationId":"list_4","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListChannelResponse"}}}}}},"post":{"tags":["Channels"],"summary":"Tạo channel (membershipMode=EXPLICIT|RULE)","operationId":"create_5","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChannelRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseChannelResponse"}}}}}}},"/api/v1/channels/{id}/members":{"get":{"tags":["Channels"],"summary":"List member của channel","operationId":"listMembers","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListChannelMemberResponse"}}}}}},"post":{"tags":["Channels"],"summary":"Add member explicit (chỉ khi membershipMode=EXPLICIT)","operationId":"addMember","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddChannelMemberRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseChannelMemberResponse"}}}}}}},"/api/v1/bots":{"get":{"tags":["Bots admin"],"summary":"List bots","operationId":"list_5","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListBotResp"}}}}}},"post":{"tags":["Bots admin"],"summary":"Tạo bot (CNV Admin only) — trả token chỉ 1 lần duy nhất","operationId":"create_6","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBotBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringObject"}}}}}}},"/api/v1/bots/{id}/webhook":{"post":{"tags":["Bots admin"],"summary":"Cài đặt webhook cho bot (owner/tenant)","operationId":"setWebhook_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseBotResp"}}}}}}},"/api/v1/bots/{id}/regenerate-token":{"post":{"tags":["Bots admin"],"summary":"Regenerate token cho bot","operationId":"regen","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/admin/modules":{"get":{"tags":["Admin/Modules"],"summary":"Liệt kê module","operationId":"list_6","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListModuleResponse"}}}}}},"post":{"tags":["Admin/Modules"],"summary":"Tạo module mới","operationId":"create_7","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModuleRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseModuleResponse"}}}}}}},"/api/v1/admin/modules/{code}/customers/{customerAccountId}/keys":{"get":{"tags":["Admin/Modules"],"summary":"List verify key của customer","operationId":"listKeys","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"name":"customerAccountId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListCustomerKeyResponse"}}}}}},"post":{"tags":["Admin/Modules"],"summary":"Đăng ký verify key cho 1 customer trong module","operationId":"registerKey","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"name":"customerAccountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterCustomerKeyRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseCustomerKeyResponse"}}}}}}},"/api/v1/admin/modules/{code}/customers/{customerAccountId}/keys/refresh":{"post":{"tags":["Admin/Modules"],"summary":"Force refresh cache verify key","operationId":"refresh","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"name":"customerAccountId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/admin/broadcasts":{"post":{"tags":["Broadcast admin (CNVWork)"],"summary":"Gửi broadcast CNVWork tới TOÀN BỘ user mọi hệ (CNV admin only). Body có audience → 400, gửi theo hệ phải dùng /targeted","operationId":"create_8","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseBroadcastView"}}}}}}},"/api/v1/admin/broadcasts/targeted":{"post":{"tags":["Broadcast admin (CNVWork)"],"summary":"Gửi broadcast CNVWork theo hệ: audience.modules bắt buộc, sai → 400 không lưu không gửi (CNV admin only)","operationId":"createTargeted","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseBroadcastView"}}}}}}},"/api/v1/accounts/register":{"post":{"tags":["Accounts"],"summary":"Register / upsert user proactive (module ngoài push lên)","operationId":"register","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterAccountRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseAccountResponse"}}}}}}},"/api/v1/rooms/{roomId}/messages/{messageId}":{"get":{"tags":["Messages"],"summary":"Lấy 1 message","operationId":"get_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMessageResponse"}}}}}},"delete":{"tags":["Messages"],"summary":"Delete cho mình tôi (D7) — chỉ ẩn ở phía user gọi","operationId":"hideForMe","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}},"patch":{"tags":["Messages"],"summary":"Sửa message (chỉ sender + trong edit window)","operationId":"edit","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditMessageRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMessageResponse"}}}}}}},"/api/v1/rooms/{roomId}/members/{accountId}/role":{"patch":{"tags":["Members"],"summary":"Đổi role của member (owner-only)","operationId":"changeRole","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMemberResponse"}}}}}}},"/api/v1/rooms/{id}":{"get":{"tags":["Rooms"],"summary":"Lấy chi tiết room","operationId":"get_2","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseRoomResponse"}}}}}},"delete":{"tags":["Rooms"],"summary":"Xoá room (owner)","operationId":"delete_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}},"patch":{"tags":["Rooms"],"summary":"Update room (owner/admin)","operationId":"update","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoomRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseRoomResponse"}}}}}}},"/api/v1/rooms/{id}/preferences":{"patch":{"tags":["Rooms"],"summary":"Update member preferences (notification level / mute / pinned / archived per-user)","operationId":"updatePreferences","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberPreferencesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMemberResponse"}}}}}}},"/api/v1/reminders/{id}":{"get":{"tags":["Reminders"],"summary":"Detail reminder","operationId":"get_3","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseReminderResponse"}}}}}},"delete":{"tags":["Reminders"],"summary":"Cancel reminder","operationId":"cancel","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}},"patch":{"tags":["Reminders"],"summary":"Edit reminder (chỉ ACTIVE)","operationId":"update_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReminderRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseReminderResponse"}}}}}}},"/api/v1/messages/scheduled/{id}":{"get":{"tags":["Scheduled Messages"],"summary":"Detail scheduled message","operationId":"get_4","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseScheduledMessageResponse"}}}}}},"delete":{"tags":["Scheduled Messages"],"summary":"Cancel scheduled message","operationId":"cancel_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}},"patch":{"tags":["Scheduled Messages"],"summary":"Edit scheduled message (chỉ khi PENDING)","operationId":"update_2","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScheduledMessageRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseScheduledMessageResponse"}}}}}}},"/api/v1/me/saved/{savedId}":{"delete":{"tags":["Tin đã lưu (Saved Messages)"],"summary":"Bỏ lưu 1 saved card","operationId":"delete_2","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"savedId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringObject"}}}}}},"patch":{"tags":["Tin đã lưu (Saved Messages)"],"summary":"Sửa note của 1 saved card","operationId":"updateNote","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"savedId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteBody"}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseSavedCardView"}}}}}}},"/api/v1/me/labels/{labelId}":{"delete":{"tags":["Room Labels"],"summary":"Xoá nhãn — gỡ khỏi mọi room (chỉ chủ nhãn)","operationId":"delete_3","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"labelId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}},"patch":{"tags":["Room Labels"],"summary":"Sửa nhãn (name/color) — chỉ chủ nhãn","operationId":"update_3","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"labelId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLabelRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseLabelResponse"}}}}}}},"/api/v1/channels/{id}":{"get":{"tags":["Channels"],"summary":"Lấy chi tiết channel","operationId":"get_5","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseChannelResponse"}}}}}},"delete":{"tags":["Channels"],"summary":"Xoá channel (owner)","operationId":"delete_4","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}},"patch":{"tags":["Channels"],"summary":"Update channel (owner/admin)","operationId":"update_4","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChannelRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseChannelResponse"}}}}}}},"/api/v1/channels/{id}/preferences":{"patch":{"tags":["Channels"],"summary":"Update preference per-user của channel (pin lên sidebar). Là member là được, không cần owner/admin.","operationId":"updatePreferences_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChannelPreferencesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseChannelResponse"}}}}}}},"/api/v1/bots/{id}":{"get":{"tags":["Bots admin"],"summary":"Chi tiết 1 bot (owner/tenant)","operationId":"detail","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseBotResp"}}}}}},"delete":{"tags":["Bots admin"],"summary":"Soft-delete bot","operationId":"delete_5","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}},"patch":{"tags":["Bots admin"],"summary":"Sửa thông tin bot","operationId":"update_5","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBotBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseBotResp"}}}}}}},"/api/v1/bots/{id}/rooms/{roomId}":{"patch":{"tags":["Bots admin"],"summary":"Bật/tắt bot đọc all tin trong 1 group (per bot↔group)","operationId":"setReadAll","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadAllBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringObject"}}}}}}},"/api/v1/accounts/{id}/status":{"patch":{"tags":["Accounts"],"summary":"Đổi trạng thái account (ACTIVE/DEACTIVATED/BANNED). Core gọi khi nhân viên nghỉ việc (DEACTIVATED) hoặc quay lại (ACTIVE). DEACTIVATED/BANNED → mọi REST + WS reconnect bị chặn ngay (kể cả token còn hạn), session đang mở bị soft-kick qua /user/queue/session.","operationId":"updateStatus","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountStatusRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseAccountResponse"}}}}}}},"/api/v1/accounts/{id}/metadata":{"patch":{"tags":["Accounts"],"summary":"Update metadata account (team/department/role/tags) — trigger rule sync","operationId":"updateMetadata","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountMetadataRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseAccountResponse"}}}}}}},"/bot/{token}/getWebhookInfo":{"get":{"tags":["Bot API"],"operationId":"getWebhookInfo","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/bot/{token}/getUpdates":{"get":{"tags":["Bot API"],"operationId":"getUpdates","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":100}},{"name":"timeout","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/bot/{token}/getMe":{"get":{"tags":["Bot API"],"operationId":"getMe","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/api/v1/threads/{rootId}/followers":{"get":{"tags":["Thread Follow"],"summary":"List account_id đang FOLLOWING thread (DATA thuần). Notification consumer dùng để scope push thread-reply về đúng followers (reply/@mention/author, loại người đã unfollow), thay vì fan-out cả room. Root chưa ai follow → followers rỗng.","operationId":"followers","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"rootId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringObject"}}}}}}},"/api/v1/threads/unread-count":{"get":{"tags":["My Threads"],"summary":"Tổng số thread có reply chưa đọc — dùng cho global badge '@N threads' trên sidebar.","operationId":"unreadCount","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringLong"}}}}}}},"/api/v1/rooms/{roomId}/threads":{"get":{"tags":["Threads"],"summary":"List active threads trong room — sort theo last reply DESC. Mỗi item kèm replyCount, lastReplyAt, unreadCount, following.","operationId":"listInRoom","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListThreadSummary"}}}}}}},"/api/v1/rooms/{roomId}/threads/{rootId}":{"get":{"tags":["Threads"],"summary":"Lấy reply trong 1 thread — mặc định trả trang MỚI NHẤT; cuộn ngược lịch sử bằng ?before=, catchup xuôi bằng ?after=","operationId":"thread","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"rootId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"after","in":"query","required":false,"schema":{"type":"string"}},{"name":"before","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListMessageResponse"}}}}}}},"/api/v1/rooms/{roomId}/snap":{"get":{"tags":["Pin & Snap-to-top"],"summary":"Lấy message đang snap-to-top","operationId":"getSnap","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMessageResponse"}}}}}},"delete":{"tags":["Pin & Snap-to-top"],"summary":"Bỏ snap-to-top","operationId":"unsnap","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/rooms/{roomId}/pinned":{"get":{"tags":["Pin & Snap-to-top"],"summary":"Danh sách ghim của phòng theo góc nhìn tôi: ghim chung (scope=ROOM) + ghim riêng (scope=PERSONAL). 1 entry/tin, tin vừa phòng ghim vừa tôi ghim → scope=ROOM, personal=true","operationId":"list_7","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListPinnedResponse"}}}}}}},"/api/v1/rooms/{roomId}/messages/search":{"get":{"tags":["Search"],"summary":"Tìm kiếm message trong room (Elasticsearch)","operationId":"search","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListSearchHit"}}}}}}},"/api/v1/rooms/{roomId}/messages/around/{anchorId}":{"get":{"tags":["Messages"],"summary":"Around — jump tới message và lấy ngữ cảnh trước/sau. ?topLevelOnly=true: 2 bên chỉ tin ngoài luồng (kèm `thread`), tin neo luôn có mặt kể cả khi là reply.","operationId":"around","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"anchorId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}},{"name":"topLevelOnly","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListMessageResponse"}}}}}}},"/api/v1/rooms/{roomId}/join-requests":{"get":{"tags":["Join Requests"],"summary":"List yêu cầu đang chờ duyệt (owner/admin) — kèm display info người được add","operationId":"listPending","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListJoinRequestResponse"}}}}}}},"/api/v1/polls/{pollId}":{"get":{"tags":["Polls"],"summary":"Lấy detail poll (kèm options + votedByMe)","operationId":"get_6","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"pollId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponsePollResponse"}}}}}}},"/api/v1/polls/{pollId}/options/{optionId}/voters":{"get":{"tags":["Polls"],"summary":"List voters của 1 option (chỉ non-anonymous, paginated)","operationId":"listVoters","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"pollId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"optionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringObject"}}}}}}},"/api/v1/ping":{"get":{"tags":["Health"],"summary":"Ping endpoint — public, không cần auth","operationId":"ping","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringObject"}}}}}}},"/api/v1/messages/scheduled":{"get":{"tags":["Scheduled Messages"],"summary":"List scheduled message PENDING của tôi","operationId":"listMine_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListScheduledMessageResponse"}}}}}}},"/api/v1/me":{"get":{"tags":["Me"],"summary":"Trả về AuthContext đang gắn với request","operationId":"me","parameters":[{"name":"ctx","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseAuthContext"}}}}}}},"/api/v1/me/threads":{"get":{"tags":["My Threads"],"summary":"List threads tôi đang FOLLOW, sort theo updated_at DESC (recent activity trước). Cursor pagination qua ?before=<ISO-8601>.","operationId":"listMyThreads","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListThreadSummary"}}}}}}},"/api/v1/me/saved/status":{"get":{"tags":["Tin đã lưu (Saved Messages)"],"summary":"Trong số messageIds, tin nào đã lưu (cho toggle icon Save trong room)","operationId":"status","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"messageIds","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringObject"}}}}}}},"/api/v1/me/mentions":{"get":{"tags":["Mentions Inbox"],"summary":"List mention của tôi. ?status=unread (default) chỉ trả mention chưa đọc; ?status=all trả tất cả. Cursor pagination qua ?before=<messageId>.","operationId":"listMine_2","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"unread"}},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponsePageResponseMentionInboxItem"}}}}}}},"/api/v1/me/labels/{labelId}/rooms":{"get":{"tags":["Room Labels"],"summary":"List room mang nhãn này (folder view) — trả roomIds","operationId":"roomsByLabel","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"labelId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringObject"}}}}}}},"/api/v1/me/broadcasts":{"get":{"tags":["Broadcast CNVWork (me)"],"summary":"Feed broadcast CNVWork của tôi + unread count","operationId":"feed_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseFeedView"}}}}}}},"/api/v1/contacts":{"get":{"tags":["Contacts"],"summary":"Danh bạ đã kết bạn (ACCEPTED)","operationId":"list_8","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListContactResponse"}}}}}}},"/api/v1/bots/{id}/rooms":{"get":{"tags":["Bots admin"],"summary":"Danh sách group bot đang ở + cờ read_all","operationId":"rooms","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListBotRoomView"}}}}}}},"/api/v1/admin/broadcasts/capabilities":{"get":{"tags":["Broadcast admin (CNVWork)"],"summary":"Máy chủ có hỗ trợ gửi theo hệ chưa + danh sách module nhắm được (CNV admin only)","operationId":"capabilities","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseCapabilitiesView"}}}}}}},"/api/v1/accounts/{accountId}/presence":{"get":{"tags":["Presence"],"summary":"Lấy trạng thái online của 1 account theo accountId","operationId":"get_7","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponsePresenceResponse"}}}}}}},"/api/v1/accounts/batch":{"get":{"tags":["Accounts"],"summary":"Batch resolve tên/avatar/tenant (D31) — chỉ trả account cùng tenant / là contact / chung room với caller; id lạ bị lược bỏ","operationId":"batch","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListAccountBriefResponse"}}}}}}},"/api/v1/webhooks/{id}":{"delete":{"tags":["Webhooks"],"summary":"Xoá webhook","operationId":"delete_6","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/rooms/{roomId}/messages/{messageId}/reactions/{emoji}":{"delete":{"tags":["Reactions"],"summary":"Xoá reaction","operationId":"remove","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"emoji","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/rooms/{roomId}/members/{accountId}":{"delete":{"tags":["Members"],"summary":"Xoá member khỏi room","operationId":"remove_1","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/rooms/{roomId}/join-requests/{requestId}":{"delete":{"tags":["Join Requests"],"summary":"Huỷ lời mời đang chờ (người mời hoặc owner/admin)","operationId":"cancel_2","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"roomId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/contacts/{accountId}":{"delete":{"tags":["Contacts"],"summary":"Huỷ kết bạn (idempotent)","operationId":"remove_2","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/contacts/requests/{requestId}":{"delete":{"tags":["Contacts"],"summary":"Từ chối (người được mời) hoặc thu hồi (người mời) lời mời PENDING","operationId":"decline","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/channels/{id}/members/{accountId}":{"delete":{"tags":["Channels"],"summary":"Remove member khỏi channel","operationId":"removeMember","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}},"/api/v1/admin/modules/{code}/customers/{customerAccountId}/keys/{keyId}":{"delete":{"tags":["Admin/Modules"],"summary":"Vô hiệu hoá 1 verify key","operationId":"revokeKey","parameters":[{"name":"actor","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AuthContext"}},{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"name":"customerAccountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringString"}}}}}}}},"components":{"schemas":{"AuthContext":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"moduleCode":{"type":"string"},"customerAccountId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":"string"},"scopes":{"uniqueItems":true,"type":"array","items":{"type":"string"}},"cnvAdmin":{"type":"boolean"}}},"SetRoomLabelsRequest":{"type":"object","properties":{"labelIds":{"type":"array","items":{"type":"string","format":"uuid"}}}},"ApiError":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{"type":"object"}},"traceId":{"type":"string"}}},"ApiMeta":{"type":"object","properties":{"nextCursor":{"type":"string"},"hasMore":{"type":"boolean"},"totalCount":{"type":"integer","format":"int64"}}},"ApiResponseMapStringObject":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"type":"object"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"SaveDraftRequest":{"type":"object","properties":{"text":{"maxLength":16000,"minLength":0,"type":"string"}}},"ApiResponseDraftResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DraftResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"DraftResponse":{"type":"object","properties":{"roomId":{"type":"string","format":"uuid"},"text":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}}},"RuleParams":{"type":"object","properties":{"teamId":{"type":"string"},"departmentId":{"type":"string"},"role":{"type":"string"},"tag":{"type":"string"}}},"UpdateRuleRequest":{"required":["ruleType"],"type":"object","properties":{"ruleType":{"type":"string","enum":["ALL","BY_TEAM","BY_DEPARTMENT","BY_ROLE","BY_TAG"]},"params":{"$ref":"#/components/schemas/RuleParams"}}},"ApiResponseChannelResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ChannelResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ChannelResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"moduleCode":{"type":"string"},"customerAccountId":{"type":"string"},"name":{"type":"string"},"iconUrl":{"type":"string"},"description":{"type":"string"},"ownerId":{"type":"string","format":"uuid"},"membershipMode":{"type":"string","enum":["EXPLICIT","RULE"]},"rule":{"$ref":"#/components/schemas/ChannelRuleDto"},"memberCount":{"type":"integer","format":"int32"},"rooms":{"type":"array","items":{"$ref":"#/components/schemas/RoomResponse"}},"createdAt":{"type":"string","format":"date-time"},"pinnedToSidebar":{"type":"boolean"}}},"ChannelRuleDto":{"required":["ruleType"],"type":"object","properties":{"ruleType":{"type":"string","enum":["ALL","BY_TEAM","BY_DEPARTMENT","BY_ROLE","BY_TAG"]},"params":{"$ref":"#/components/schemas/RuleParams"}}},"RoomResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PRIVATE","BOT_DM","GROUP","CHANNEL","CROSS_MODULE","SELF"]},"moduleCode":{"type":"string"},"customerAccountId":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string"},"description":{"type":"string"},"ownerId":{"type":"string","format":"uuid"},"channelId":{"type":"string","format":"uuid"},"memberCount":{"type":"integer","format":"int32"},"lastMessageId":{"type":"string","format":"uuid"},"lastMessageAt":{"type":"string","format":"date-time"},"snappedMessageId":{"type":"string","format":"uuid"},"archived":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"addMemberPolicy":{"type":"string","enum":["ADMIN_ONLY","ALL_MEMBERS","ALL_MEMBERS_WITH_APPROVAL"]},"external":{"type":"boolean"},"backgroundConfig":{"type":"string"}}},"SetWebhookBody":{"type":"object","properties":{"url":{"type":"string"},"secretToken":{"type":"string"}}},"SendMessageBody":{"type":"object","properties":{"roomId":{"type":"string","format":"uuid"},"text":{"type":"string"},"parseMode":{"type":"string"},"replyToId":{"type":"string","format":"uuid"},"replyMarkup":{"type":"object","additionalProperties":{"type":"object"}},"metadata":{"type":"object","additionalProperties":{"type":"object"}}}},"EditMessageBody":{"type":"object","properties":{"roomId":{"type":"string","format":"uuid"},"messageId":{"type":"string","format":"uuid"},"text":{"type":"string"},"parseMode":{"type":"string"}}},"DeleteMessageBody":{"type":"object","properties":{"roomId":{"type":"string","format":"uuid"},"messageId":{"type":"string","format":"uuid"}}},"CallbackAnswerBody":{"type":"object","properties":{"callbackQueryId":{"type":"string","format":"uuid"},"text":{"type":"string"}}},"CreateBody":{"type":"object","properties":{"moduleCode":{"type":"string"},"customerAccountId":{"type":"string"},"roomId":{"type":"string","format":"uuid"},"targetUrl":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string"}}}},"ApiResponseWebhookResp":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookResp"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"WebhookResp":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"moduleCode":{"type":"string"},"customerAccountId":{"type":"string"},"roomId":{"type":"string","format":"uuid"},"targetUrl":{"type":"string"},"secret":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}}},"ApiResponseThreadFollowResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ThreadFollowResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ThreadFollowResponse":{"type":"object","properties":{"threadRootId":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["FOLLOWING","UNFOLLOWED"]},"followSource":{"type":"string","enum":["MANUAL","REPLY","MENTION","AUTHOR"]},"lastReadMessageId":{"type":"string","format":"uuid"},"followedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CreateRoomRequest":{"required":["type"],"type":"object","properties":{"type":{"type":"string","enum":["PRIVATE","BOT_DM","GROUP","CHANNEL","CROSS_MODULE","SELF"]},"name":{"maxLength":256,"minLength":0,"type":"string"},"avatarUrl":{"maxLength":512,"minLength":0,"type":"string"},"description":{"type":"string"},"memberIds":{"type":"array","items":{"type":"string","format":"uuid"}},"channelId":{"type":"string","format":"uuid"},"addMemberPolicy":{"type":"string","enum":["ADMIN_ONLY","ALL_MEMBERS","ALL_MEMBERS_WITH_APPROVAL"]},"backgroundConfig":{"maxLength":1048576,"minLength":0,"type":"string"}}},"ApiResponseRoomResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RoomResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"AttachmentRef":{"type":"object","properties":{"resourceKey":{"type":"string"},"url":{"type":"string"},"fileName":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","format":"int64"},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"durationMs":{"type":"integer","format":"int32"},"thumbnailUrl":{"type":"string"}}},"CreatePollRequest":{"required":["options","question"],"type":"object","properties":{"question":{"maxLength":500,"minLength":0,"type":"string"},"options":{"maxItems":20,"minItems":2,"type":"array","items":{"maxLength":200,"minLength":0,"type":"string"}},"multiChoice":{"type":"boolean"},"anonymous":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time"}}},"MessageEntity":{"type":"object","properties":{"type":{"type":"string","enum":["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","SPOILER","CODE","PRE","BLOCKQUOTE","EXPANDABLE_BLOCKQUOTE","URL","TEXT_LINK","MENTION","MENTION_ALL","HASHTAG","CASHTAG","BOT_COMMAND","EMAIL","PHONE","CUSTOM_EMOJI"]},"offset":{"type":"integer","format":"int32"},"length":{"type":"integer","format":"int32"},"url":{"type":"string"},"language":{"type":"string"},"accountId":{"type":"string","format":"uuid"},"moduleCode":{"type":"string"},"botUsername":{"type":"string"},"emojiId":{"type":"string"}}},"MessageMetadata":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/SystemPayload"},"reply_markup":{"type":"object","additionalProperties":{"type":"object"}},"custom":{"type":"object","additionalProperties":{"type":"object"}}}},"SendMessageRequest":{"type":"object","properties":{"type":{"type":"string","enum":["TEXT","FILE","IMAGE","VIDEO","AUDIO","STICKER","SYSTEM","CALL","FORWARD","POLL","RECALLED"]},"parseMode":{"type":"string","enum":["NONE","MARKDOWN_V2","HTML"]},"raw":{"type":"string"},"text":{"maxLength":8192,"minLength":0,"type":"string"},"entities":{"type":"array","items":{"$ref":"#/components/schemas/MessageEntity"}},"replyToId":{"type":"string","format":"uuid"},"metadata":{"$ref":"#/components/schemas/MessageMetadata"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentRef"}},"clientMsgId":{"maxLength":64,"minLength":0,"type":"string"},"poll":{"$ref":"#/components/schemas/CreatePollRequest"}}},"SystemPayload":{"type":"object","properties":{"event":{"type":"string"},"actorId":{"type":"string"},"targetIds":{"type":"array","items":{"type":"string"}},"params":{"type":"object","additionalProperties":{"type":"object"}}}},"ApiResponseMessageResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MessageResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"MessageResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"senderId":{"type":"string","format":"uuid"},"senderType":{"type":"string","enum":["USER","BOT","SYSTEM"]},"type":{"type":"string","enum":["TEXT","FILE","IMAGE","VIDEO","AUDIO","STICKER","SYSTEM","CALL","FORWARD","POLL","RECALLED"]},"text":{"type":"string"},"entities":{"type":"array","items":{"$ref":"#/components/schemas/MessageEntity"}},"replyToId":{"type":"string","format":"uuid"},"threadRootId":{"type":"string","format":"uuid"},"forwardFromId":{"type":"string","format":"uuid"},"clientMsgId":{"type":"string"},"editCount":{"type":"integer","format":"int32"},"metadata":{"$ref":"#/components/schemas/MessageMetadata"},"recalledAt":{"type":"string","format":"date-time"},"recalledBy":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"editedAt":{"type":"string","format":"date-time"},"poll":{"$ref":"#/components/schemas/PollResponse"},"reactions":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","format":"uuid"}}},"thread":{"$ref":"#/components/schemas/ThreadInfo"}}},"PollOptionResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"optionText":{"type":"string"},"position":{"type":"integer","format":"int32"},"voteCount":{"type":"integer","format":"int32"},"votedByMe":{"type":"boolean"}}},"PollResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"messageId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"question":{"type":"string"},"multiChoice":{"type":"boolean"},"anonymous":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time"},"closedAt":{"type":"string","format":"date-time"},"closedBy":{"type":"string","format":"uuid"},"createdBy":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"options":{"type":"array","items":{"$ref":"#/components/schemas/PollOptionResponse"}},"totalVotes":{"type":"integer","format":"int32"}}},"ThreadInfo":{"type":"object","properties":{"replyCount":{"type":"integer","format":"int64"},"lastReplyAt":{"type":"string","format":"date-time"},"lastReply":{"$ref":"#/components/schemas/MessageResponse"},"unreadCount":{"type":"integer","format":"int64"},"following":{"type":"boolean"}}},"ApiResponseMapStringString":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"type":"string"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ReactionRequest":{"required":["emoji"],"type":"object","properties":{"emoji":{"type":"string"}}},"ApiResponsePinnedResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PinnedResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"PinnedResponse":{"type":"object","properties":{"roomId":{"type":"string","format":"uuid"},"messageId":{"type":"string","format":"uuid"},"pinnedBy":{"type":"string","format":"uuid"},"pinnedAt":{"type":"string","format":"date-time"},"scope":{"type":"string","enum":["ROOM","PERSONAL"]},"personal":{"type":"boolean"}}},"CreateScheduledMessageRequest":{"required":["message","sendAt"],"type":"object","properties":{"sendAt":{"type":"string","format":"date-time"},"message":{"$ref":"#/components/schemas/SendMessageRequest"}}},"ApiResponseScheduledMessageResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ScheduledMessageResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ScheduledMessageResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"senderId":{"type":"string","format":"uuid"},"sendAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["PENDING","SENT","CANCELED","FAILED"]},"attempts":{"type":"integer","format":"int32"},"lastError":{"type":"string"},"sentMessageId":{"type":"string","format":"uuid"},"payload":{"type":"object"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"AddMembersRequest":{"required":["accountIds"],"type":"object","properties":{"accountIds":{"maxItems":200,"minItems":0,"type":"array","items":{"type":"string","format":"uuid"}}}},"AddMembersResponse":{"type":"object","properties":{"status":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/MemberResponse"}},"pendingRequests":{"type":"array","items":{"$ref":"#/components/schemas/JoinRequestResponse"}}}},"ApiResponseAddMembersResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AddMembersResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"JoinRequestResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"invitedBy":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED","CANCELLED"]},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":"string","format":"date-time"},"displayName":{"type":"string"},"avatarUrl":{"type":"string"}}},"MemberResponse":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"moduleCode":{"type":"string"},"customerAccountId":{"type":"string"},"role":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"nickname":{"type":"string"},"joinedAt":{"type":"string","format":"date-time"},"lastReadMessageId":{"type":"string","format":"uuid"},"lastReadAt":{"type":"string","format":"date-time"},"notificationLevel":{"type":"string","enum":["ALL","MENTIONS","NONE"]},"mutedUntil":{"type":"string","format":"date-time"},"muted":{"type":"boolean"},"pinnedToSidebar":{"type":"boolean"},"archived":{"type":"boolean"},"botReadAll":{"type":"boolean"},"displayName":{"type":"string"},"avatarUrl":{"type":"string"},"accountType":{"type":"string"}}},"ApiResponseMemberResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MemberResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ForwardRequest":{"required":["fromRoomId","messageIds"],"type":"object","properties":{"fromRoomId":{"type":"string","format":"uuid"},"messageIds":{"maxItems":50,"minItems":0,"type":"array","items":{"type":"string","format":"uuid"}}}},"ApiResponseListMessageResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MessageResponse"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"MuteRoomRequest":{"type":"object","properties":{"until":{"type":"string","format":"date-time"}}},"CreatePrivateRoomRequest":{"required":["peerAccountId"],"type":"object","properties":{"peerAccountId":{"type":"string","format":"uuid"}}},"CreateReminderRequest":{"required":["fireAt","text"],"type":"object","properties":{"text":{"maxLength":2000,"minLength":0,"type":"string"},"fireAt":{"type":"string","format":"date-time"},"recurrence":{"type":"string","enum":["NONE","DAILY","WEEKLY"]},"sourceMessageId":{"type":"string","format":"uuid"},"customMetadata":{"type":"object","additionalProperties":{"type":"object"}}}},"ApiResponseReminderResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ReminderResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ReminderResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"text":{"type":"string"},"sourceMessageId":{"type":"string","format":"uuid"},"recurrence":{"type":"string","enum":["NONE","DAILY","WEEKLY"]},"nextFireAt":{"type":"string","format":"date-time"},"lastFiredAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["ACTIVE","COMPLETED","CANCELED"]},"fireCount":{"type":"integer","format":"int32"},"customMetadata":{"type":"object","additionalProperties":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"VotePollRequest":{"required":["optionIds"],"type":"object","properties":{"optionIds":{"type":"array","items":{"type":"string","format":"uuid"}}}},"ApiResponsePollResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PollResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"SaveBody":{"type":"object","properties":{"roomId":{"type":"string"},"messageId":{"type":"string"},"note":{"type":"string"}}},"ApiResponseSavedCardView":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SavedCardView"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"OriginRef":{"type":"object","properties":{"roomId":{"type":"string"},"messageId":{"type":"string"},"threadRootId":{"type":"string"},"roomType":{"type":"string"},"roomName":{"type":"string"}}},"SavedCardView":{"type":"object","properties":{"id":{"type":"string"},"note":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"origin":{"$ref":"#/components/schemas/OriginRef"},"message":{"$ref":"#/components/schemas/MessageResponse"}}},"CreateLabelRequest":{"required":["color","name"],"type":"object","properties":{"name":{"maxLength":64,"minLength":0,"type":"string"},"color":{"pattern":"^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$","type":"string"}}},"ApiResponseLabelResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LabelResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"LabelResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"type":"string"},"roomCount":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"}}},"ReadBody":{"type":"object","properties":{"upToMessageId":{"type":"string"}}},"CreateUploadSessionRequest":{"required":["fileName","mimeType","scope"],"type":"object","properties":{"scope":{"type":"string","enum":["PUBLIC","PRIVATE"]},"mimeType":{"type":"string"},"fileName":{"type":"string"},"sizeBytes":{"minimum":1,"type":"integer","format":"int64"}}},"ApiResponseUploadSession":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/UploadSession"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"UploadSession":{"type":"object","properties":{"resourceKey":{"type":"string"},"uploadUrl":{"type":"string"},"method":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}}},"CreateContactRequest":{"required":["targetAccountId"],"type":"object","properties":{"targetAccountId":{"type":"string","format":"uuid"}}},"ApiResponseContactResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ContactResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ContactResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"avatarUrl":{"type":"string"},"moduleCode":{"type":"string"},"customerAccountId":{"type":"string"},"status":{"type":"string","enum":["PENDING","ACCEPTED"]},"direction":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"respondedAt":{"type":"string","format":"date-time"}}},"CreateChannelRequest":{"required":["membershipMode","name"],"type":"object","properties":{"name":{"maxLength":256,"minLength":0,"type":"string"},"iconUrl":{"maxLength":512,"minLength":0,"type":"string"},"description":{"type":"string"},"membershipMode":{"type":"string","enum":["EXPLICIT","RULE"]},"memberIds":{"type":"array","items":{"type":"string","format":"uuid"}},"rule":{"$ref":"#/components/schemas/ChannelRuleDto"}}},"AddChannelMemberRequest":{"required":["accountId"],"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]}}},"ApiResponseChannelMemberResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ChannelMemberResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ChannelMemberResponse":{"type":"object","properties":{"channelId":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"source":{"type":"string","enum":["EXPLICIT","RULE"]},"role":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"joinedAt":{"type":"string","format":"date-time"}}},"CreateBotBody":{"required":["username"],"type":"object","properties":{"moduleCode":{"type":"string"},"customerAccountId":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"avatarUrl":{"type":"string"}}},"WebhookBody":{"type":"object","properties":{"url":{"type":"string"},"secret":{"type":"string"}}},"ApiResponseBotResp":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BotResp"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"BotResp":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"username":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"avatarUrl":{"type":"string"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"webhookUrl":{"type":"string"},"hasWebhookSecret":{"type":"boolean"}}},"CreateModuleRequest":{"required":["code","jwtIssuer","kafkaTopic","name"],"type":"object","properties":{"code":{"pattern":"[A-Z][A-Z0-9_]{1,31}","type":"string"},"name":{"maxLength":128,"minLength":0,"type":"string"},"jwtIssuer":{"maxLength":256,"minLength":0,"type":"string"},"kafkaTopic":{"maxLength":128,"minLength":0,"type":"string"},"featureConfig":{"$ref":"#/components/schemas/FeatureConfig"}}},"FeatureConfig":{"type":"object","properties":{"maxMembersPerRoom":{"type":"integer","format":"int32"},"maxMessageLength":{"type":"integer","format":"int32"},"maxFileSizeBytes":{"type":"integer","format":"int64"},"enableReactions":{"type":"boolean"},"enableThreads":{"type":"boolean"},"enablePin":{"type":"boolean"},"enableSnapToTop":{"type":"boolean"},"enableEdit":{"type":"boolean"},"editWindowSeconds":{"type":"integer","format":"int64"},"recallWindowSeconds":{"type":"integer","format":"int64"},"allowCrossModule":{"type":"boolean"},"defaultRoomHistoryVisibleToNewMember":{"type":"boolean"}}},"ApiResponseModuleResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ModuleResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ModuleResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"jwtIssuer":{"type":"string"},"kafkaTopic":{"type":"string"},"featureConfig":{"$ref":"#/components/schemas/FeatureConfig"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}}},"RegisterCustomerKeyRequest":{"required":["algorithm","customerAccountId","kid","publicKeyPem"],"type":"object","properties":{"customerAccountId":{"type":"string"},"kid":{"type":"string"},"algorithm":{"type":"string","enum":["RS256","RS384","RS512","ES256","ES384","ES512"]},"publicKeyPem":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}}},"ApiResponseCustomerKeyResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CustomerKeyResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"CustomerKeyResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"moduleId":{"type":"string","format":"uuid"},"customerAccountId":{"type":"string"},"kid":{"type":"string"},"algorithm":{"type":"string","enum":["RS256","RS384","RS512","ES256","ES384","ES512"]},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}}},"ApiResponseBroadcastView":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BroadcastView"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"BroadcastAudience":{"type":"object","properties":{"modules":{"type":"array","items":{"type":"string"}}}},"BroadcastView":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"text":{"type":"string"},"metadata":{"type":"string"},"senderName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"audience":{"$ref":"#/components/schemas/BroadcastAudience"}}},"RegisterAccountRequest":{"required":["displayName","externalUserId"],"type":"object","properties":{"externalUserId":{"maxLength":128,"minLength":0,"type":"string"},"displayName":{"maxLength":256,"minLength":0,"type":"string"},"avatarUrl":{"maxLength":512,"minLength":0,"type":"string"},"teamId":{"maxLength":128,"minLength":0,"type":"string"},"departmentId":{"maxLength":128,"minLength":0,"type":"string"},"roleExternal":{"maxLength":64,"minLength":0,"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}},"AccountResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"moduleCode":{"type":"string"},"customerAccountId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","DEACTIVATED","BANNED"]},"cnvAdmin":{"type":"boolean"},"accountType":{"type":"string","enum":["USER","BOT","SYSTEM"]},"teamId":{"type":"string"},"departmentId":{"type":"string"},"roleExternal":{"type":"string"},"tagsJson":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"ApiResponseAccountResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AccountResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"EditMessageRequest":{"type":"object","properties":{"parseMode":{"type":"string","enum":["NONE","MARKDOWN_V2","HTML"]},"raw":{"type":"string"},"text":{"maxLength":8192,"minLength":0,"type":"string"},"entities":{"type":"array","items":{"$ref":"#/components/schemas/MessageEntity"}}}},"UpdateRoomRequest":{"type":"object","properties":{"name":{"maxLength":256,"minLength":0,"type":"string"},"avatarUrl":{"maxLength":512,"minLength":0,"type":"string"},"description":{"type":"string"},"addMemberPolicy":{"type":"string","enum":["ADMIN_ONLY","ALL_MEMBERS","ALL_MEMBERS_WITH_APPROVAL"]},"backgroundConfig":{"maxLength":1048576,"minLength":0,"type":"string"}}},"UpdateMemberPreferencesRequest":{"type":"object","properties":{"notificationLevel":{"type":"string","enum":["ALL","MENTIONS","NONE"]},"mutedUntil":{"type":"string","format":"date-time"},"pinnedToSidebar":{"type":"boolean"},"archived":{"type":"boolean"}}},"UpdateReminderRequest":{"type":"object","properties":{"text":{"maxLength":2000,"minLength":0,"type":"string"},"fireAt":{"type":"string","format":"date-time"},"recurrence":{"type":"string","enum":["NONE","DAILY","WEEKLY"]},"customMetadata":{"type":"object","additionalProperties":{"type":"object"}}}},"UpdateScheduledMessageRequest":{"type":"object","properties":{"sendAt":{"type":"string","format":"date-time"},"message":{"$ref":"#/components/schemas/SendMessageRequest"}}},"NoteBody":{"type":"object","properties":{"note":{"type":"string"}}},"UpdateLabelRequest":{"type":"object","properties":{"name":{"maxLength":64,"minLength":0,"type":"string"},"color":{"pattern":"^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$","type":"string"}}},"UpdateChannelRequest":{"type":"object","properties":{"name":{"maxLength":256,"minLength":0,"type":"string"},"iconUrl":{"maxLength":512,"minLength":0,"type":"string"},"description":{"type":"string"}}},"UpdateChannelPreferencesRequest":{"type":"object","properties":{"pinnedToSidebar":{"type":"boolean"}}},"UpdateBotBody":{"type":"object","properties":{"displayName":{"type":"string"},"description":{"type":"string"},"avatarUrl":{"type":"string"}}},"ReadAllBody":{"type":"object","properties":{"readAll":{"type":"boolean"}}},"UpdateAccountStatusRequest":{"required":["status"],"type":"object","properties":{"status":{"type":"string","enum":["ACTIVE","DEACTIVATED","BANNED"]}}},"UpdateAccountMetadataRequest":{"type":"object","properties":{"teamId":{"maxLength":128,"minLength":0,"type":"string"},"departmentId":{"maxLength":128,"minLength":0,"type":"string"},"roleExternal":{"maxLength":64,"minLength":0,"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}},"ApiResponseListWebhookResp":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookResp"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseMapStringLong":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseListMapStringObject":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseListThreadSummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ThreadSummary"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ThreadSummary":{"type":"object","properties":{"rootMessage":{"$ref":"#/components/schemas/MessageResponse"},"replyCount":{"type":"integer","format":"int64"},"lastReplyAt":{"type":"string","format":"date-time"},"lastReply":{"$ref":"#/components/schemas/MessageResponse"},"unreadCount":{"type":"integer","format":"int64"},"following":{"type":"boolean"}}},"ApiResponseListPinnedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PinnedResponse"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseListReactionSummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReactionSummary"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ReactionSummary":{"type":"object","properties":{"emoji":{"type":"string"},"count":{"type":"integer","format":"int64"}}},"ApiResponseListSearchHit":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"SearchHit":{"type":"object","properties":{"messageId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"senderId":{"type":"string","format":"uuid"},"text":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"recalled":{"type":"boolean"},"highlights":{"type":"array","items":{"type":"string"}}}},"ApiResponseListMemberResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MemberResponse"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseListJoinRequestResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/JoinRequestResponse"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseListReminderResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReminderResponse"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseListScheduledMessageResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledMessageResponse"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseAuthContext":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AuthContext"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseSavedFeedView":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SavedFeedView"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"SavedFeedView":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"items":{"type":"array","items":{"$ref":"#/components/schemas/SavedCardView"}}}},"ApiResponsePageResponseMentionInboxItem":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PageResponseMentionInboxItem"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"MentionInboxItem":{"type":"object","properties":{"messageId":{"type":"string","format":"uuid"},"roomId":{"type":"string","format":"uuid"},"senderId":{"type":"string","format":"uuid"},"text":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"PageResponseMentionInboxItem":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MentionInboxItem"}},"nextCursor":{"type":"string"},"hasMore":{"type":"boolean"}}},"ApiResponseListLabelResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LabelResponse"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseFeedView":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FeedView"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"FeedView":{"type":"object","properties":{"unreadCount":{"type":"integer","format":"int64"},"lastReadBroadcastId":{"type":"string"},"senderName":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastView"}}}},"ApiResponseListContactResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactResponse"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseListChannelResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChannelResponse"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseListChannelMemberResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChannelMemberResponse"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseListBotResp":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BotResp"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseListBotRoomView":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BotRoomView"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"BotRoomView":{"type":"object","properties":{"roomId":{"type":"string","format":"uuid"},"roomName":{"type":"string"},"roomType":{"type":"string"},"readAll":{"type":"boolean"}}},"ApiResponseListModuleResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ModuleResponse"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseListCustomerKeyResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerKeyResponse"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"ApiResponseCapabilitiesView":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CapabilitiesView"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"CapabilitiesView":{"type":"object","properties":{"audience":{"type":"boolean"},"modules":{"type":"array","items":{"type":"string"}}}},"ApiResponsePresenceResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PresenceResponse"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}},"PresenceResponse":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"online":{"type":"boolean"}}},"AccountBriefResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"displayName":{"type":"string"},"avatarUrl":{"type":"string"},"moduleCode":{"type":"string"},"customerAccountId":{"type":"string"},"accountType":{"type":"string"},"external":{"type":"boolean"}}},"ApiResponseListAccountBriefResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountBriefResponse"}},"meta":{"$ref":"#/components/schemas/ApiMeta"},"error":{"$ref":"#/components/schemas/ApiError"}}}},"securitySchemes":{"bearer-jwt":{"type":"http","description":"JWT do module phát hành (RS256/ES256)","scheme":"bearer","bearerFormat":"JWT"}}}}