{"openapi":"3.1.0","info":{"title":"HRC pagalba AI agent API","version":"1.0.0","description":"Every call is POST with a JSON body and answers { error, data }. Send Authorization: Bearer <key>. Put your companyId (from /private/ai-agent-self/get) in every body that has it. Refusals: NOT_AUTHENTICATED, COMPANY_NOT_FOUND, OWNER_ROLE_REQUIRED, TOO_MANY_REQUESTS, AI_AGENTS_OFF, AI_AGENT_PAUSED, AI_AGENT_NOT_ALLOWED, AI_AGENT_SEND_NOT_ALLOWED."},"servers":[{"url":"https://api.hrc.lt"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"security":[{"bearer":[]}],"paths":{"/private/conversation/list":{"post":{"operationId":"conversation_list","summary":"List conversations in the inbox, latest activity first, 50 a page (limit up to 100; pass nextCursor as cursor for the next page). With no view it lists every conversation that is not closed: new, open and pending. view picks one status or group instead (see its values), filters narrow by chat widget, type, assignee, channel, mailbox or contact, and searchQuery finds a conversation by its number (#1042) or by text.","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"view":{"default":"unresolved","description":"Which conversations: unresolved (default) = every status but closed (new, open and pending); new = Naujas, nobody answered yet; open = Aktyvus, being handled; pending = Laukiama kliento, waiting for the customer; mine = new and open assigned to you; unassigned = new and open with no assignee; closed = Uždarytas; snoozed = put off until later; spam = marked as spam; all = every status except spam; trash = conversations a member deleted or spam that moved after 30 days, kept 30 days before they are deleted for good, newest deleted first; every other view leaves them out. Every view but snoozed, closed, spam and all leaves snoozed conversations out.","type":"string","enum":["unresolved","new","open","mine","unassigned","pending","closed","spam","all","snoozed","trash"]},"filters":{"default":{},"type":"object","properties":{"projectIds":{"maxItems":100,"type":"array","items":{"type":"string"}},"types":{"maxItems":100,"type":"array","items":{"type":"string","enum":["bug","feature","question"]}},"assigneeUserIds":{"maxItems":100,"type":"array","items":{"type":"string"}},"needsFirstReply":{"type":"boolean"},"channels":{"maxItems":100,"type":"array","items":{"type":"string","enum":["widget","email"]}},"isAwaitingReply":{"type":"boolean"},"mailboxIds":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":80}},"mailDomain":{"type":"string","minLength":1,"maxLength":253},"address":{"type":"string","minLength":3,"maxLength":254},"contactIds":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":80}},"contactRef":{"type":"string","minLength":1,"maxLength":254}},"additionalProperties":false},"searchQuery":{"type":"string","maxLength":200},"cursor":{"type":"string","maxLength":1024},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"projectId":{"type":"string"},"mailboxId":{"type":"string"},"channel":{"type":"string","enum":["widget","email"]},"type":{"type":"string","enum":["bug","feature","question",""]},"status":{"type":"string","enum":["new","open","pending","closed"]},"isSpam":{"type":"boolean"},"subject":{"type":"string"},"contact":{"type":"object","properties":{"contactId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["contactId","name","email"],"additionalProperties":false},"assigneeUserId":{"type":"string"},"lastMessage":{"type":"object","properties":{"messageId":{"type":"string"},"kind":{"type":"string","enum":["reply","note"]},"authorKind":{"type":"string","enum":["contact","agent","system"]},"authorName":{"type":"string"},"preview":{"type":"string"},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasAttachments":{"type":"boolean"},"isDeleted":{"type":"boolean"}},"required":["messageId","kind","authorKind","authorName","preview","atMs","hasAttachments","isDeleted"],"additionalProperties":false},"unreadForAgents":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsFirstReply":{"type":"boolean"},"waitingSinceMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"snoozedUntilMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"trashedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"trashedReason":{"type":"string","enum":["","manual","spam-auto"]}},"required":["companyId","conversationId","ref","projectId","mailboxId","channel","type","status","isSpam","subject","contact","assigneeUserId","lastMessage","unreadForAgents","needsFirstReply","waitingSinceMs","attachmentCount","updatedAtMs"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]},"resolvedContacts":{"type":"array","items":{"type":"object","properties":{"contactId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"projectName":{"type":"string"}},"required":["contactId","name","email","projectName"],"additionalProperties":false}}},"required":["items","nextCursor","resolvedContacts"],"additionalProperties":false}}}}}}}}},"/private/conversation/get":{"post":{"operationId":"conversation_get","summary":"Read one conversation with its messages, notes and contact.","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string"},"sinceMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["companyId","conversationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"conversation":{"type":"object","properties":{"companyId":{"type":"string"},"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"projectId":{"type":"string"},"mailboxId":{"type":"string"},"channel":{"type":"string","enum":["widget","email"]},"type":{"type":"string","enum":["bug","feature","question",""]},"status":{"type":"string","enum":["new","open","pending","closed"]},"isSpam":{"type":"boolean"},"subject":{"type":"string"},"contact":{"type":"object","properties":{"contactId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["contactId","name","email"],"additionalProperties":false},"assigneeUserId":{"type":"string"},"lastMessage":{"type":"object","properties":{"messageId":{"type":"string"},"kind":{"type":"string","enum":["reply","note"]},"authorKind":{"type":"string","enum":["contact","agent","system"]},"authorName":{"type":"string"},"preview":{"type":"string"},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasAttachments":{"type":"boolean"},"isDeleted":{"type":"boolean"}},"required":["messageId","kind","authorKind","authorName","preview","atMs","hasAttachments","isDeleted"],"additionalProperties":false},"unreadForAgents":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsFirstReply":{"type":"boolean"},"waitingSinceMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"snoozedUntilMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"trashedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"trashedReason":{"type":"string","enum":["","manual","spam-auto"]}},"required":["companyId","conversationId","ref","projectId","mailboxId","channel","type","status","isSpam","subject","contact","assigneeUserId","lastMessage","unreadForAgents","needsFirstReply","waitingSinceMs","attachmentCount","updatedAtMs"],"additionalProperties":false},"messages":{"type":"array","items":{"type":"object","properties":{"messageId":{"type":"string"},"companyId":{"type":"string"},"conversationId":{"type":"string"},"projectId":{"type":"string"},"kind":{"type":"string","enum":["reply","note","event"]},"authorKind":{"type":"string","enum":["contact","agent","system"]},"authorName":{"type":"string"},"aiAgentName":{"type":"string"},"channel":{"type":"string","enum":["widget","email","app"]},"bodyMd":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"attachments":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"fileName":{"type":"string"},"extension":{"type":"string"},"category":{"type":"string","enum":["image","video","document","other"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"widthPx":{"type":"integer","minimum":0,"maximum":9007199254740991},"heightPx":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["processing","ready","rejected","deleted"]},"rejectReason":{"type":"string","enum":["","too-large","too-long","type-mismatch","unreadable"]},"deletedReason":{"type":"string","enum":["","retention","contact-delete","company-delete","draft-expired","upload-expired"]},"hasThumbnail":{"type":"boolean"},"uploadSource":{"type":"string","enum":["file","screenshot","recording"]},"captureUrl":{"type":"string"},"capturePageTitle":{"type":"string"},"capturedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"isCaptureOnAllowedSite":{"type":"boolean"}},"required":["attachmentId","fileName","extension","category","mimeType","sizeBytes","widthPx","heightPx","durationMs","status","rejectReason","deletedReason","hasThumbnail","uploadSource","captureUrl","capturePageTitle","capturedAtMs","isCaptureOnAllowedSite"],"additionalProperties":false}},"isOwn":{"type":"boolean"},"isDeleted":{"type":"boolean"},"editedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"editableUntilMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"context":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"pageTitle":{"type":"string"},"screenWidthPx":{"type":"integer","minimum":0,"maximum":9007199254740991},"screenHeightPx":{"type":"integer","minimum":0,"maximum":9007199254740991},"viewportWidthPx":{"type":"integer","minimum":0,"maximum":9007199254740991},"viewportHeightPx":{"type":"integer","minimum":0,"maximum":9007199254740991},"timeZone":{"type":"string"},"appVersion":{"type":"string"},"customEntries":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false}},"isOnAllowedSite":{"type":"boolean"},"devicePixelRatio":{"type":"number"},"visitorContext":{"anyOf":[{"type":"object","properties":{"referrer":{"type":"string","maxLength":1000},"orientation":{"type":"string","enum":["portrait","landscape"]},"isTouch":{"type":"boolean"},"languages":{"maxItems":5,"type":"array","items":{"type":"string","maxLength":35}},"utcOffsetMin":{"type":"integer","minimum":-1440,"maximum":1440},"browserVersion":{"type":"string","maxLength":40},"osVersion":{"type":"string","maxLength":40},"connectionType":{"type":"string","maxLength":20},"isOnline":{"type":"boolean"},"areCookiesEnabled":{"type":"boolean"},"widgetBuild":{"type":"string","maxLength":40},"loaderVersion":{"type":"string","maxLength":40},"hostErrors":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"message":{"type":"string","maxLength":300},"source":{"type":"string","maxLength":300},"line":{"type":"integer","minimum":0,"maximum":10000000},"col":{"type":"integer","minimum":0,"maximum":10000000},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["message","source","line","col","atMs"],"additionalProperties":false}},"userAgent":{"type":"string","maxLength":400}},"additionalProperties":false},{"type":"null"}]}},"required":["url","pageTitle","screenWidthPx","screenHeightPx","viewportWidthPx","viewportHeightPx","timeZone","appVersion","customEntries","isOnAllowedSite","devicePixelRatio","visitorContext"],"additionalProperties":false},{"type":"null"}]},"quotedMd":{"type":"string"},"email":{"anyOf":[{"type":"object","properties":{"from":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"}},"required":["name","address"],"additionalProperties":false},"to":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"}},"required":["name","address"],"additionalProperties":false}},"cc":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"}},"required":["name","address"],"additionalProperties":false}},"senderCheck":{"type":"string","enum":["pass","fail"]},"isFromOtherAddress":{"type":"boolean"},"isAutoReply":{"type":"boolean"},"isAddressConfirmation":{"type":"boolean"},"hasOriginal":{"type":"boolean"},"bodyHtml":{"type":"string"},"filesLeftOut":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string"},"reason":{"type":"string","enum":["quota","too-large","type","too-many","unavailable"]}},"required":["fileName","reason"],"additionalProperties":false}}},"required":["from","to","cc","senderCheck","isFromOtherAddress","isAutoReply","isAddressConfirmation","hasOriginal","bodyHtml","filesLeftOut"],"additionalProperties":false},{"type":"null"}]},"delivery":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["queued","sending","sent","failed","cancelled"]},"content":{"type":"string","enum":["reply","address-check"]},"toAddress":{"type":"string"},"failureClass":{"type":"string","enum":["rejected","auth","connection","quota","bounced","paused","unknown",""]},"sentAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"wasSent":{"type":"boolean"},"canRetry":{"type":"boolean"}},"required":["status","content","toAddress","failureClass","sentAtMs","wasSent","canRetry"],"additionalProperties":false},{"type":"null"}]},"event":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["status-changed","assigned","type-changed","project-changed","contact-changed","contacts-merged","snoozed","unsnoozed","spam-marked","spam-unmarked"]},"from":{"type":"string"},"to":{"type":"string"},"byUserId":{"type":"string"}},"required":["type","from","to","byUserId"],"additionalProperties":false},{"type":"null"}]}},"required":["messageId","companyId","conversationId","projectId","kind","authorKind","authorName","channel","bodyMd","createdAtMs","attachments","isOwn","isDeleted","editedAtMs","editableUntilMs","context","quotedMd","email","delivery","event"],"additionalProperties":false}},"hasMore":{"type":"boolean"},"replyRecipient":{"type":"string"},"isReplyRecipientBounced":{"type":"boolean"},"emailAttachmentLimitBytes":{"type":["number","null"]},"canAttachFiles":{"type":"boolean"},"mailboxAddress":{"type":"string"},"allowedActions":{"type":"object","properties":{"canReply":{"type":"boolean"},"canNote":{"type":"boolean"},"canSetStatus":{"type":"boolean"},"canAssign":{"type":"boolean"},"canSetType":{"type":"boolean"},"canSetProject":{"type":"boolean"}},"required":["canReply","canNote","canSetStatus","canAssign","canSetType","canSetProject"],"additionalProperties":false},"contactDetails":{"type":"object","properties":{"contactId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"isEmailVerified":{"type":"boolean"},"emailCheck":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["ok","catch_all","unknown","disposable","invalid"]},"quality":{"type":"string","enum":["good","risky","bad"]},"state":{"type":"string","enum":["fresh","expired"]},"checkedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"expiresAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"didYouMean":{"type":"string"},"isRole":{"type":"boolean"},"isFree":{"type":"boolean"},"source":{"type":"string","enum":["bulk","single","registry-import"]}},"required":["status","quality","state","checkedAtMs","expiresAtMs","didYouMean","isRole","isFree","source"],"additionalProperties":false},{"type":"null"}]},"language":{"type":"string","enum":["lt","en","ru","pl","uk",""]},"lastSeenAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"projects":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"name":{"type":"string"}},"required":["projectId","name"],"additionalProperties":false}},"externalIds":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"projectName":{"type":"string"},"isVerified":{"type":"boolean"}},"required":["value","projectName","isVerified"],"additionalProperties":false}},"context":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"isOnAllowedSite":{"type":"boolean"},"deviceLabel":{"type":"string"},"screenWidthPx":{"type":"integer","minimum":0,"maximum":9007199254740991},"screenHeightPx":{"type":"integer","minimum":0,"maximum":9007199254740991},"viewportWidthPx":{"type":"integer","minimum":0,"maximum":9007199254740991},"viewportHeightPx":{"type":"integer","minimum":0,"maximum":9007199254740991},"appVersion":{"type":"string"},"countryCode":{"type":"string"},"timeZone":{"type":"string"}},"required":["url","isOnAllowedSite","deviceLabel","screenWidthPx","screenHeightPx","viewportWidthPx","viewportHeightPx","appVersion","countryCode","timeZone"],"additionalProperties":false},{"type":"null"}]},"visitor":{"anyOf":[{"type":"object","properties":{"countryCode":{"type":"string"},"ipAddress":{"type":"string"},"deviceType":{"type":"string","enum":["desktop","tablet","mobile",""]},"browserName":{"type":"string"},"browserMajorVersion":{"type":"string"},"osName":{"type":"string"},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["countryCode","ipAddress","deviceType","browserName","browserMajorVersion","osName","atMs"],"additionalProperties":false},{"type":"null"}]},"related":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"subject":{"type":"string"},"projectId":{"type":"string"},"channel":{"type":"string","enum":["widget","email"]},"status":{"type":"string","enum":["new","open","pending","closed"]},"isSpam":{"type":"boolean"},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["conversationId","ref","subject","projectId","channel","status","isSpam","atMs"],"additionalProperties":false}},"hasMoreRelated":{"type":"boolean"}},"required":["contactId","name","email","isEmailVerified","emailCheck","language","lastSeenAtMs","projects","externalIds","context","visitor","related","hasMoreRelated"],"additionalProperties":false}},"required":["conversation","messages","hasMore","replyRecipient","isReplyRecipientBounced","emailAttachmentLimitBytes","canAttachFiles","mailboxAddress","allowedActions","contactDetails"],"additionalProperties":false}}}}}}}}},"/private/conversation/counts":{"post":{"operationId":"conversation_counts","summary":"Count conversations per inbox view.","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"filters":{"default":{},"type":"object","properties":{"projectIds":{"maxItems":100,"type":"array","items":{"type":"string"}},"types":{"maxItems":100,"type":"array","items":{"type":"string","enum":["bug","feature","question"]}},"assigneeUserIds":{"maxItems":100,"type":"array","items":{"type":"string"}},"needsFirstReply":{"type":"boolean"},"channels":{"maxItems":100,"type":"array","items":{"type":"string","enum":["widget","email"]}},"isAwaitingReply":{"type":"boolean"},"mailboxIds":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":80}},"mailDomain":{"type":"string","minLength":1,"maxLength":253},"address":{"type":"string","minLength":3,"maxLength":254},"contactIds":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":80}},"contactRef":{"type":"string","minLength":1,"maxLength":254}},"additionalProperties":false}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"new":{"type":"integer","minimum":0,"maximum":9007199254740991},"open":{"type":"integer","minimum":0,"maximum":9007199254740991},"mine":{"type":"integer","minimum":0,"maximum":9007199254740991},"unassigned":{"type":"integer","minimum":0,"maximum":9007199254740991},"pending":{"type":"integer","minimum":0,"maximum":9007199254740991},"closed":{"type":"integer","minimum":0,"maximum":9007199254740991},"spam":{"type":"integer","minimum":0,"maximum":9007199254740991},"all":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsFirstReply":{"type":"integer","minimum":0,"maximum":9007199254740991},"unreadOpen":{"type":"integer","minimum":0,"maximum":9007199254740991},"snoozed":{"type":"integer","minimum":0,"maximum":9007199254740991},"trash":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["new","open","mine","unassigned","pending","closed","spam","all","needsFirstReply","unreadOpen","snoozed","trash"],"additionalProperties":false}}}}}}}}},"/private/conversation/changes":{"post":{"operationId":"conversation_changes","summary":"List conversations and messages that changed since a time.","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"sinceCursor":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["companyId","sinceCursor"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"projectId":{"type":"string"},"mailboxId":{"type":"string"},"channel":{"type":"string","enum":["widget","email"]},"type":{"type":"string","enum":["bug","feature","question",""]},"status":{"type":"string","enum":["new","open","pending","closed"]},"isSpam":{"type":"boolean"},"subject":{"type":"string"},"contact":{"type":"object","properties":{"contactId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["contactId","name","email"],"additionalProperties":false},"assigneeUserId":{"type":"string"},"lastMessage":{"type":"object","properties":{"messageId":{"type":"string"},"kind":{"type":"string","enum":["reply","note"]},"authorKind":{"type":"string","enum":["contact","agent","system"]},"authorName":{"type":"string"},"preview":{"type":"string"},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasAttachments":{"type":"boolean"},"isDeleted":{"type":"boolean"}},"required":["messageId","kind","authorKind","authorName","preview","atMs","hasAttachments","isDeleted"],"additionalProperties":false},"unreadForAgents":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsFirstReply":{"type":"boolean"},"waitingSinceMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"snoozedUntilMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"trashedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"trashedReason":{"type":"string","enum":["","manual","spam-auto"]}},"required":["companyId","conversationId","ref","projectId","mailboxId","channel","type","status","isSpam","subject","contact","assigneeUserId","lastMessage","unreadForAgents","needsFirstReply","waitingSinceMs","attachmentCount","updatedAtMs"],"additionalProperties":false}},"removedIds":{"type":"array","items":{"type":"string"}},"nextCursor":{"type":"integer","minimum":0,"maximum":9007199254740991},"requiresResync":{"type":"boolean","const":true}},"required":["rows","removedIds","nextCursor","requiresResync"],"additionalProperties":false}}}}}}}}},"/private/contact/list":{"post":{"operationId":"contact_list","summary":"List or search contacts with filters (stage, assignee, tags, reminder, last contacted, company, a custom field), a sort, and a list (all, mine, reminders or a list id).","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"searchQuery":{"type":"string","maxLength":200},"projectId":{"type":"string","maxLength":80},"contactListId":{"type":"string","minLength":1,"maxLength":80},"filters":{"type":"object","properties":{"stages":{"maxItems":6,"type":"array","items":{"type":"string","enum":["","lead","talking","customer","former","not-fit"]}},"assignee":{"anyOf":[{"type":"string","const":"me"},{"type":"string","const":"none"},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}]},"tagKeys":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"}},"projectIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"reminder":{"type":"string","enum":["overdue","today","week","any","none"]},"lastContacted":{"type":"string","enum":["never","over-7d","over-30d","over-90d"]},"hasConversations":{"type":"boolean"},"createdWithinDays":{"anyOf":[{"type":"number","const":7},{"type":"number","const":30},{"type":"number","const":90}]},"companyName":{"type":"string","minLength":1,"maxLength":120},"field":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["is","set","not-set"]},"value":{"anyOf":[{"type":"string","maxLength":255},{"type":"number"},{"type":"boolean"}]}},"required":["key","op"],"additionalProperties":false},"emailCheck":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["valid","risky","bad","expired","unchecked"]}}},"additionalProperties":false},"sort":{"type":"string","enum":["last-activity","name","last-contacted","reminder","created"]},"fieldKeys":{"maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"cursor":{"type":"string","maxLength":1024},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"contactId":{"type":"string"},"name":{"type":"string"},"primaryEmail":{"type":"string"},"unverifiedEmail":{"type":"string"},"identitiesCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"projects":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["blue","green","amber","red","violet","teal","pink","gray"]}},"required":["projectId","name","color"],"additionalProperties":false}},"conversationCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastSeenAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastConversationAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"emailBouncedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"blockedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"isEmailVerified":{"type":"boolean"},"emailCheck":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["ok","catch_all","unknown","disposable","invalid"]},"quality":{"type":"string","enum":["good","risky","bad"]},"state":{"type":"string","enum":["fresh","expired"]},"checkedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"expiresAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"didYouMean":{"type":"string"},"isRole":{"type":"boolean"},"isFree":{"type":"boolean"},"source":{"type":"string","enum":["bulk","single","registry-import"]}},"required":["status","quality","state","checkedAtMs","expiresAtMs","didYouMean","isRole","isFree","source"],"additionalProperties":false},{"type":"null"}]},"displayName":{"type":"string"},"phone":{"type":"string"},"avatarUrl":{"type":"string"},"companyName":{"type":"string"},"stage":{"type":"string","enum":["","lead","talking","customer","former","not-fit"]},"assigneeUserId":{"type":"string"},"tagKeys":{"type":"array","items":{"type":"string"}},"listIds":{"type":"array","items":{"type":"string"}},"projectIds":{"type":"array","items":{"type":"string"}},"lastContactedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastActivityAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"reminderAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"reminderNote":{"type":"string"},"reminderKind":{"type":"string","enum":["reminder","call","meeting"]},"reminderUserId":{"type":"string"},"openPlannedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"nextPlannedItemId":{"type":"string"},"isReminderOverdue":{"type":"boolean"},"fieldValues":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"value":{"type":["string","number","boolean"]},"source":{"type":"string","enum":["team","app","browser"]}},"required":["key","type","value","source"],"additionalProperties":false}}},"required":["companyId","contactId","name","primaryEmail","unverifiedEmail","identitiesCount","projects","conversationCount","lastSeenAtMs","lastConversationAtMs","emailBouncedAtMs","blockedAtMs","isEmailVerified","emailCheck","displayName","phone","avatarUrl","companyName","stage","assigneeUserId","tagKeys","listIds","projectIds","lastContactedAtMs","lastActivityAtMs","createdAtMs","reminderAtMs","reminderNote","reminderKind","reminderUserId","openPlannedCount","nextPlannedItemId","isReminderOverdue","fieldValues"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}}}}}}},"/private/contact/find":{"post":{"operationId":"contact_find","summary":"Find a contact by exact e-mail, or by external id in one chat widget. Returns null when nobody matches.","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"email":{"type":"string","maxLength":254},"externalId":{"type":"string","minLength":1,"maxLength":254},"projectId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"contactId":{"type":["string","null"]},"name":{"type":"string"}},"required":["contactId","name"],"additionalProperties":false}}}}}}}}},"/private/contact/timeline":{"post":{"operationId":"contact_timeline","summary":"Read a contact's notes, logged calls and meetings, changes, conversations and site activity, newest first.","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactId":{"type":"string","maxLength":80},"kinds":{"maxItems":5,"type":"array","items":{"type":"string","enum":["note","logged","change","conversation","event"]}},"cursor":{"type":"string","maxLength":1024},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100}},"required":["companyId","contactId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"kind":{"type":"string","enum":["note","logged","change","conversation","event"]},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"text":{"type":"string"},"loggedKind":{"anyOf":[{"type":"string","enum":["call","meeting","other"]},{"type":"string","const":""}]},"change":{"anyOf":[{"type":"object","properties":{"what":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"valueType":{"type":"string","enum":["","string","number","boolean","date"]},"plannedKind":{"type":"string","enum":["","reminder","call","meeting"]}},"required":["what","from","to","valueType","plannedKind"],"additionalProperties":false},{"type":"null"}]},"byUserId":{"type":"string"},"byName":{"type":"string"},"canEdit":{"type":"boolean"},"conversation":{"anyOf":[{"type":"object","properties":{"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"subject":{"type":"string"},"status":{"type":"string"},"channel":{"type":"string","enum":["widget","email"]},"projectId":{"type":"string"},"lastMessagePreview":{"type":"string"}},"required":["conversationId","ref","subject","status","channel","projectId","lastMessagePreview"],"additionalProperties":false},{"type":"null"}]},"event":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"props":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string"},"value":{"type":["string","number","boolean"]}},"required":["key","type","value"],"additionalProperties":false}},"source":{"type":"string","enum":["team","app","browser"]}},"required":["name","props","source"],"additionalProperties":false},{"type":"null"}]}},"required":["itemId","kind","atMs","text","loggedKind","change","byUserId","byName","canEdit","conversation","event"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}}}}}}},"/private/contact-tag/list":{"post":{"operationId":"contact_tag_list","summary":"List the company's contact tags.","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"tagKey":{"type":"string"},"label":{"type":"string"},"color":{"type":"string","enum":["amber","blue","gray","green","pink","purple","red","teal"]},"contactCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["tagKey","label","color","contactCount"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}}}}}}},"/private/contact-list/list":{"post":{"operationId":"contact_list_list","summary":"List the contact lists (manual and by filters) with their counts.","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"builtIns":{"type":"object","properties":{"allCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"allWroteCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"mineCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"remindersCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["allCount","allWroteCount","mineCount","remindersCount"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"contactListId":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["manual","filter"]},"visibility":{"type":"string","enum":["team","me"]},"filters":{"anyOf":[{"type":"object","properties":{"stages":{"maxItems":6,"type":"array","items":{"type":"string","enum":["","lead","talking","customer","former","not-fit"]}},"assignee":{"anyOf":[{"type":"string","const":"me"},{"type":"string","const":"none"},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}]},"tagKeys":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"}},"projectIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"reminder":{"type":"string","enum":["overdue","today","week","any","none"]},"lastContacted":{"type":"string","enum":["never","over-7d","over-30d","over-90d"]},"hasConversations":{"type":"boolean"},"createdWithinDays":{"anyOf":[{"type":"number","const":7},{"type":"number","const":30},{"type":"number","const":90}]},"companyName":{"type":"string","minLength":1,"maxLength":120},"field":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["is","set","not-set"]},"value":{"anyOf":[{"type":"string","maxLength":255},{"type":"number"},{"type":"boolean"}]}},"required":["key","op"],"additionalProperties":false},"emailCheck":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["valid","risky","bad","expired","unchecked"]}}},"additionalProperties":false},{"type":"null"}]},"sort":{"anyOf":[{"type":"string","enum":["last-activity","name","last-contacted","reminder","created"]},{"type":"string","const":""}]},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"canEdit":{"type":"boolean"}},"required":["contactListId","name","kind","visibility","filters","sort","count","canEdit"],"additionalProperties":false}}},"required":["builtIns","items"],"additionalProperties":false}}}}}}}}},"/private/contact-field/list":{"post":{"operationId":"contact_field_list","summary":"List the company's custom contact fields with their keys, types and options.","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"contactFieldId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["boolean","choice","date","link","number","text"]},"options":{"type":"array","items":{"type":"string"}},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["contactFieldId","key","label","type","options","position"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}}}}}}},"/private/contact/get":{"post":{"operationId":"contact_get","summary":"Read one contact with its e-mail addresses, identities, profile (company, phone, tags, attributes) and recent activity.","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactId":{"type":"string","maxLength":80}},"required":["companyId","contactId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"contact":{"type":"object","properties":{"companyId":{"type":"string"},"contactId":{"type":"string"},"name":{"type":"string"},"nameSource":{"type":"string","enum":["identify","widget","email","agent",""]},"primaryEmail":{"type":"string"},"unverifiedEmail":{"type":"string"},"emailCheck":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["ok","catch_all","unknown","disposable","invalid"]},"quality":{"type":"string","enum":["good","risky","bad"]},"state":{"type":"string","enum":["fresh","expired"]},"checkedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"expiresAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"didYouMean":{"type":"string"},"isRole":{"type":"boolean"},"isFree":{"type":"boolean"},"source":{"type":"string","enum":["bulk","single","registry-import"]}},"required":["status","quality","state","checkedAtMs","expiresAtMs","didYouMean","isRole","isFree","source"],"additionalProperties":false},{"type":"null"}]},"language":{"type":"string","enum":["","lt","en","ru","pl","uk"]},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"attributeEntries":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"value":{"type":["string","number","boolean"]},"source":{"type":"string","enum":["team","app","browser"]},"isVerified":{"type":"boolean"},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","type","value","source","isVerified","updatedAtMs"],"additionalProperties":false}},"phone":{"type":"string"},"phoneSource":{"anyOf":[{"type":"string","enum":["team","app","browser"]},{"type":"string","const":""}]},"avatarUrl":{"type":"string"},"avatarSource":{"anyOf":[{"type":"string","enum":["team","app","browser"]},{"type":"string","const":""}]},"company":{"anyOf":[{"type":"object","properties":{"externalId":{"type":"string"},"name":{"type":"string"},"website":{"type":"string"},"plan":{"type":"string"},"source":{"type":"string","enum":["team","app","browser"]},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["externalId","name","website","plan","source","updatedAtMs"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"tag":{"type":"string"},"source":{"type":"string","enum":["team","app","browser"]},"addedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["tag","source","addedAtMs"],"additionalProperties":false}},"recentEvents":{"type":"array","items":{"type":"object","properties":{"contactEventId":{"type":"string"},"contactId":{"type":"string"},"projectId":{"type":"string"},"name":{"type":"string"},"props":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"value":{"type":["string","number","boolean"]}},"required":["key","type","value"],"additionalProperties":false}},"source":{"type":"string","enum":["team","app","browser"]},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["contactEventId","contactId","projectId","name","props","source","atMs"],"additionalProperties":false}},"lastSeenAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastSeenProjectId":{"type":"string"},"conversationCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastConversationAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"blockedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"projects":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["blue","green","amber","red","violet","teal","pink","gray"]}},"required":["projectId","name","color"],"additionalProperties":false}},"identities":{"type":"array","items":{"type":"object","properties":{"contactIdentityId":{"type":"string"},"kind":{"type":"string","enum":["email","external_id"]},"projectId":{"type":"string"},"projectName":{"type":"string"},"value":{"type":"string"},"source":{"type":"string","enum":["inbound","user-hash","email-reply","agent"]},"isVerified":{"type":"boolean"},"verifiedVia":{"type":"string","enum":["user-hash","email-reply","agent",""]},"firstSeenAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastSeenAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"bouncedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["contactIdentityId","kind","projectId","projectName","value","source","isVerified","verifiedVia","firstSeenAtMs","lastSeenAtMs","bouncedAtMs"],"additionalProperties":false}},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"contactId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"projects":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["blue","green","amber","red","violet","teal","pink","gray"]}},"required":["projectId","name","color"],"additionalProperties":false}},"conversationCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastSeenAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"stage":{"type":"string","enum":["","lead","talking","customer","former","not-fit"]},"assigneeUserId":{"type":"string"}},"required":["contactId","name","email","projects","conversationCount","lastSeenAtMs","stage","assigneeUserId"],"additionalProperties":false}},"stage":{"type":"string","enum":["","lead","talking","customer","former","not-fit"]},"assigneeUserId":{"type":"string"},"listIds":{"type":"array","items":{"type":"string"}},"lastContactedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastActivityAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"reminderAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"reminderNote":{"type":"string"},"reminderUserId":{"type":"string"},"reminderKind":{"type":"string","enum":["reminder","call","meeting"]},"openPlannedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"nextPlannedItemId":{"type":"string"},"isReminderOverdue":{"type":"boolean"},"createdVia":{"type":"string","enum":["widget","email","agent","team","import","api"]},"canWriteEmail":{"type":"boolean"},"writeEmailBlockedReason":{"type":"string","enum":["","no-mailbox","no-email"]},"latestConversationId":{"type":"string"}},"required":["companyId","contactId","name","nameSource","primaryEmail","unverifiedEmail","emailCheck","language","attributes","attributeEntries","phone","phoneSource","avatarUrl","avatarSource","company","tags","recentEvents","lastSeenAtMs","lastSeenProjectId","conversationCount","lastConversationAtMs","blockedAtMs","createdAtMs","projects","identities","possibleDuplicates","stage","assigneeUserId","listIds","lastContactedAtMs","lastActivityAtMs","reminderAtMs","reminderNote","reminderUserId","reminderKind","openPlannedCount","nextPlannedItemId","isReminderOverdue","createdVia","canWriteEmail","writeEmailBlockedReason","latestConversationId"],"additionalProperties":false},"isContactJournalActive":{"type":"boolean"}},"required":["contact","isContactJournalActive"],"additionalProperties":false}}}}}}}}},"/private/contact/related":{"post":{"operationId":"contact_related","summary":"List the conversations of one contact.","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactId":{"type":"string","maxLength":80},"scope":{"type":"string","enum":["all","project"]},"projectId":{"type":"string","maxLength":80},"excludeConversationId":{"type":"string","maxLength":80},"cursor":{"type":"string","maxLength":1024},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"required":["companyId","contactId","scope"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"projectId":{"type":"string"},"mailboxId":{"type":"string"},"channel":{"type":"string","enum":["widget","email"]},"type":{"type":"string","enum":["bug","feature","question",""]},"status":{"type":"string","enum":["new","open","pending","closed"]},"isSpam":{"type":"boolean"},"subject":{"type":"string"},"contact":{"type":"object","properties":{"contactId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["contactId","name","email"],"additionalProperties":false},"assigneeUserId":{"type":"string"},"lastMessage":{"type":"object","properties":{"messageId":{"type":"string"},"kind":{"type":"string","enum":["reply","note"]},"authorKind":{"type":"string","enum":["contact","agent","system"]},"authorName":{"type":"string"},"preview":{"type":"string"},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasAttachments":{"type":"boolean"},"isDeleted":{"type":"boolean"}},"required":["messageId","kind","authorKind","authorName","preview","atMs","hasAttachments","isDeleted"],"additionalProperties":false},"unreadForAgents":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsFirstReply":{"type":"boolean"},"waitingSinceMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"snoozedUntilMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"trashedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"trashedReason":{"type":"string","enum":["","manual","spam-auto"]}},"required":["companyId","conversationId","ref","projectId","mailboxId","channel","type","status","isSpam","subject","contact","assigneeUserId","lastMessage","unreadForAgents","needsFirstReply","waitingSinceMs","attachmentCount","updatedAtMs"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}}}}}}},"/private/contact/event-list":{"post":{"operationId":"contact_event_list","summary":"List what a contact did on the company's site (events the site recorded), newest first.","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactId":{"type":"string","maxLength":80},"cursor":{"type":"string","maxLength":100},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["companyId","contactId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"contactEventId":{"type":"string"},"contactId":{"type":"string"},"projectId":{"type":"string"},"name":{"type":"string"},"props":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"value":{"type":["string","number","boolean"]}},"required":["key","type","value"],"additionalProperties":false}},"source":{"type":"string","enum":["team","app","browser"]},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["contactEventId","contactId","projectId","name","props","source","atMs"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}}}}}}},"/private/conversation/assign":{"post":{"operationId":"conversation_assign","summary":"Assign a conversation to a team member or remove the assignee.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string"},"assigneeUserId":{"type":"string"}},"required":["companyId","conversationId","assigneeUserId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"conversationId":{"type":"string"}},"required":["companyId","conversationId"],"additionalProperties":false}}}}}}}}},"/private/conversation/set-status":{"post":{"operationId":"conversation_set_status","summary":"Change the status of a conversation: new, open, pending or closed.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","closed"]}},"required":["companyId","conversationId","status"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"conversationId":{"type":"string"}},"required":["companyId","conversationId"],"additionalProperties":false}}}}}}}}},"/private/conversation/set-type":{"post":{"operationId":"conversation_set_type","summary":"Set the type of a conversation: bug, feature or question.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string"},"type":{"type":"string","enum":["bug","feature","question"]}},"required":["companyId","conversationId","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"conversationId":{"type":"string"}},"required":["companyId","conversationId"],"additionalProperties":false}}}}}}}}},"/private/conversation/set-spam":{"post":{"operationId":"conversation_set_spam","summary":"Mark a conversation as spam or not spam.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string","minLength":1,"maxLength":64},"isSpam":{"type":"boolean"},"doBlockContact":{"type":"boolean"}},"required":["companyId","conversationId","isSpam"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"conversationId":{"type":"string"},"isSpam":{"type":"boolean"}},"required":["companyId","conversationId","isSpam"],"additionalProperties":false}}}}}}}}},"/private/conversation/set-project":{"post":{"operationId":"conversation_set_project","summary":"Move a conversation to another chat widget.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string"},"projectId":{"type":"string"}},"required":["companyId","conversationId","projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"conversationId":{"type":"string"}},"required":["companyId","conversationId"],"additionalProperties":false}}}}}}}}},"/private/conversation/set-contact":{"post":{"operationId":"conversation_set_contact","summary":"Link a conversation to another contact.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string","maxLength":80},"contactId":{"type":"string","maxLength":80}},"required":["companyId","conversationId","contactId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"conversationId":{"type":"string"}},"required":["companyId","conversationId"],"additionalProperties":false}}}}}}}}},"/private/contact/update":{"post":{"operationId":"contact_update","summary":"Change a contact's name, language, stage (lead, talking, customer, former, not-fit) or assignee.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":120},"language":{"type":"string","enum":["lt","en","ru","pl","uk"]},"stage":{"type":"string","enum":["","lead","talking","customer","former","not-fit"]},"assigneeUserId":{"type":"string","maxLength":80}},"required":["companyId","contactId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"contactId":{"type":"string"}},"required":["companyId","contactId"],"additionalProperties":false}}}}}}}}},"/private/contact/create":{"post":{"operationId":"contact_create","summary":"Add a contact by hand with name, e-mail, phone, company, stage, assignee, tags and lists.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","maxLength":120},"email":{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":254}]},"phone":{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":32}]},"companyName":{"type":"string","maxLength":120},"stage":{"type":"string","enum":["","lead","talking","customer","former","not-fit"]},"assigneeUserId":{"type":"string","maxLength":80},"tagKeys":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"}},"contactListIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"note":{"type":"string","maxLength":5000}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"contactId":{"type":"string"},"name":{"type":"string"}},"required":["companyId","contactId","name"],"additionalProperties":false}}}}}}}}},"/private/contact/upsert":{"post":{"operationId":"contact_upsert","summary":"Create or update a contact by e-mail or external id, with profile values, stage and tags. Never merges contacts.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"email":{"type":"string","maxLength":254},"externalId":{"type":"string","minLength":1,"maxLength":254},"projectId":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","maxLength":120},"phone":{"type":"string","maxLength":32},"company":{"anyOf":[{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":120},"website":{"type":"string","maxLength":255,"format":"starts_with","pattern":"^https:\\/\\/.*"},"plan":{"type":"string","minLength":1,"maxLength":60}},"required":["name"],"additionalProperties":false},{"type":"null"}]},"stage":{"type":"string","enum":["","lead","talking","customer","former","not-fit"]},"set":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"type":{"type":"string","enum":["string","number","boolean","date"]},"value":{"anyOf":[{"type":"string","maxLength":510},{"type":"number"},{"type":"boolean"}]}},"required":["key","type","value"],"additionalProperties":false}},"addTags":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"}}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"contactId":{"type":"string"},"wasCreated":{"type":"boolean"},"skippedKeys":{"type":"array","items":{"type":"string"}}},"required":["companyId","contactId","wasCreated","skippedKeys"],"additionalProperties":false}}}}}}}}},"/private/contact/set-reminder":{"post":{"operationId":"contact_set_reminder","summary":"Set or remove (reminderAtMs 0) the follow-up reminder of a contact.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactId":{"type":"string","maxLength":80},"reminderAtMs":{"type":"integer","minimum":0,"maximum":7258118400000},"note":{"type":"string","maxLength":200}},"required":["companyId","contactId","reminderAtMs"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"contactId":{"type":"string"}},"required":["companyId","contactId"],"additionalProperties":false}}}}}}}}},"/private/contact/complete-reminder":{"post":{"operationId":"contact_complete_reminder","summary":"Mark a contact's reminder done.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactId":{"type":"string","maxLength":80}},"required":["companyId","contactId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"contactId":{"type":"string"}},"required":["companyId","contactId"],"additionalProperties":false}}}}}}}}},"/private/contact/note-create":{"post":{"operationId":"contact_note_create","summary":"Add a team note, or log a call, meeting or other contact, on a contact's timeline. Contacts never see it.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactId":{"type":"string","maxLength":80},"kind":{"type":"string","enum":["note","logged"]},"loggedKind":{"type":"string","enum":["call","meeting","other"]},"text":{"type":"string","minLength":1,"maxLength":5000},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["companyId","contactId","kind","text"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"contactActivityId":{"type":"string"}},"required":["companyId","contactActivityId"],"additionalProperties":false}}}}}}}}},"/private/contact/note-update":{"post":{"operationId":"contact_note_update","summary":"Edit a note or logged contact this agent wrote.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactActivityId":{"type":"string","maxLength":80},"text":{"type":"string","minLength":1,"maxLength":5000}},"required":["companyId","contactActivityId","text"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"contactActivityId":{"type":"string"}},"required":["companyId","contactActivityId"],"additionalProperties":false}}}}}}}}},"/private/contact/event-create":{"post":{"operationId":"contact_event_create","summary":"Record what a contact did in the company's own system (an event with properties), shown on the timeline.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactId":{"type":"string","maxLength":80},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{0,63}$"},"props":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"type":{"type":"string","enum":["string","number","boolean","date"]},"value":{"anyOf":[{"type":"string","maxLength":510},{"type":"number"},{"type":"boolean"}]}},"required":["key","type","value"],"additionalProperties":false}},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name"],"additionalProperties":false}}},"required":["companyId","contactId","events"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"contactId":{"type":"string"},"acceptedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["companyId","contactId","acceptedCount"],"additionalProperties":false}}}}}}}}},"/private/contact/bulk":{"post":{"operationId":"contact_bulk","summary":"Change the stage, assignee, tags, manual list or reminder of up to 100 contacts at once.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"stage"},"stage":{"type":"string","enum":["","lead","talking","customer","former","not-fit"]}},"required":["kind","stage"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"assign"},"assigneeUserId":{"type":"string","maxLength":80}},"required":["kind","assigneeUserId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"add-tags"},"tagKeys":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"}}},"required":["kind","tagKeys"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"remove-tags"},"tagKeys":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"}}},"required":["kind","tagKeys"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"add-to-list"},"contactListId":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","contactListId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"remove-from-list"},"contactListId":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","contactListId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"set-reminder"},"reminderAtMs":{"type":"integer","minimum":1,"maximum":7258118400000},"note":{"type":"string","maxLength":200}},"required":["kind","reminderAtMs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"remove-reminder"}},"required":["kind"],"additionalProperties":false}]}},"required":["companyId","contactIds","action"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"contactId":{"type":"string"},"isOk":{"type":"boolean"},"errorCode":{"type":"string"}},"required":["contactId","isOk","errorCode"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}}}}}}}}},"/private/contact/import":{"post":{"operationId":"contact_import","summary":"Create or update up to 100 contacts from rows (name, e-mail, phone, company, stage, tags, note, fields).","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"importId":{"type":"string","minLength":1,"maxLength":80},"isDryRun":{"type":"boolean"},"onDuplicate":{"type":"string","enum":["update","skip"]},"apply":{"type":"object","properties":{"tagKeys":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"}},"contactListId":{"type":"string","minLength":1,"maxLength":80},"stage":{"type":"string","enum":["","lead","talking","customer","former","not-fit"]},"assigneeUserId":{"type":"string","maxLength":80}},"additionalProperties":false},"rows":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"rowNumber":{"type":"integer","minimum":0,"maximum":1000000},"name":{"type":"string","maxLength":200},"email":{"type":"string","maxLength":320},"phone":{"type":"string","maxLength":60},"companyName":{"type":"string","maxLength":200},"stage":{"type":"string","maxLength":60},"tagLabels":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":60}},"note":{"type":"string","maxLength":5000},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"value":{"type":"string","maxLength":500}},"required":["key","value"],"additionalProperties":false}}},"required":["rowNumber"],"additionalProperties":false}}},"required":["companyId","importId","isDryRun","onDuplicate","apply","rows"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"rowNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outcome":{"type":"string","enum":["created","updated","skipped"]},"contactId":{"type":"string"},"reason":{"type":"string","enum":["","exists","several-matches","empty","invalid-email","invalid-value","duplicate-in-file"]}},"required":["rowNumber","outcome","contactId","reason"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}}}}}}}}},"/private/contact-tag/create":{"post":{"operationId":"contact_tag_create","summary":"Create a contact tag with a label.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":32},"color":{"type":"string","enum":["amber","blue","gray","green","pink","purple","red","teal"]}},"required":["companyId","label"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"tagKey":{"type":"string"},"label":{"type":"string"}},"required":["companyId","tagKey","label"],"additionalProperties":false}}}}}}}}},"/private/contact-tag/update":{"post":{"operationId":"contact_tag_update","summary":"Rename a contact tag or change its color.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"tagKey":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},"label":{"type":"string","minLength":1,"maxLength":32},"color":{"type":"string","enum":["amber","blue","gray","green","pink","purple","red","teal"]}},"required":["companyId","tagKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"tagKey":{"type":"string"},"label":{"type":"string"}},"required":["companyId","tagKey","label"],"additionalProperties":false}}}}}}}}},"/private/contact-list/create":{"post":{"operationId":"contact_list_create","summary":"Create a contact list: manual (people added by hand) or by filters.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":40},"kind":{"type":"string","enum":["manual","filter"]},"visibility":{"type":"string","enum":["team","me"]},"filters":{"type":"object","properties":{"stages":{"maxItems":6,"type":"array","items":{"type":"string","enum":["","lead","talking","customer","former","not-fit"]}},"assignee":{"anyOf":[{"type":"string","const":"me"},{"type":"string","const":"none"},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}]},"tagKeys":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"}},"projectIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"reminder":{"type":"string","enum":["overdue","today","week","any","none"]},"lastContacted":{"type":"string","enum":["never","over-7d","over-30d","over-90d"]},"hasConversations":{"type":"boolean"},"createdWithinDays":{"anyOf":[{"type":"number","const":7},{"type":"number","const":30},{"type":"number","const":90}]},"companyName":{"type":"string","minLength":1,"maxLength":120},"field":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["is","set","not-set"]},"value":{"anyOf":[{"type":"string","maxLength":255},{"type":"number"},{"type":"boolean"}]}},"required":["key","op"],"additionalProperties":false},"emailCheck":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["valid","risky","bad","expired","unchecked"]}}},"additionalProperties":false},"sort":{"type":"string","enum":["last-activity","name","last-contacted","reminder","created"]}},"required":["companyId","name","kind","visibility"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"contactListId":{"type":"string"},"name":{"type":"string"}},"required":["companyId","contactListId","name"],"additionalProperties":false}}}}}}}}},"/private/contact-list/update":{"post":{"operationId":"contact_list_update","summary":"Rename a contact list or change its filters.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactListId":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":40},"visibility":{"type":"string","enum":["team","me"]},"filters":{"type":"object","properties":{"stages":{"maxItems":6,"type":"array","items":{"type":"string","enum":["","lead","talking","customer","former","not-fit"]}},"assignee":{"anyOf":[{"type":"string","const":"me"},{"type":"string","const":"none"},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}]},"tagKeys":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"}},"projectIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"reminder":{"type":"string","enum":["overdue","today","week","any","none"]},"lastContacted":{"type":"string","enum":["never","over-7d","over-30d","over-90d"]},"hasConversations":{"type":"boolean"},"createdWithinDays":{"anyOf":[{"type":"number","const":7},{"type":"number","const":30},{"type":"number","const":90}]},"companyName":{"type":"string","minLength":1,"maxLength":120},"field":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["is","set","not-set"]},"value":{"anyOf":[{"type":"string","maxLength":255},{"type":"number"},{"type":"boolean"}]}},"required":["key","op"],"additionalProperties":false},"emailCheck":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["valid","risky","bad","expired","unchecked"]}}},"additionalProperties":false},"sort":{"anyOf":[{"type":"string","enum":["last-activity","name","last-contacted","reminder","created"]},{"type":"string","const":""}]}},"required":["companyId","contactListId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"contactListId":{"type":"string"},"name":{"type":"string"}},"required":["companyId","contactListId","name"],"additionalProperties":false}}}}}}}}},"/private/contact-field/create":{"post":{"operationId":"contact_field_create","summary":"Create a custom contact field (text, number, date, yes or no, choice, link).","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"key":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":40},"type":{"type":"string","enum":["boolean","choice","date","link","number","text"]},"options":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["companyId","label","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"contactFieldId":{"type":"string"},"label":{"type":"string"}},"required":["companyId","contactFieldId","label"],"additionalProperties":false}}}}}}}}},"/private/contact-field/update":{"post":{"operationId":"contact_field_update","summary":"Rename a custom contact field or change its type or options.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactFieldId":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":40},"type":{"type":"string","enum":["boolean","choice","date","link","number","text"]},"options":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["companyId","contactFieldId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"contactFieldId":{"type":"string"},"label":{"type":"string"}},"required":["companyId","contactFieldId","label"],"additionalProperties":false}}}}}}}}},"/private/contact/set-profile":{"post":{"operationId":"contact_set_profile","summary":"Set a contact's phone, company, tags or attributes (key-values). Values set here are trusted: the site and the browser cannot change them.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactId":{"type":"string","maxLength":80},"phone":{"type":"string","maxLength":32},"avatarUrl":{"type":"string","maxLength":500},"company":{"anyOf":[{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":120},"website":{"type":"string","maxLength":255,"format":"starts_with","pattern":"^https:\\/\\/.*"},"plan":{"type":"string","minLength":1,"maxLength":60}},"required":["name"],"additionalProperties":false},{"type":"null"}]},"set":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40},"type":{"type":"string","enum":["string","number","boolean","date"]},"value":{"anyOf":[{"type":"string","maxLength":510},{"type":"number"},{"type":"boolean"}]}},"required":["key","type","value"],"additionalProperties":false}},"unset":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"addTags":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"}},"removeTags":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"}}},"required":["companyId","contactId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"contactId":{"type":"string"},"skippedKeys":{"type":"array","items":{"type":"string"}}},"required":["companyId","contactId","skippedKeys"],"additionalProperties":false}}}}}}}}},"/private/message/create":{"post":{"operationId":"message_create_note","summary":"Add an internal note to a conversation. Customers never see notes. Send a reply to the customer in a conversation. The customer receives it at once.","x-hrc-area":"conversations","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string"},"requestId":{"type":"string","pattern":"^(?:[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$"},"kind":{"type":"string","enum":["reply","note"]},"body":{"type":"string","maxLength":10000},"attachmentIds":{"maxItems":5,"type":"array","items":{"type":"string"}},"nextStatus":{"type":"string","enum":["new","open","pending","closed"]}},"required":["companyId","conversationId","requestId","kind","body","attachmentIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"conversationId":{"type":"string"},"messageId":{"type":"string"}},"required":["companyId","conversationId","messageId"],"additionalProperties":false}}}}}}}}},"/private/conversation/create-email":{"post":{"operationId":"conversation_create_email","summary":"Write a new e-mail to a contact from a connected company mailbox. It is sent at once and opens a conversation.","x-hrc-area":"send","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"contactId":{"type":"string","minLength":1,"maxLength":80},"mailboxId":{"type":"string","minLength":1,"maxLength":80},"to":{"type":"string","maxLength":254},"subject":{"type":"string","minLength":1,"maxLength":200},"bodyMd":{"type":"string","minLength":1,"maxLength":10000}},"required":["companyId","contactId","mailboxId","to","subject","bodyMd"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["companyId","conversationId","ref"],"additionalProperties":false}}}}}}}}},"/private/prepared-reply/get":{"post":{"operationId":"prepared_reply_get","summary":"Read the prepared reply of a conversation, if there is one.","x-hrc-area":"drafts","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","conversationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"preparedReply":{"anyOf":[{"type":"object","properties":{"conversationId":{"type":"string"},"bodyMd":{"type":"string"},"source":{"type":"string","enum":["agent","ai"]},"aiAgentName":{"type":"string"},"authorName":{"type":"string"},"taskId":{"type":"string"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["conversationId","bodyMd","source","aiAgentName","authorName","taskId","version","updatedAtMs"],"additionalProperties":false},{"type":"null"}]}},"required":["preparedReply"],"additionalProperties":false}}}}}}}}},"/private/prepared-reply/replace":{"post":{"operationId":"prepared_reply_replace","summary":"Write or replace the prepared reply of a conversation. A team member reviews it and sends it.","x-hrc-area":"drafts","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string","minLength":1,"maxLength":80},"bodyMd":{"type":"string","minLength":1,"maxLength":10000},"taskId":{"default":"","type":"string","maxLength":80},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["companyId","conversationId","bodyMd"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"preparedReply":{"type":"object","properties":{"conversationId":{"type":"string"},"bodyMd":{"type":"string"},"source":{"type":"string","enum":["agent","ai"]},"aiAgentName":{"type":"string"},"authorName":{"type":"string"},"taskId":{"type":"string"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["conversationId","bodyMd","source","aiAgentName","authorName","taskId","version","updatedAtMs"],"additionalProperties":false}},"required":["preparedReply"],"additionalProperties":false}}}}}}}}},"/private/prepared-reply/dismiss":{"post":{"operationId":"prepared_reply_dismiss","summary":"Remove the prepared reply of a conversation.","x-hrc-area":"drafts","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string","minLength":1,"maxLength":80},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["companyId","conversationId","version"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"isDismissed":{"type":"boolean"}},"required":["isDismissed"],"additionalProperties":false}}}}}}}}},"/private/task/list":{"post":{"operationId":"task_list","summary":"List tasks with filters by status, assignee, label and text.","x-hrc-area":"tasks","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"statuses":{"maxItems":6,"type":"array","items":{"type":"string","enum":["backlog","pending","in-progress","qa","done","blocked"]}},"assigneeUserId":{"type":"string","maxLength":80},"projectId":{"type":"string","maxLength":80},"label":{"type":"string","minLength":1,"maxLength":40},"conversationId":{"type":"string","maxLength":80},"q":{"type":"string","minLength":1,"maxLength":200},"doneSinceMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"cursor":{"type":"string","maxLength":400},"limit":{"default":100,"type":"integer","minimum":1,"maximum":200}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"title":{"type":"string"},"status":{"type":"string","enum":["backlog","pending","in-progress","qa","done","blocked"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"assigneeUserId":{"type":"string"},"assigneeAiAgentId":{"type":"string"},"projectId":{"type":"string"},"conversationIds":{"type":"array","items":{"type":"string"}},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"commentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isAiDrafted":{"type":"boolean"},"notifyCustomerOnDone":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"endedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskId","number","title","status","priority","labels","assigneeUserId","assigneeAiAgentId","projectId","conversationIds","attachmentCount","commentCount","isAiDrafted","notifyCustomerOnDone","createdByUserId","createdAtMs","updatedAtMs","startedAtMs","endedAtMs"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}}}}}}},"/private/task/get":{"post":{"operationId":"task_get","summary":"Read one task by its number with comments and history.","x-hrc-area":"tasks","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"number":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["companyId","number"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"task":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"title":{"type":"string"},"status":{"type":"string","enum":["backlog","pending","in-progress","qa","done","blocked"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"assigneeUserId":{"type":"string"},"assigneeAiAgentId":{"type":"string"},"projectId":{"type":"string"},"conversationIds":{"type":"array","items":{"type":"string"}},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"commentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isAiDrafted":{"type":"boolean"},"notifyCustomerOnDone":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"endedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"descriptionMd":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"conversationId":{"type":"string"},"fileName":{"type":"string"},"category":{"type":"string","enum":["image","video","document","other"]},"hasThumbnail":{"type":"boolean"},"isAvailable":{"type":"boolean"}},"required":["attachmentId","conversationId","fileName","category","hasThumbnail","isAvailable"],"additionalProperties":false}},"files":{"type":"array","items":{"type":"object","properties":{"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasThumbnail":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","kind","fileName","sizeBytes","status","rejectReason","durationMs","hasThumbnail","createdByUserId","createdAtMs"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","closed"]},"assigneeUserId":{"type":"string"},"isAvailable":{"type":"boolean"}},"required":["conversationId","ref","subject","status","assigneeUserId","isAvailable"],"additionalProperties":false}}},"required":["taskId","number","title","status","priority","labels","assigneeUserId","assigneeAiAgentId","projectId","conversationIds","attachmentCount","commentCount","isAiDrafted","notifyCustomerOnDone","createdByUserId","createdAtMs","updatedAtMs","startedAtMs","endedAtMs","descriptionMd","attachments","files","conversations"],"additionalProperties":false},"comments":{"type":"array","items":{"type":"object","properties":{"taskCommentId":{"type":"string"},"authorUserId":{"type":"string"},"authorName":{"type":"string"},"aiAgentName":{"type":"string"},"bodyMd":{"type":"string"},"mentionedUserIds":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"object","properties":{"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasThumbnail":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","kind","fileName","sizeBytes","status","rejectReason","durationMs","hasThumbnail","createdByUserId","createdAtMs"],"additionalProperties":false}},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskCommentId","authorUserId","authorName","aiAgentName","bodyMd","mentionedUserIds","files","createdAtMs"],"additionalProperties":false}},"events":{"type":"array","items":{"type":"object","properties":{"taskEventId":{"type":"string"},"type":{"type":"string","enum":["created","status-changed","assigned","conversation-linked","conversation-unlinked","file-added","file-removed"]},"from":{"type":"string"},"to":{"type":"string"},"byUserId":{"type":"string"},"aiAgentName":{"type":"string"},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskEventId","type","from","to","byUserId","aiAgentName","atMs"],"additionalProperties":false}}},"required":["task","comments","events"],"additionalProperties":false}}}}}}}}},"/private/task/stats":{"post":{"operationId":"task_stats","summary":"Read the task performance figures for a period.","x-hrc-area":"tasks","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"periodDays":{"default":"30","type":"string","enum":["7","30","90","180"]}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"periodDays":{"type":"string","enum":["7","30","90","180"]},"sinceMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"openCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"closedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"medianOpenMs":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"medianInProgressMs":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"oldestOpenAgeMs":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"openByStatus":{"type":"object","properties":{"backlog":{"type":"integer","minimum":0,"maximum":9007199254740991},"pending":{"type":"integer","minimum":0,"maximum":9007199254740991},"in-progress":{"type":"integer","minimum":0,"maximum":9007199254740991},"qa":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["backlog","pending","in-progress","qa","blocked"],"additionalProperties":false},"weeks":{"type":"array","items":{"type":"object","properties":{"weekStartMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"closedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["weekStartMs","createdCount","closedCount"],"additionalProperties":false}},"people":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"aiAgentId":{"type":"string"},"aiAgentName":{"type":"string"},"openCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"inProgressCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"closedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"closedPerWeek":{"type":"number","minimum":0},"medianOpenMs":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"medianInProgressMs":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"returnedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"weeklyClosed":{"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"openByStatus":{"type":"object","properties":{"backlog":{"type":"integer","minimum":0,"maximum":9007199254740991},"pending":{"type":"integer","minimum":0,"maximum":9007199254740991},"in-progress":{"type":"integer","minimum":0,"maximum":9007199254740991},"qa":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["backlog","pending","in-progress","qa","blocked"],"additionalProperties":false}},"required":["userId","aiAgentId","aiAgentName","openCount","inProgressCount","closedCount","closedPerWeek","medianOpenMs","medianInProgressMs","returnedCount","weeklyClosed","openByStatus"],"additionalProperties":false}},"statusTimes":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["backlog","pending","in-progress","qa","blocked"]},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"medianMs":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"p75Ms":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["status","count","totalMs","medianMs","p75Ms"],"additionalProperties":false}},"returnedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"returnedTopLabel":{"type":"string"},"longestBlocked":{"anyOf":[{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"title":{"type":"string"},"blockedSinceMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskId","number","title","blockedSinceMs"],"additionalProperties":false},{"type":"null"}]},"humanMedianInProgressMs":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"ageBuckets":{"type":"array","items":{"type":"object","properties":{"bucket":{"type":"string","enum":["under-1d","1-7d","7-30d","over-30d"]},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["bucket","count"],"additionalProperties":false}},"labels":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"openCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"doneCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["label","openCount","doneCount"],"additionalProperties":false}},"otherLabels":{"type":"object","properties":{"labelCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"openCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"doneCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["labelCount","openCount","doneCount"],"additionalProperties":false},"openTrend":{"type":"array","items":{"type":"object","properties":{"weekStartMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"openCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["weekStartMs","openCount"],"additionalProperties":false}},"sparkWeeks":{"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}}},"required":["periodDays","sinceMs","openCount","createdCount","closedCount","medianOpenMs","medianInProgressMs","oldestOpenAgeMs","openByStatus","weeks","people","statusTimes","returnedCount","returnedTopLabel","longestBlocked","humanMedianInProgressMs","ageBuckets","labels","otherLabels","openTrend","sparkWeeks"],"additionalProperties":false}}}}}}}}},"/private/task-settings/get":{"post":{"operationId":"task_settings_get","summary":"Read the company's task writing instruction.","x-hrc-area":"tasks","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"instruction":{"type":"string"},"isDefault":{"type":"boolean"},"defaultInstruction":{"type":"string"}},"required":["instruction","isDefault","defaultInstruction"],"additionalProperties":false}}}}}}}}},"/private/task/create":{"post":{"operationId":"task_create","summary":"Create a task, optionally linked to conversations.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"title":{"type":"string","minLength":1,"maxLength":200},"descriptionMd":{"default":"","type":"string","maxLength":20000},"status":{"default":"backlog","type":"string","enum":["backlog","pending","in-progress","qa","done","blocked"]},"priority":{"default":"normal","type":"string","enum":["low","normal","high","urgent"]},"labels":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","maxLength":40}},"assigneeUserId":{"default":"","type":"string","maxLength":80},"conversationIds":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"attachmentIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"taskFileIds":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"isAiDrafted":{"default":false,"type":"boolean"}},"required":["companyId","requestId","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"task":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"title":{"type":"string"},"status":{"type":"string","enum":["backlog","pending","in-progress","qa","done","blocked"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"assigneeUserId":{"type":"string"},"assigneeAiAgentId":{"type":"string"},"projectId":{"type":"string"},"conversationIds":{"type":"array","items":{"type":"string"}},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"commentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isAiDrafted":{"type":"boolean"},"notifyCustomerOnDone":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"endedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"descriptionMd":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"conversationId":{"type":"string"},"fileName":{"type":"string"},"category":{"type":"string","enum":["image","video","document","other"]},"hasThumbnail":{"type":"boolean"},"isAvailable":{"type":"boolean"}},"required":["attachmentId","conversationId","fileName","category","hasThumbnail","isAvailable"],"additionalProperties":false}},"files":{"type":"array","items":{"type":"object","properties":{"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasThumbnail":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","kind","fileName","sizeBytes","status","rejectReason","durationMs","hasThumbnail","createdByUserId","createdAtMs"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","closed"]},"assigneeUserId":{"type":"string"},"isAvailable":{"type":"boolean"}},"required":["conversationId","ref","subject","status","assigneeUserId","isAvailable"],"additionalProperties":false}}},"required":["taskId","number","title","status","priority","labels","assigneeUserId","assigneeAiAgentId","projectId","conversationIds","attachmentCount","commentCount","isAiDrafted","notifyCustomerOnDone","createdByUserId","createdAtMs","updatedAtMs","startedAtMs","endedAtMs","descriptionMd","attachments","files","conversations"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}}}}}}},"/private/task/update":{"post":{"operationId":"task_update","summary":"Change the title, description, priority, labels or assignee of a task.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskId":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":200},"descriptionMd":{"type":"string","maxLength":20000},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":40}},"assigneeUserId":{"type":"string","maxLength":80},"assigneeAiAgentId":{"type":"string","maxLength":80},"notifyCustomerOnDone":{"type":"boolean"}},"required":["companyId","taskId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"task":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"title":{"type":"string"},"status":{"type":"string","enum":["backlog","pending","in-progress","qa","done","blocked"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"assigneeUserId":{"type":"string"},"assigneeAiAgentId":{"type":"string"},"projectId":{"type":"string"},"conversationIds":{"type":"array","items":{"type":"string"}},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"commentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isAiDrafted":{"type":"boolean"},"notifyCustomerOnDone":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"endedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"descriptionMd":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"conversationId":{"type":"string"},"fileName":{"type":"string"},"category":{"type":"string","enum":["image","video","document","other"]},"hasThumbnail":{"type":"boolean"},"isAvailable":{"type":"boolean"}},"required":["attachmentId","conversationId","fileName","category","hasThumbnail","isAvailable"],"additionalProperties":false}},"files":{"type":"array","items":{"type":"object","properties":{"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasThumbnail":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","kind","fileName","sizeBytes","status","rejectReason","durationMs","hasThumbnail","createdByUserId","createdAtMs"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","closed"]},"assigneeUserId":{"type":"string"},"isAvailable":{"type":"boolean"}},"required":["conversationId","ref","subject","status","assigneeUserId","isAvailable"],"additionalProperties":false}}},"required":["taskId","number","title","status","priority","labels","assigneeUserId","assigneeAiAgentId","projectId","conversationIds","attachmentCount","commentCount","isAiDrafted","notifyCustomerOnDone","createdByUserId","createdAtMs","updatedAtMs","startedAtMs","endedAtMs","descriptionMd","attachments","files","conversations"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}}}}}}},"/private/task/set-status":{"post":{"operationId":"task_set_status","summary":"Move a task to another status.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskId":{"type":"string","minLength":1,"maxLength":80},"status":{"type":"string","enum":["backlog","pending","in-progress","qa","done","blocked"]}},"required":["companyId","taskId","status"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"task":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"title":{"type":"string"},"status":{"type":"string","enum":["backlog","pending","in-progress","qa","done","blocked"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"assigneeUserId":{"type":"string"},"assigneeAiAgentId":{"type":"string"},"projectId":{"type":"string"},"conversationIds":{"type":"array","items":{"type":"string"}},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"commentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isAiDrafted":{"type":"boolean"},"notifyCustomerOnDone":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"endedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"descriptionMd":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"conversationId":{"type":"string"},"fileName":{"type":"string"},"category":{"type":"string","enum":["image","video","document","other"]},"hasThumbnail":{"type":"boolean"},"isAvailable":{"type":"boolean"}},"required":["attachmentId","conversationId","fileName","category","hasThumbnail","isAvailable"],"additionalProperties":false}},"files":{"type":"array","items":{"type":"object","properties":{"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasThumbnail":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","kind","fileName","sizeBytes","status","rejectReason","durationMs","hasThumbnail","createdByUserId","createdAtMs"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","closed"]},"assigneeUserId":{"type":"string"},"isAvailable":{"type":"boolean"}},"required":["conversationId","ref","subject","status","assigneeUserId","isAvailable"],"additionalProperties":false}}},"required":["taskId","number","title","status","priority","labels","assigneeUserId","assigneeAiAgentId","projectId","conversationIds","attachmentCount","commentCount","isAiDrafted","notifyCustomerOnDone","createdByUserId","createdAtMs","updatedAtMs","startedAtMs","endedAtMs","descriptionMd","attachments","files","conversations"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}}}}}}},"/private/task/link-conversation":{"post":{"operationId":"task_link_conversation","summary":"Link a conversation to a task.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","taskId","conversationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"task":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"title":{"type":"string"},"status":{"type":"string","enum":["backlog","pending","in-progress","qa","done","blocked"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"assigneeUserId":{"type":"string"},"assigneeAiAgentId":{"type":"string"},"projectId":{"type":"string"},"conversationIds":{"type":"array","items":{"type":"string"}},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"commentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isAiDrafted":{"type":"boolean"},"notifyCustomerOnDone":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"endedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"descriptionMd":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"conversationId":{"type":"string"},"fileName":{"type":"string"},"category":{"type":"string","enum":["image","video","document","other"]},"hasThumbnail":{"type":"boolean"},"isAvailable":{"type":"boolean"}},"required":["attachmentId","conversationId","fileName","category","hasThumbnail","isAvailable"],"additionalProperties":false}},"files":{"type":"array","items":{"type":"object","properties":{"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasThumbnail":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","kind","fileName","sizeBytes","status","rejectReason","durationMs","hasThumbnail","createdByUserId","createdAtMs"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","closed"]},"assigneeUserId":{"type":"string"},"isAvailable":{"type":"boolean"}},"required":["conversationId","ref","subject","status","assigneeUserId","isAvailable"],"additionalProperties":false}}},"required":["taskId","number","title","status","priority","labels","assigneeUserId","assigneeAiAgentId","projectId","conversationIds","attachmentCount","commentCount","isAiDrafted","notifyCustomerOnDone","createdByUserId","createdAtMs","updatedAtMs","startedAtMs","endedAtMs","descriptionMd","attachments","files","conversations"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}}}}}}},"/private/task/unlink-conversation":{"post":{"operationId":"task_unlink_conversation","summary":"Unlink a conversation from a task.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","taskId","conversationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"task":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"title":{"type":"string"},"status":{"type":"string","enum":["backlog","pending","in-progress","qa","done","blocked"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"assigneeUserId":{"type":"string"},"assigneeAiAgentId":{"type":"string"},"projectId":{"type":"string"},"conversationIds":{"type":"array","items":{"type":"string"}},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"commentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isAiDrafted":{"type":"boolean"},"notifyCustomerOnDone":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"endedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"descriptionMd":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"conversationId":{"type":"string"},"fileName":{"type":"string"},"category":{"type":"string","enum":["image","video","document","other"]},"hasThumbnail":{"type":"boolean"},"isAvailable":{"type":"boolean"}},"required":["attachmentId","conversationId","fileName","category","hasThumbnail","isAvailable"],"additionalProperties":false}},"files":{"type":"array","items":{"type":"object","properties":{"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasThumbnail":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","kind","fileName","sizeBytes","status","rejectReason","durationMs","hasThumbnail","createdByUserId","createdAtMs"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","closed"]},"assigneeUserId":{"type":"string"},"isAvailable":{"type":"boolean"}},"required":["conversationId","ref","subject","status","assigneeUserId","isAvailable"],"additionalProperties":false}}},"required":["taskId","number","title","status","priority","labels","assigneeUserId","assigneeAiAgentId","projectId","conversationIds","attachmentCount","commentCount","isAiDrafted","notifyCustomerOnDone","createdByUserId","createdAtMs","updatedAtMs","startedAtMs","endedAtMs","descriptionMd","attachments","files","conversations"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}}}}}}},"/private/task/delete":{"post":{"operationId":"task_delete","summary":"Delete a task with its comments and history. (destructive)","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","taskId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"taskId":{"type":"string"}},"required":["taskId"],"additionalProperties":false}}}}}}}}},"/private/task-comment/create":{"post":{"operationId":"task_comment_create","summary":"Add a comment to a task.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskId":{"type":"string","minLength":1,"maxLength":80},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"bodyMd":{"default":"","type":"string","maxLength":10000},"mentionedUserIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"taskFileIds":{"default":[],"maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"required":["companyId","taskId","requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"comment":{"type":"object","properties":{"taskCommentId":{"type":"string"},"authorUserId":{"type":"string"},"authorName":{"type":"string"},"aiAgentName":{"type":"string"},"bodyMd":{"type":"string"},"mentionedUserIds":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"object","properties":{"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasThumbnail":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","kind","fileName","sizeBytes","status","rejectReason","durationMs","hasThumbnail","createdByUserId","createdAtMs"],"additionalProperties":false}},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskCommentId","authorUserId","authorName","aiAgentName","bodyMd","mentionedUserIds","files","createdAtMs"],"additionalProperties":false}},"required":["comment"],"additionalProperties":false}}}}}}}}},"/private/task/draft-from-conversation":{"post":{"operationId":"task_draft_from_conversation","summary":"Draft a task title and description from a conversation.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"conversationId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","conversationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"aiStatus":{"type":"string","enum":["drafted","capacity-used","unavailable","failed"]},"title":{"type":"string"},"descriptionMd":{"type":"string"},"conversation":{"type":"object","properties":{"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"subject":{"type":"string"},"projectId":{"type":"string"}},"required":["conversationId","ref","subject","projectId"],"additionalProperties":false},"attachments":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"conversationId":{"type":"string"},"fileName":{"type":"string"},"category":{"type":"string","enum":["image","video","document","other"]},"hasThumbnail":{"type":"boolean"},"isAvailable":{"type":"boolean"}},"required":["attachmentId","conversationId","fileName","category","hasThumbnail","isAvailable"],"additionalProperties":false}}},"required":["aiStatus","title","descriptionMd","conversation","attachments"],"additionalProperties":false}}}}}}}}},"/private/task-settings/update":{"post":{"operationId":"task_settings_update","summary":"Change the company's task writing instruction.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"instruction":{"type":"string","maxLength":4000}},"required":["companyId","instruction"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"instruction":{"type":"string"},"isDefault":{"type":"boolean"},"defaultInstruction":{"type":"string"}},"required":["instruction","isDefault","defaultInstruction"],"additionalProperties":false}}}}}}}}},"/private/project/list":{"post":{"operationId":"project_list","summary":"List the chat widgets of the company.","x-hrc-area":"widgets","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"cursor":{"type":"string","maxLength":1024},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["blue","green","amber","red","violet","teal","pink","gray"]},"domains":{"type":"array","items":{"type":"string"}},"isWidgetEnabled":{"type":"boolean"},"widgetSeenAtMs":{"type":"number"},"openCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"knowledgeBaseIds":{"type":"array","items":{"type":"string"}}},"required":["companyId","projectId","name","color","domains","isWidgetEnabled","widgetSeenAtMs","openCount","knowledgeBaseIds"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}}}}}}},"/private/project/get":{"post":{"operationId":"project_get","summary":"Read one chat widget with its settings.","x-hrc-area":"widgets","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string","maxLength":80}},"required":["companyId","projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"project":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"color":{"type":"string","enum":["blue","green","amber","red","violet","teal","pink","gray"]},"domains":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":300}},"isWidgetEnabled":{"type":"boolean"},"identityMode":{"type":"string","enum":["optional","required"]},"signInUrl":{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":500,"format":"starts_with","pattern":"^https:\\/\\/.*"}]},"isEmailVerifiedByApp":{"type":"boolean"},"emailCapture":{"type":"string","enum":["off","optional","required"]},"types":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["bug","feature","question"]}},"attachments":{"type":"object","properties":{"isFilesEnabled":{"type":"boolean"},"isScreenshotEnabled":{"type":"boolean"},"isRecordingEnabled":{"type":"boolean"}},"required":["isFilesEnabled","isScreenshotEnabled","isRecordingEnabled"],"additionalProperties":false},"defaultLanguage":{"type":"string","enum":["lt","en"]},"widgetLocale":{"type":"string","enum":["auto","lt","en"]},"texts":{"type":"object","properties":{"lt":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":40},"greeting":{"type":"string","maxLength":160},"replyTime":{"type":"string","maxLength":80},"launcherLabel":{"type":"string","maxLength":24},"requiredIdentityText":{"type":"string","maxLength":200},"privacyUrl":{"anyOf":[{"type":"string","const":""},{"type":"string","format":"starts_with","pattern":"^https:\\/\\/.*"}]},"captureTip":{"default":"","type":"string","maxLength":160}},"required":["title","greeting","replyTime","launcherLabel","requiredIdentityText","privacyUrl","captureTip"],"additionalProperties":false},"en":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":40},"greeting":{"type":"string","maxLength":160},"replyTime":{"type":"string","maxLength":80},"launcherLabel":{"type":"string","maxLength":24},"requiredIdentityText":{"type":"string","maxLength":200},"privacyUrl":{"anyOf":[{"type":"string","const":""},{"type":"string","format":"starts_with","pattern":"^https:\\/\\/.*"}]},"captureTip":{"default":"","type":"string","maxLength":160}},"required":["title","greeting","replyTime","launcherLabel","requiredIdentityText","privacyUrl","captureTip"],"additionalProperties":false}},"required":["lt","en"],"additionalProperties":false},"theme":{"type":"object","properties":{"primaryColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"colorScheme":{"type":"string","enum":["light","dark","auto"]},"radius":{"type":"string","enum":["none","small","medium","large","xl"]},"logoUrl":{"anyOf":[{"type":"string","const":""},{"type":"string","format":"starts_with","pattern":"^https:\\/\\/.*"}]},"position":{"type":"string","enum":["right","left"]},"launcherStyle":{"type":"string","enum":["icon","icon-label","hidden"]},"launcherIcon":{"default":"chat","type":"string","enum":["chat","help","headset","lifebuoy"]},"headerColor":{"default":"","anyOf":[{"type":"string","const":""},{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}]},"teamBubbleColor":{"default":"","anyOf":[{"type":"string","const":""},{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}]},"offsetX":{"type":"integer","minimum":0,"maximum":160},"offsetY":{"type":"integer","minimum":0,"maximum":160},"font":{"default":"system","type":"string","enum":["system","geist","manrope","plex","serif"]},"density":{"default":"comfortable","type":"string","enum":["compact","comfortable","airy"]},"headerStyle":{"default":"solid","type":"string","enum":["solid","soft","plain"]},"surface":{"default":"elevated","type":"string","enum":["elevated","outlined","flat"]},"buttonShape":{"default":"round","type":"string","enum":["round","square"]},"barTint":{"default":false,"type":"boolean"}},"required":["primaryColor","colorScheme","radius","logoUrl","position","launcherStyle","launcherIcon","headerColor","teamBubbleColor","offsetX","offsetY","font","density","headerStyle","surface","buttonShape","barTint"],"additionalProperties":false},"replyMailboxId":{"type":"string","maxLength":80},"isReferralLinkShown":{"type":"boolean"},"widgetLanguages":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","ar","he","fa","ur"]},"flag":{"anyOf":[{"type":"string","const":""},{"type":"string","pattern":"^[a-z]{2}(-[a-z]{2,3})?$"}]}},"required":["code","flag"],"additionalProperties":false}},"widgetDefaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","ar","he","fa","ur"]},"widgetTranslations":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","ar","he","fa","ur"]},"texts":{"type":"object","properties":{"title":{"type":"string","maxLength":40},"greeting":{"type":"string","maxLength":160},"replyTime":{"type":"string","maxLength":80},"launcherLabel":{"type":"string","maxLength":24},"requiredIdentityText":{"type":"string","maxLength":200},"privacyUrl":{"anyOf":[{"type":"string","const":""},{"type":"string","format":"starts_with","pattern":"^https:\\/\\/.*"}]},"captureTip":{"default":"","type":"string","maxLength":160}},"required":["title","greeting","replyTime","launcherLabel","requiredIdentityText","privacyUrl","captureTip"],"additionalProperties":false},"strings":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9.-]{1,80}$"},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["key","text"],"additionalProperties":false}}},"required":["language","texts","strings"],"additionalProperties":false}},"teamFaceUserIds":{"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"knowledgeBaseIds":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"isKbSearchShown":{"type":"boolean"},"isCaptureTipShown":{"type":"boolean"},"projectId":{"type":"string"},"companyId":{"type":"string","minLength":1,"maxLength":80},"widgetKey":{"type":"string"},"identitySecretVersion":{"type":"number"},"widgetSeenAtMs":{"type":"number"},"widgetSeenOrigins":{"maxItems":5,"type":"array","items":{"type":"string"}},"widgetBlockedOrigin":{"type":"string","maxLength":300},"isIdentitySecretSet":{"type":"boolean"},"isPageErrorsEnabled":{"type":"boolean"},"createdAtMs":{"type":"number"},"updatedAtMs":{"type":"number"}},"required":["name","color","domains","isWidgetEnabled","identityMode","signInUrl","isEmailVerifiedByApp","emailCapture","types","attachments","defaultLanguage","widgetLocale","texts","theme","replyMailboxId","isReferralLinkShown","widgetLanguages","widgetDefaultLanguage","widgetTranslations","teamFaceUserIds","knowledgeBaseIds","isKbSearchShown","isCaptureTipShown","projectId","companyId","widgetKey","identitySecretVersion","widgetSeenAtMs","widgetSeenOrigins","widgetBlockedOrigin","isIdentitySecretSet","isPageErrorsEnabled","createdAtMs","updatedAtMs"],"additionalProperties":false},"canRotateIdentitySecret":{"type":"boolean"},"identitySecretRotateAvailableAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"isContactJournalActive":{"type":"boolean"},"attachmentStorageReady":{"type":"boolean"}},"required":["project","canRotateIdentitySecret","identitySecretRotateAvailableAtMs","isContactJournalActive","attachmentStorageReady"],"additionalProperties":false}}}}}}}}},"/private/project/install-check":{"post":{"operationId":"project_install_check","summary":"Check whether a chat widget is installed on its site.","x-hrc-area":"widgets","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string","maxLength":80}},"required":["companyId","projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"widgetSeenAtMs":{"type":"number"},"widgetSeenOrigins":{"type":"array","items":{"type":"string"}},"widgetBlockedOrigin":{"type":"string","maxLength":300}},"required":["widgetSeenAtMs","widgetSeenOrigins","widgetBlockedOrigin"],"additionalProperties":false}}}}}}}}},"/private/project/create":{"post":{"operationId":"project_create","summary":"Create a chat widget for a site.","x-hrc-area":"widgets","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":80},"domains":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":300}},"defaultLanguage":{"type":"string","enum":["lt","en"]},"widgetDefaultLanguage":{"type":"string","enum":["lt","en","ru","pl","uk"]}},"required":["companyId","name","domains","defaultLanguage"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"projectId":{"type":"string"},"widgetKey":{"type":"string"}},"required":["projectId","widgetKey"],"additionalProperties":false}}}}}}}}},"/private/project/update":{"post":{"operationId":"project_update","summary":"Change the settings, texts or look of a chat widget.","x-hrc-area":"widgets","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"color":{"type":"string","enum":["blue","green","amber","red","violet","teal","pink","gray"]},"domains":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":300}},"isWidgetEnabled":{"type":"boolean"},"identityMode":{"type":"string","enum":["optional","required"]},"signInUrl":{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":500,"format":"starts_with","pattern":"^https:\\/\\/.*"}]},"isEmailVerifiedByApp":{"type":"boolean"},"emailCapture":{"type":"string","enum":["off","optional","required"]},"types":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["bug","feature","question"]}},"attachments":{"type":"object","properties":{"isFilesEnabled":{"type":"boolean"},"isScreenshotEnabled":{"type":"boolean"},"isRecordingEnabled":{"type":"boolean"}},"required":["isFilesEnabled","isScreenshotEnabled","isRecordingEnabled"],"additionalProperties":false},"defaultLanguage":{"type":"string","enum":["lt","en"]},"widgetLocale":{"type":"string","enum":["auto","lt","en"]},"texts":{"type":"object","properties":{"lt":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":40},"greeting":{"type":"string","maxLength":160},"replyTime":{"type":"string","maxLength":80},"launcherLabel":{"type":"string","maxLength":24},"requiredIdentityText":{"type":"string","maxLength":200},"privacyUrl":{"anyOf":[{"type":"string","const":""},{"type":"string","format":"starts_with","pattern":"^https:\\/\\/.*"}]},"captureTip":{"default":"","type":"string","maxLength":160}},"required":["title","greeting","replyTime","launcherLabel","requiredIdentityText","privacyUrl"],"additionalProperties":false},"en":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":40},"greeting":{"type":"string","maxLength":160},"replyTime":{"type":"string","maxLength":80},"launcherLabel":{"type":"string","maxLength":24},"requiredIdentityText":{"type":"string","maxLength":200},"privacyUrl":{"anyOf":[{"type":"string","const":""},{"type":"string","format":"starts_with","pattern":"^https:\\/\\/.*"}]},"captureTip":{"default":"","type":"string","maxLength":160}},"required":["title","greeting","replyTime","launcherLabel","requiredIdentityText","privacyUrl"],"additionalProperties":false}},"required":["lt","en"],"additionalProperties":false},"theme":{"type":"object","properties":{"primaryColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"colorScheme":{"type":"string","enum":["light","dark","auto"]},"radius":{"type":"string","enum":["none","small","medium","large","xl"]},"logoUrl":{"anyOf":[{"type":"string","const":""},{"type":"string","format":"starts_with","pattern":"^https:\\/\\/.*"}]},"position":{"type":"string","enum":["right","left"]},"launcherStyle":{"type":"string","enum":["icon","icon-label","hidden"]},"launcherIcon":{"default":"chat","type":"string","enum":["chat","help","headset","lifebuoy"]},"headerColor":{"default":"","anyOf":[{"type":"string","const":""},{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}]},"teamBubbleColor":{"default":"","anyOf":[{"type":"string","const":""},{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}]},"offsetX":{"type":"integer","minimum":0,"maximum":160},"offsetY":{"type":"integer","minimum":0,"maximum":160},"font":{"default":"system","type":"string","enum":["system","geist","manrope","plex","serif"]},"density":{"default":"comfortable","type":"string","enum":["compact","comfortable","airy"]},"headerStyle":{"default":"solid","type":"string","enum":["solid","soft","plain"]},"surface":{"default":"elevated","type":"string","enum":["elevated","outlined","flat"]},"buttonShape":{"default":"round","type":"string","enum":["round","square"]},"barTint":{"default":false,"type":"boolean"}},"required":["primaryColor","colorScheme","radius","logoUrl","position","launcherStyle","offsetX","offsetY"],"additionalProperties":false},"replyMailboxId":{"type":"string","maxLength":80},"isReferralLinkShown":{"type":"boolean"},"widgetLanguages":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","ar","he","fa","ur"]},"flag":{"anyOf":[{"type":"string","const":""},{"type":"string","pattern":"^[a-z]{2}(-[a-z]{2,3})?$"}]}},"required":["code","flag"],"additionalProperties":false}},"widgetDefaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","ar","he","fa","ur"]},"widgetTranslations":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","ar","he","fa","ur"]},"texts":{"type":"object","properties":{"title":{"type":"string","maxLength":40},"greeting":{"type":"string","maxLength":160},"replyTime":{"type":"string","maxLength":80},"launcherLabel":{"type":"string","maxLength":24},"requiredIdentityText":{"type":"string","maxLength":200},"privacyUrl":{"anyOf":[{"type":"string","const":""},{"type":"string","format":"starts_with","pattern":"^https:\\/\\/.*"}]},"captureTip":{"default":"","type":"string","maxLength":160}},"required":["title","greeting","replyTime","launcherLabel","requiredIdentityText","privacyUrl"],"additionalProperties":false},"strings":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9.-]{1,80}$"},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["key","text"],"additionalProperties":false}}},"required":["language","texts","strings"],"additionalProperties":false}},"teamFaceUserIds":{"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"knowledgeBaseIds":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"isKbSearchShown":{"type":"boolean"},"isCaptureTipShown":{"type":"boolean"},"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string","maxLength":80}},"required":["companyId","projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string"}},"required":["companyId","projectId"],"additionalProperties":false}}}}}}}}},"/private/page-error/list":{"post":{"operationId":"page_error_list","summary":"List the JavaScript errors seen on the sites of one chat widget (projectId from whoami chatWidgets or project_list), grouped by error, for a period (today, 7d, 30d or 60d; data is kept 60 days). Filter by domain, status (open, resolved, ignored or all; default open) and searchQuery, sort by last-seen or count, 50 a page (pass nextCursor as cursor). Each item has the error type and message, the top stack frame, counts, first and last seen times, domains, browsers and a 14-day sparkline. Empty unless the chat widget collects page errors (isCollecting).","x-hrc-area":"widgets","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string","maxLength":80},"period":{"default":"7d","type":"string","enum":["today","7d","30d","60d"]},"domain":{"default":"","type":"string","maxLength":253},"status":{"default":"open","type":"string","enum":["open","resolved","ignored","all"]},"sort":{"default":"last-seen","type":"string","enum":["last-seen","count"]},"searchQuery":{"default":"","type":"string","maxLength":200},"cursor":{"type":"string","maxLength":500},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"required":["companyId","projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pageErrorGroupId":{"type":"string"},"kind":{"type":"string","enum":["error","rejection","console"]},"errorType":{"type":"string"},"message":{"type":"string"},"topFrame":{"anyOf":[{"type":"object","properties":{"functionName":{"type":"string"},"fileUrl":{"type":"string"},"line":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"column":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["functionName","fileUrl","line","column"],"additionalProperties":false},{"type":"null"}]},"isCrossOrigin":{"type":"boolean"},"status":{"type":"string","enum":["open","resolved","ignored"]},"periodCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"firstSeenAtMs":{"type":"number"},"lastSeenAtMs":{"type":"number"},"domains":{"type":"array","items":{"type":"string"}},"topDomains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["domain","count"],"additionalProperties":false}},"periodDomainCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"browsers":{"type":"array","items":{"type":"string"}},"sparkline":{"minItems":14,"maxItems":14,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}}},"required":["pageErrorGroupId","kind","errorType","message","topFrame","isCrossOrigin","status","periodCount","totalCount","firstSeenAtMs","lastSeenAtMs","domains","topDomains","periodDomainCount","browsers","sparkline"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]},"range":{"type":"object","properties":{"period":{"type":"string","enum":["today","7d","30d","60d"]},"fromDay":{"type":"string"},"toDay":{"type":"string"},"sparklineFromDay":{"type":"string"},"timeZone":{"type":"string"}},"required":["period","fromDay","toDay","sparklineFromDay","timeZone"],"additionalProperties":false},"totals":{"type":"object","properties":{"groupCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"eventCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["groupCount","eventCount"],"additionalProperties":false},"domainOptions":{"type":"array","items":{"type":"string"}},"isCollecting":{"type":"boolean"},"skippedSampleCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"droppedEventCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"refusedBatchCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","nextCursor","range","totals","domainOptions","isCollecting","skippedSampleCount","droppedEventCount","refusedBatchCount"],"additionalProperties":false}}}}}}}}},"/private/page-error/get":{"post":{"operationId":"page_error_get","summary":"Read one page error group (pageErrorGroupId from page_error_list): the stack of the newest event, a 60-day daily count, counts per domain, the newest 20 events with page address, browser, system, device and window size, and debugMarkdown, a ready Markdown block to hand to a developer. Secrets in addresses and messages are already replaced with ***. Line numbers point into the built file; source maps are not applied.","x-hrc-area":"widgets","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"pageErrorGroupId":{"type":"string","maxLength":80}},"required":["companyId","pageErrorGroupId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"group":{"type":"object","properties":{"pageErrorGroupId":{"type":"string"},"projectId":{"type":"string"},"fingerprint":{"type":"string"},"kind":{"type":"string","enum":["error","rejection","console"]},"errorType":{"type":"string"},"message":{"type":"string"},"topFrame":{"anyOf":[{"type":"object","properties":{"functionName":{"type":"string"},"fileUrl":{"type":"string"},"line":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"column":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["functionName","fileUrl","line","column"],"additionalProperties":false},{"type":"null"}]},"isCrossOrigin":{"type":"boolean"},"status":{"type":"string","enum":["open","resolved","ignored"]},"statusChangedAtMs":{"type":"number"},"reopenCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"firstSeenAtMs":{"type":"number"},"lastSeenAtMs":{"type":"number"},"domains":{"type":"array","items":{"type":"string"}},"browsers":{"type":"array","items":{"type":"string"}},"stack":{"type":"string"},"sourceUrl":{"type":"string"}},"required":["pageErrorGroupId","projectId","fingerprint","kind","errorType","message","topFrame","isCrossOrigin","status","statusChangedAtMs","reopenCount","totalCount","firstSeenAtMs","lastSeenAtMs","domains","browsers","stack","sourceUrl"],"additionalProperties":false},"series":{"minItems":60,"maxItems":60,"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["day","count"],"additionalProperties":false}},"domainCounts":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["domain","count"],"additionalProperties":false}},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"pageErrorSampleId":{"type":"string"},"receivedAtMs":{"type":"number"},"occurredAtMs":{"type":"number"},"kind":{"type":"string","enum":["error","rejection","console"]},"errorType":{"type":"string"},"message":{"type":"string"},"stack":{"type":"string"},"sourceUrl":{"type":"string"},"line":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"column":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageUrl":{"type":"string"},"referrer":{"type":"string"},"domain":{"type":"string"},"browserName":{"type":"string"},"browserVersion":{"type":"string"},"osName":{"type":"string"},"deviceType":{"type":"string","enum":["desktop","tablet","mobile",""]},"countryCode":{"type":"string"},"language":{"type":"string"},"viewportWidthPx":{"type":"integer","minimum":0,"maximum":9007199254740991},"viewportHeightPx":{"type":"integer","minimum":0,"maximum":9007199254740991},"repeatCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"widgetSessionId":{"type":"string"},"contactId":{"type":"string"}},"required":["pageErrorSampleId","receivedAtMs","occurredAtMs","kind","errorType","message","stack","sourceUrl","line","column","pageUrl","referrer","domain","browserName","browserVersion","osName","deviceType","countryCode","language","viewportWidthPx","viewportHeightPx","repeatCount","widgetSessionId","contactId"],"additionalProperties":false}},"debugMarkdown":{"type":"string"},"timeZone":{"type":"string"}},"required":["group","series","domainCounts","samples","debugMarkdown","timeZone"],"additionalProperties":false}}}}}}}}},"/private/mailbox/list":{"post":{"operationId":"mailbox_list","summary":"List the mailboxes of the company.","x-hrc-area":"mailboxes","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"mailboxId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"fromName":{"type":"string"},"forwardingAddress":{"type":"string"},"defaultProjectId":{"type":"string"},"status":{"type":"string","enum":["setup","active","failing","paused"]},"lastInboundAtMs":{"type":"number"},"forwardingConfirmation":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"receivedAtMs":{"type":"number"}},"required":["code","receivedAtMs"],"additionalProperties":false},{"type":"null"}]},"sending":{"type":"object","properties":{"method":{"type":"string","enum":["relay","google","microsoft","smtp"]},"status":{"type":"string","enum":["not-connected","connected","broken"]},"connectedAddress":{"type":"string"},"brokenReason":{"type":"string","enum":["","grant-revoked","auth-failed","sender-refused","unverified"]},"connectedAtMs":{"type":"number"},"lastSendOkAtMs":{"type":"number"},"lastTest":{"anyOf":[{"type":"object","properties":{"isOk":{"type":"boolean"},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","tls-mode-mismatch","no-tls","auth-failed","microsoft-password-off","sender-refused","send-failed","grant-revoked","provider-unreachable","timeout"]},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","enum":["permission","dns","connect","tls","auth","send"]},"isOk":{"type":"boolean"}},"required":["step","isOk"],"additionalProperties":false}},"sentTo":{"type":"string"},"atMs":{"type":"number"}},"required":["isOk","code","steps","sentTo","atMs"],"additionalProperties":false},{"type":"null"}]},"dns":{"anyOf":[{"type":"object","properties":{"domain":{"type":"string"},"spf":{"type":"string","enum":["ok","missing","weak","unknown"]},"dkim":{"type":"string","enum":["ok","missing","weak","unknown"]},"dmarc":{"type":"string","enum":["ok","missing","weak","unknown"]},"checkedAtMs":{"type":"number"}},"required":["domain","spf","dkim","dmarc","checkedAtMs"],"additionalProperties":false},{"type":"null"}]}},"required":["method","status","connectedAddress","brokenReason","connectedAtMs","lastSendOkAtMs","lastTest","dns"],"additionalProperties":false},"forwardTest":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["sending","sent","send-failed","arrived"]},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","tls-mode-mismatch","no-tls","auth-failed","microsoft-password-off","sender-refused","send-failed","grant-revoked","provider-unreachable","timeout"]},"sentTo":{"type":"string"},"startedAtMs":{"type":"number"},"sentAtMs":{"type":"number"},"arrivedAtMs":{"type":"number"}},"required":["status","code","sentTo","startedAtMs","sentAtMs","arrivedAtMs"],"additionalProperties":false},{"type":"null"}]},"receiving":{"type":"object","properties":{"mode":{"type":"string","enum":["imap","forward"]},"imap":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"security":{"type":"string","enum":["tls","starttls"]},"username":{"type":"string"},"folder":{"type":"string"}},"required":["host","port","security","username","folder"],"additionalProperties":false},{"type":"null"}]},"importWindow":{"type":"string","enum":["none","14d"]},"isPasswordSet":{"type":"boolean"},"passwordSetAtMs":{"type":"number"},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","auth-failed","folder-not-found","timeout","failed"]},"atMs":{"type":"number"}},"required":["code","atMs"],"additionalProperties":false},{"type":"null"}]},"lastTest":{"anyOf":[{"type":"object","properties":{"isOk":{"type":"boolean"},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","auth-failed","folder-not-found","timeout","failed"]},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","enum":["dns","connect","auth","folders","folder"]},"isOk":{"type":"boolean"}},"required":["step","isOk"],"additionalProperties":false}},"folders":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"atMs":{"type":"number"}},"required":["isOk","code","steps","folders","folder","atMs"],"additionalProperties":false},{"type":"null"}]}},"required":["mode","imap","importWindow","isPasswordSet","passwordSetAtMs","lastError","lastTest"],"additionalProperties":false},"createdAtMs":{"type":"number"}},"required":["mailboxId","name","emailAddress","fromName","forwardingAddress","defaultProjectId","status","lastInboundAtMs","forwardingConfirmation","sending","forwardTest","receiving","createdAtMs"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}}}}}}},"/private/mailbox/get":{"post":{"operationId":"mailbox_get","summary":"Read one mailbox with its status.","x-hrc-area":"mailboxes","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"mailboxId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","mailboxId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"mailboxId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"fromName":{"type":"string"},"forwardingAddress":{"type":"string"},"defaultProjectId":{"type":"string"},"status":{"type":"string","enum":["setup","active","failing","paused"]},"lastInboundAtMs":{"type":"number"},"forwardingConfirmation":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"receivedAtMs":{"type":"number"}},"required":["code","receivedAtMs"],"additionalProperties":false},{"type":"null"}]},"sending":{"type":"object","properties":{"method":{"type":"string","enum":["relay","google","microsoft","smtp"]},"status":{"type":"string","enum":["not-connected","connected","broken"]},"connectedAddress":{"type":"string"},"brokenReason":{"type":"string","enum":["","grant-revoked","auth-failed","sender-refused","unverified"]},"connectedAtMs":{"type":"number"},"lastSendOkAtMs":{"type":"number"},"lastTest":{"anyOf":[{"type":"object","properties":{"isOk":{"type":"boolean"},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","tls-mode-mismatch","no-tls","auth-failed","microsoft-password-off","sender-refused","send-failed","grant-revoked","provider-unreachable","timeout"]},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","enum":["permission","dns","connect","tls","auth","send"]},"isOk":{"type":"boolean"}},"required":["step","isOk"],"additionalProperties":false}},"sentTo":{"type":"string"},"atMs":{"type":"number"}},"required":["isOk","code","steps","sentTo","atMs"],"additionalProperties":false},{"type":"null"}]},"dns":{"anyOf":[{"type":"object","properties":{"domain":{"type":"string"},"spf":{"type":"string","enum":["ok","missing","weak","unknown"]},"dkim":{"type":"string","enum":["ok","missing","weak","unknown"]},"dmarc":{"type":"string","enum":["ok","missing","weak","unknown"]},"checkedAtMs":{"type":"number"}},"required":["domain","spf","dkim","dmarc","checkedAtMs"],"additionalProperties":false},{"type":"null"}]}},"required":["method","status","connectedAddress","brokenReason","connectedAtMs","lastSendOkAtMs","lastTest","dns"],"additionalProperties":false},"forwardTest":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["sending","sent","send-failed","arrived"]},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","tls-mode-mismatch","no-tls","auth-failed","microsoft-password-off","sender-refused","send-failed","grant-revoked","provider-unreachable","timeout"]},"sentTo":{"type":"string"},"startedAtMs":{"type":"number"},"sentAtMs":{"type":"number"},"arrivedAtMs":{"type":"number"}},"required":["status","code","sentTo","startedAtMs","sentAtMs","arrivedAtMs"],"additionalProperties":false},{"type":"null"}]},"receiving":{"type":"object","properties":{"mode":{"type":"string","enum":["imap","forward"]},"imap":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"security":{"type":"string","enum":["tls","starttls"]},"username":{"type":"string"},"folder":{"type":"string"}},"required":["host","port","security","username","folder"],"additionalProperties":false},{"type":"null"}]},"importWindow":{"type":"string","enum":["none","14d"]},"isPasswordSet":{"type":"boolean"},"passwordSetAtMs":{"type":"number"},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","auth-failed","folder-not-found","timeout","failed"]},"atMs":{"type":"number"}},"required":["code","atMs"],"additionalProperties":false},{"type":"null"}]},"lastTest":{"anyOf":[{"type":"object","properties":{"isOk":{"type":"boolean"},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","auth-failed","folder-not-found","timeout","failed"]},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","enum":["dns","connect","auth","folders","folder"]},"isOk":{"type":"boolean"}},"required":["step","isOk"],"additionalProperties":false}},"folders":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"atMs":{"type":"number"}},"required":["isOk","code","steps","folders","folder","atMs"],"additionalProperties":false},{"type":"null"}]}},"required":["mode","imap","importWindow","isPasswordSet","passwordSetAtMs","lastError","lastTest"],"additionalProperties":false},"createdAtMs":{"type":"number"}},"required":["mailboxId","name","emailAddress","fromName","forwardingAddress","defaultProjectId","status","lastInboundAtMs","forwardingConfirmation","sending","forwardTest","receiving","createdAtMs"],"additionalProperties":false}},"required":["mailbox"],"additionalProperties":false}}}}}}}}},"/private/mailbox/create":{"post":{"operationId":"mailbox_create","summary":"Connect a mailbox.","x-hrc-area":"mailboxes","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"emailAddress":{"type":"string","maxLength":254},"fromName":{"type":"string","maxLength":80},"defaultProjectId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","emailAddress","fromName","defaultProjectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"mailboxId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"fromName":{"type":"string"},"forwardingAddress":{"type":"string"},"defaultProjectId":{"type":"string"},"status":{"type":"string","enum":["setup","active","failing","paused"]},"lastInboundAtMs":{"type":"number"},"forwardingConfirmation":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"receivedAtMs":{"type":"number"}},"required":["code","receivedAtMs"],"additionalProperties":false},{"type":"null"}]},"sending":{"type":"object","properties":{"method":{"type":"string","enum":["relay","google","microsoft","smtp"]},"status":{"type":"string","enum":["not-connected","connected","broken"]},"connectedAddress":{"type":"string"},"brokenReason":{"type":"string","enum":["","grant-revoked","auth-failed","sender-refused","unverified"]},"connectedAtMs":{"type":"number"},"lastSendOkAtMs":{"type":"number"},"lastTest":{"anyOf":[{"type":"object","properties":{"isOk":{"type":"boolean"},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","tls-mode-mismatch","no-tls","auth-failed","microsoft-password-off","sender-refused","send-failed","grant-revoked","provider-unreachable","timeout"]},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","enum":["permission","dns","connect","tls","auth","send"]},"isOk":{"type":"boolean"}},"required":["step","isOk"],"additionalProperties":false}},"sentTo":{"type":"string"},"atMs":{"type":"number"}},"required":["isOk","code","steps","sentTo","atMs"],"additionalProperties":false},{"type":"null"}]},"dns":{"anyOf":[{"type":"object","properties":{"domain":{"type":"string"},"spf":{"type":"string","enum":["ok","missing","weak","unknown"]},"dkim":{"type":"string","enum":["ok","missing","weak","unknown"]},"dmarc":{"type":"string","enum":["ok","missing","weak","unknown"]},"checkedAtMs":{"type":"number"}},"required":["domain","spf","dkim","dmarc","checkedAtMs"],"additionalProperties":false},{"type":"null"}]}},"required":["method","status","connectedAddress","brokenReason","connectedAtMs","lastSendOkAtMs","lastTest","dns"],"additionalProperties":false},"forwardTest":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["sending","sent","send-failed","arrived"]},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","tls-mode-mismatch","no-tls","auth-failed","microsoft-password-off","sender-refused","send-failed","grant-revoked","provider-unreachable","timeout"]},"sentTo":{"type":"string"},"startedAtMs":{"type":"number"},"sentAtMs":{"type":"number"},"arrivedAtMs":{"type":"number"}},"required":["status","code","sentTo","startedAtMs","sentAtMs","arrivedAtMs"],"additionalProperties":false},{"type":"null"}]},"receiving":{"type":"object","properties":{"mode":{"type":"string","enum":["imap","forward"]},"imap":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"security":{"type":"string","enum":["tls","starttls"]},"username":{"type":"string"},"folder":{"type":"string"}},"required":["host","port","security","username","folder"],"additionalProperties":false},{"type":"null"}]},"importWindow":{"type":"string","enum":["none","14d"]},"isPasswordSet":{"type":"boolean"},"passwordSetAtMs":{"type":"number"},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","auth-failed","folder-not-found","timeout","failed"]},"atMs":{"type":"number"}},"required":["code","atMs"],"additionalProperties":false},{"type":"null"}]},"lastTest":{"anyOf":[{"type":"object","properties":{"isOk":{"type":"boolean"},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","auth-failed","folder-not-found","timeout","failed"]},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","enum":["dns","connect","auth","folders","folder"]},"isOk":{"type":"boolean"}},"required":["step","isOk"],"additionalProperties":false}},"folders":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"atMs":{"type":"number"}},"required":["isOk","code","steps","folders","folder","atMs"],"additionalProperties":false},{"type":"null"}]}},"required":["mode","imap","importWindow","isPasswordSet","passwordSetAtMs","lastError","lastTest"],"additionalProperties":false},"createdAtMs":{"type":"number"}},"required":["mailboxId","name","emailAddress","fromName","forwardingAddress","defaultProjectId","status","lastInboundAtMs","forwardingConfirmation","sending","forwardTest","receiving","createdAtMs"],"additionalProperties":false}},"required":["mailbox"],"additionalProperties":false}}}}}}}}},"/private/mailbox/update":{"post":{"operationId":"mailbox_update","summary":"Change the settings of a mailbox.","x-hrc-area":"mailboxes","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"mailboxId":{"type":"string","minLength":1,"maxLength":80},"fromName":{"type":"string","maxLength":80},"defaultProjectId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","mailboxId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"mailboxId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"fromName":{"type":"string"},"forwardingAddress":{"type":"string"},"defaultProjectId":{"type":"string"},"status":{"type":"string","enum":["setup","active","failing","paused"]},"lastInboundAtMs":{"type":"number"},"forwardingConfirmation":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"receivedAtMs":{"type":"number"}},"required":["code","receivedAtMs"],"additionalProperties":false},{"type":"null"}]},"sending":{"type":"object","properties":{"method":{"type":"string","enum":["relay","google","microsoft","smtp"]},"status":{"type":"string","enum":["not-connected","connected","broken"]},"connectedAddress":{"type":"string"},"brokenReason":{"type":"string","enum":["","grant-revoked","auth-failed","sender-refused","unverified"]},"connectedAtMs":{"type":"number"},"lastSendOkAtMs":{"type":"number"},"lastTest":{"anyOf":[{"type":"object","properties":{"isOk":{"type":"boolean"},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","tls-mode-mismatch","no-tls","auth-failed","microsoft-password-off","sender-refused","send-failed","grant-revoked","provider-unreachable","timeout"]},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","enum":["permission","dns","connect","tls","auth","send"]},"isOk":{"type":"boolean"}},"required":["step","isOk"],"additionalProperties":false}},"sentTo":{"type":"string"},"atMs":{"type":"number"}},"required":["isOk","code","steps","sentTo","atMs"],"additionalProperties":false},{"type":"null"}]},"dns":{"anyOf":[{"type":"object","properties":{"domain":{"type":"string"},"spf":{"type":"string","enum":["ok","missing","weak","unknown"]},"dkim":{"type":"string","enum":["ok","missing","weak","unknown"]},"dmarc":{"type":"string","enum":["ok","missing","weak","unknown"]},"checkedAtMs":{"type":"number"}},"required":["domain","spf","dkim","dmarc","checkedAtMs"],"additionalProperties":false},{"type":"null"}]}},"required":["method","status","connectedAddress","brokenReason","connectedAtMs","lastSendOkAtMs","lastTest","dns"],"additionalProperties":false},"forwardTest":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["sending","sent","send-failed","arrived"]},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","tls-mode-mismatch","no-tls","auth-failed","microsoft-password-off","sender-refused","send-failed","grant-revoked","provider-unreachable","timeout"]},"sentTo":{"type":"string"},"startedAtMs":{"type":"number"},"sentAtMs":{"type":"number"},"arrivedAtMs":{"type":"number"}},"required":["status","code","sentTo","startedAtMs","sentAtMs","arrivedAtMs"],"additionalProperties":false},{"type":"null"}]},"receiving":{"type":"object","properties":{"mode":{"type":"string","enum":["imap","forward"]},"imap":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"security":{"type":"string","enum":["tls","starttls"]},"username":{"type":"string"},"folder":{"type":"string"}},"required":["host","port","security","username","folder"],"additionalProperties":false},{"type":"null"}]},"importWindow":{"type":"string","enum":["none","14d"]},"isPasswordSet":{"type":"boolean"},"passwordSetAtMs":{"type":"number"},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","auth-failed","folder-not-found","timeout","failed"]},"atMs":{"type":"number"}},"required":["code","atMs"],"additionalProperties":false},{"type":"null"}]},"lastTest":{"anyOf":[{"type":"object","properties":{"isOk":{"type":"boolean"},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","auth-failed","folder-not-found","timeout","failed"]},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","enum":["dns","connect","auth","folders","folder"]},"isOk":{"type":"boolean"}},"required":["step","isOk"],"additionalProperties":false}},"folders":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"atMs":{"type":"number"}},"required":["isOk","code","steps","folders","folder","atMs"],"additionalProperties":false},{"type":"null"}]}},"required":["mode","imap","importWindow","isPasswordSet","passwordSetAtMs","lastError","lastTest"],"additionalProperties":false},"createdAtMs":{"type":"number"}},"required":["mailboxId","name","emailAddress","fromName","forwardingAddress","defaultProjectId","status","lastInboundAtMs","forwardingConfirmation","sending","forwardTest","receiving","createdAtMs"],"additionalProperties":false}},"required":["mailbox"],"additionalProperties":false}}}}}}}}},"/private/mailbox/check-forwarding":{"post":{"operationId":"mailbox_check_forwarding","summary":"Check that forwarding to a mailbox works.","x-hrc-area":"mailboxes","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"mailboxId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","mailboxId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"mailboxId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"fromName":{"type":"string"},"forwardingAddress":{"type":"string"},"defaultProjectId":{"type":"string"},"status":{"type":"string","enum":["setup","active","failing","paused"]},"lastInboundAtMs":{"type":"number"},"forwardingConfirmation":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"receivedAtMs":{"type":"number"}},"required":["code","receivedAtMs"],"additionalProperties":false},{"type":"null"}]},"sending":{"type":"object","properties":{"method":{"type":"string","enum":["relay","google","microsoft","smtp"]},"status":{"type":"string","enum":["not-connected","connected","broken"]},"connectedAddress":{"type":"string"},"brokenReason":{"type":"string","enum":["","grant-revoked","auth-failed","sender-refused","unverified"]},"connectedAtMs":{"type":"number"},"lastSendOkAtMs":{"type":"number"},"lastTest":{"anyOf":[{"type":"object","properties":{"isOk":{"type":"boolean"},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","tls-mode-mismatch","no-tls","auth-failed","microsoft-password-off","sender-refused","send-failed","grant-revoked","provider-unreachable","timeout"]},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","enum":["permission","dns","connect","tls","auth","send"]},"isOk":{"type":"boolean"}},"required":["step","isOk"],"additionalProperties":false}},"sentTo":{"type":"string"},"atMs":{"type":"number"}},"required":["isOk","code","steps","sentTo","atMs"],"additionalProperties":false},{"type":"null"}]},"dns":{"anyOf":[{"type":"object","properties":{"domain":{"type":"string"},"spf":{"type":"string","enum":["ok","missing","weak","unknown"]},"dkim":{"type":"string","enum":["ok","missing","weak","unknown"]},"dmarc":{"type":"string","enum":["ok","missing","weak","unknown"]},"checkedAtMs":{"type":"number"}},"required":["domain","spf","dkim","dmarc","checkedAtMs"],"additionalProperties":false},{"type":"null"}]}},"required":["method","status","connectedAddress","brokenReason","connectedAtMs","lastSendOkAtMs","lastTest","dns"],"additionalProperties":false},"forwardTest":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["sending","sent","send-failed","arrived"]},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","tls-mode-mismatch","no-tls","auth-failed","microsoft-password-off","sender-refused","send-failed","grant-revoked","provider-unreachable","timeout"]},"sentTo":{"type":"string"},"startedAtMs":{"type":"number"},"sentAtMs":{"type":"number"},"arrivedAtMs":{"type":"number"}},"required":["status","code","sentTo","startedAtMs","sentAtMs","arrivedAtMs"],"additionalProperties":false},{"type":"null"}]},"receiving":{"type":"object","properties":{"mode":{"type":"string","enum":["imap","forward"]},"imap":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"security":{"type":"string","enum":["tls","starttls"]},"username":{"type":"string"},"folder":{"type":"string"}},"required":["host","port","security","username","folder"],"additionalProperties":false},{"type":"null"}]},"importWindow":{"type":"string","enum":["none","14d"]},"isPasswordSet":{"type":"boolean"},"passwordSetAtMs":{"type":"number"},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","auth-failed","folder-not-found","timeout","failed"]},"atMs":{"type":"number"}},"required":["code","atMs"],"additionalProperties":false},{"type":"null"}]},"lastTest":{"anyOf":[{"type":"object","properties":{"isOk":{"type":"boolean"},"code":{"type":"string","enum":["","host-not-found","host-not-public","port-not-allowed","no-answer","tls-failed","auth-failed","folder-not-found","timeout","failed"]},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","enum":["dns","connect","auth","folders","folder"]},"isOk":{"type":"boolean"}},"required":["step","isOk"],"additionalProperties":false}},"folders":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"atMs":{"type":"number"}},"required":["isOk","code","steps","folders","folder","atMs"],"additionalProperties":false},{"type":"null"}]}},"required":["mode","imap","importWindow","isPasswordSet","passwordSetAtMs","lastError","lastTest"],"additionalProperties":false},"createdAtMs":{"type":"number"}},"required":["mailboxId","name","emailAddress","fromName","forwardingAddress","defaultProjectId","status","lastInboundAtMs","forwardingConfirmation","sending","forwardTest","receiving","createdAtMs"],"additionalProperties":false},"outcome":{"type":"string","enum":["working","code-only","nothing"]}},"required":["mailbox","outcome"],"additionalProperties":false}}}}}}}}},"/private/member/list":{"post":{"operationId":"member_list","summary":"List the team members.","x-hrc-area":"team","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"cursor":{"type":"string","maxLength":400},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"membershipId":{"type":"string"},"companyId":{"type":"string"},"userId":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","member"]},"isMe":{"type":"boolean"},"joinedAtMs":{"type":"number"}},"required":["membershipId","companyId","userId","email","name","role","isMe","joinedAtMs"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}}}}}}},"/private/invitation/list":{"post":{"operationId":"invitation_list","summary":"List the open invitations.","x-hrc-area":"team","x-hrc-level":"read","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"cursor":{"type":"string","maxLength":400},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"invitationId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","member"]},"status":{"type":"string","enum":["pending","accepted","declined","revoked","expired"]},"invitedByName":{"type":"string"},"createdAtMs":{"type":"number"},"expiresAtMs":{"type":"number"}},"required":["companyId","invitationId","email","role","status","invitedByName","createdAtMs","expiresAtMs"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}}}}}}},"/private/invitation/create":{"post":{"operationId":"invitation_create","summary":"Invite a person to the team by e-mail.","x-hrc-area":"team","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"email":{"type":"string","maxLength":254},"role":{"type":"string","enum":["owner","member"]}},"required":["companyId","email","role"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"invitationId":{"type":"string"}},"required":["companyId","invitationId"],"additionalProperties":false}}}}}}}}},"/private/invitation/resend":{"post":{"operationId":"invitation_resend","summary":"Send an invitation e-mail again.","x-hrc-area":"team","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"invitationId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","invitationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"invitationId":{"type":"string"}},"required":["companyId","invitationId"],"additionalProperties":false}}}}}}}}},"/private/invitation/revoke":{"post":{"operationId":"invitation_revoke","summary":"Cancel an open invitation.","x-hrc-area":"team","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"invitationId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","invitationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"invitationId":{"type":"string"}},"required":["companyId","invitationId"],"additionalProperties":false}}}}}}}}},"/private/company/get":{"post":{"operationId":"company_get","summary":"Read the company name and settings.","x-hrc-area":"company","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"company":{"type":"object","properties":{"companyId":{"type":"string"},"name":{"type":"string"},"timeZone":{"type":"string"},"defaultLanguage":{"type":"string","enum":["lt","en"]},"role":{"type":"string","enum":["owner","member"]},"limits":{"type":"object","properties":{"projectLimit":{"type":"integer","minimum":0,"maximum":9007199254740991},"mailboxLimit":{"type":"integer","minimum":0,"maximum":9007199254740991},"memberLimit":{"type":"integer","minimum":0,"maximum":9007199254740991},"storageQuotaBytes":{"type":"number","minimum":0},"relayDailyLimit":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["projectLimit","mailboxLimit","memberLimit","storageQuotaBytes","relayDailyLimit"],"additionalProperties":false},"usage":{"type":"object","properties":{"projectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"mailboxCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"storageUsedBytes":{"type":"number","minimum":0}},"required":["projectCount","mailboxCount","memberCount","storageUsedBytes"],"additionalProperties":false},"onboarding":{"type":"object","properties":{"projectCreatedAtMs":{"type":"number"},"widgetSeenAtMs":{"type":"number"},"mailboxConnectedAtMs":{"type":"number"},"telegramLinkedAtMs":{"type":"number"},"dismissedAtMs":{"type":"number"}},"required":["projectCreatedAtMs","widgetSeenAtMs","mailboxConnectedAtMs","telegramLinkedAtMs","dismissedAtMs"],"additionalProperties":false},"isRelayPaused":{"type":"boolean"},"createdAtMs":{"type":"number"},"logoUrl":{"type":"string"},"fileSettings":{"type":"object","properties":{"maxFileBytes":{"type":"integer","minimum":1000000,"maximum":5000000000000},"maxVideoSeconds":{"anyOf":[{"type":"integer","minimum":60,"maximum":86400,"multipleOf":60},{"type":"null"}]},"publicLinksBy":{"type":"string","enum":["members","owners","off"]}},"required":["maxFileBytes","maxVideoSeconds","publicLinksBy"],"additionalProperties":false}},"required":["companyId","name","timeZone","defaultLanguage","role","limits","usage","onboarding","isRelayPaused","createdAtMs","logoUrl","fileSettings"],"additionalProperties":false}},"required":["company"],"additionalProperties":false}}}}}}}}},"/private/ai-agent-self/get":{"post":{"operationId":"whoami","summary":"Tell who you are: the company, the member you act as, your permissions, your tools and the chat widgets you may work on. Call this first.","x-hrc-area":"self","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string"},"companyName":{"type":"string"},"aiAgent":{"type":"object","properties":{"aiAgentId":{"type":"string"},"name":{"type":"string"},"taskPick":{"type":"string","enum":["assigned","assigned-and-pending"]},"canFinishTasks":{"type":"boolean"}},"required":["aiAgentId","name","taskPick","canFinishTasks"],"additionalProperties":false},"member":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","member"]}},"required":["userId","name","role"],"additionalProperties":false},"areas":{"type":"object","properties":{"conversations":{"type":"string","enum":["off","read","write"]},"drafts":{"type":"string","enum":["off","read","write"]},"send":{"type":"string","enum":["off","write"]},"tasks":{"type":"string","enum":["off","read","write"]},"kb":{"type":"string","enum":["off","read","write"]},"news":{"type":"string","enum":["off","read","write"]},"files":{"default":"off","type":"string","enum":["off","read","write"]},"widgets":{"type":"string","enum":["off","read","write"]},"mailboxes":{"type":"string","enum":["off","read","write"]},"team":{"type":"string","enum":["off","read","write"]},"company":{"type":"string","enum":["off","read","write"]},"analytics":{"type":"string","enum":["off","read","write"]}},"required":["conversations","drafts","send","tasks","kb","news","files","widgets","mailboxes","team","company","analytics"],"additionalProperties":false},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"area":{"type":"string"},"level":{"type":"string","enum":["read","write"]},"description":{"type":"string"}},"required":["name","path","area","level","description"],"additionalProperties":false}},"company":{"type":"object","properties":{"defaultLanguage":{"type":"string","enum":["lt","en"]},"timeZone":{"type":"string"},"siteDomains":{"type":"array","items":{"type":"string"}},"knowledgeBases":{"type":"array","items":{"type":"object","properties":{"knowledgeBaseId":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"articleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["knowledgeBaseId","name","address","defaultLanguage","articleCount"],"additionalProperties":false}},"articleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"articleLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["defaultLanguage","timeZone","siteDomains","knowledgeBases","articleCount","articleLimit"],"additionalProperties":false},"chatWidgets":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"name":{"type":"string"}},"required":["projectId","name"],"additionalProperties":false}},"mcpUrl":{"type":"string"},"apiUrl":{"type":"string"},"openApiUrl":{"type":"string"}},"required":["companyId","companyName","aiAgent","member","areas","tools","company","chatWidgets","mcpUrl","apiUrl","openApiUrl"],"additionalProperties":false}}}}}}}}},"/private/task/queue":{"post":{"operationId":"task_queue","summary":"List the tasks you should work on now: tasks assigned to you first, then pending tasks with no assignee when you may take them.","x-hrc-area":"tasks","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"title":{"type":"string"},"status":{"type":"string","enum":["backlog","pending","in-progress","qa","done","blocked"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"assigneeUserId":{"type":"string"},"assigneeAiAgentId":{"type":"string"},"projectId":{"type":"string"},"conversationIds":{"type":"array","items":{"type":"string"}},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"commentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isAiDrafted":{"type":"boolean"},"notifyCustomerOnDone":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"endedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskId","number","title","status","priority","labels","assigneeUserId","assigneeAiAgentId","projectId","conversationIds","attachmentCount","commentCount","isAiDrafted","notifyCustomerOnDone","createdByUserId","createdAtMs","updatedAtMs","startedAtMs","endedAtMs"],"additionalProperties":false}},"taskPick":{"type":"string","enum":["assigned","assigned-and-pending"]},"canFinishTasks":{"type":"boolean"}},"required":["items","taskPick","canFinishTasks"],"additionalProperties":false}}}}}}}}},"/private/task/take":{"post":{"operationId":"task_take","summary":"Take a task: it is assigned to you and moved to In progress. Works for tasks assigned to you, and for pending tasks with no assignee when you may take them.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","taskId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"task":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"title":{"type":"string"},"status":{"type":"string","enum":["backlog","pending","in-progress","qa","done","blocked"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"assigneeUserId":{"type":"string"},"assigneeAiAgentId":{"type":"string"},"projectId":{"type":"string"},"conversationIds":{"type":"array","items":{"type":"string"}},"attachmentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"commentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"isAiDrafted":{"type":"boolean"},"notifyCustomerOnDone":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"endedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"descriptionMd":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"conversationId":{"type":"string"},"fileName":{"type":"string"},"category":{"type":"string","enum":["image","video","document","other"]},"hasThumbnail":{"type":"boolean"},"isAvailable":{"type":"boolean"}},"required":["attachmentId","conversationId","fileName","category","hasThumbnail","isAvailable"],"additionalProperties":false}},"files":{"type":"array","items":{"type":"object","properties":{"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasThumbnail":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","kind","fileName","sizeBytes","status","rejectReason","durationMs","hasThumbnail","createdByUserId","createdAtMs"],"additionalProperties":false}},"conversations":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":0,"maximum":9007199254740991},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","closed"]},"assigneeUserId":{"type":"string"},"isAvailable":{"type":"boolean"}},"required":["conversationId","ref","subject","status","assigneeUserId","isAvailable"],"additionalProperties":false}}},"required":["taskId","number","title","status","priority","labels","assigneeUserId","assigneeAiAgentId","projectId","conversationIds","attachmentCount","commentCount","isAiDrafted","notifyCustomerOnDone","createdByUserId","createdAtMs","updatedAtMs","startedAtMs","endedAtMs","descriptionMd","attachments","files","conversations"],"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/list":{"post":{"operationId":"knowledge_base_list","summary":"List the knowledge bases of the company with their address and number of articles.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"knowledgeBaseId":{"type":"string"},"name":{"type":"string"},"isPublic":{"type":"boolean"},"address":{"type":"string"},"customDomainStatus":{"type":"string","enum":["none","waiting-dns","checking","active","failed"]},"articleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"widgetNames":{"type":"array","items":{"type":"string"}}},"required":["knowledgeBaseId","name","isPublic","address","customDomainStatus","articleCount","widgetNames"],"additionalProperties":false}},"articleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"articleLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","articleCount","articleLimit"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/get":{"post":{"operationId":"knowledge_base_get","summary":"Read one knowledge base with its address, main language, visibility, design, menu and chat settings.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","knowledgeBaseId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"knowledgeBase":{"type":"object","properties":{"knowledgeBaseId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"isPublic":{"type":"boolean"},"subdomain":{"type":"string"},"subdomainHost":{"type":"string"},"address":{"type":"string"},"publicUrl":{"type":"string"},"customDomain":{"type":"object","properties":{"host":{"type":"string"},"status":{"type":"string","enum":["none","waiting-dns","checking","active","failed"]},"failure":{"type":"string","enum":["","cloudflare-refused","ssl-failed","hostname-blocked"]},"checkedAtMs":{"type":"number"},"cnameName":{"type":"string"},"cnameTarget":{"type":"string"},"ownershipName":{"type":"string"},"ownershipValue":{"type":"string"},"isOwnershipProven":{"type":"boolean"}},"required":["host","status","failure","checkedAtMs","cnameName","cnameTarget","ownershipName","ownershipValue","isOwnershipProven"],"additionalProperties":false},"isCustomDomainAvailable":{"type":"boolean"},"site":{"type":"object","properties":{"design":{"type":"object","properties":{"primaryColor":{"type":"string"},"colorScheme":{"type":"string","enum":["auto","light","dark"]},"font":{"type":"string","enum":["geist","system","manrope","ibm-plex-sans","source-serif"]},"logo":{"type":"object","properties":{"kbAssetId":{"type":"string"},"mimeType":{"anyOf":[{"type":"string","const":""},{"type":"string","enum":["image/png","image/svg+xml"]}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kbAssetId","mimeType","sizeBytes"],"additionalProperties":false},"favicon":{"type":"object","properties":{"kbAssetId":{"type":"string"},"mimeType":{"anyOf":[{"type":"string","const":""},{"type":"string","enum":["image/png","image/svg+xml"]}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kbAssetId","mimeType","sizeBytes"],"additionalProperties":false},"isNameShown":{"type":"boolean"},"isReferralLinkShown":{"type":"boolean"}},"required":["primaryColor","colorScheme","font","logo","favicon","isNameShown","isReferralLinkShown"],"additionalProperties":false},"menu":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"},"isNewTab":{"type":"boolean"}},"required":["label","url","isNewTab"],"additionalProperties":false}},"customCode":{"type":"object","properties":{"headHtml":{"type":"string"},"bodyEndHtml":{"type":"string"},"extraHosts":{"type":"array","items":{"type":"string"}},"allowedHosts":{"type":"array","items":{"type":"string"}}},"required":["headHtml","bodyEndHtml","extraHosts","allowedHosts"],"additionalProperties":false},"chat":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"projectId":{"type":"string"}},"required":["isEnabled","projectId"],"additionalProperties":false}},"required":["design","menu","customCode","chat"],"additionalProperties":false}},"required":["knowledgeBaseId","name","description","defaultLanguage","isPublic","subdomain","subdomainHost","address","publicUrl","customDomain","isCustomDomainAvailable","site"],"additionalProperties":false}},"required":["knowledgeBase"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/languages-get":{"post":{"operationId":"knowledge_base_languages_get","summary":"Read the languages of a knowledge base and how many articles are translated, drafted or missing in each.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","knowledgeBaseId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"main":{"type":"object","properties":{"displayName":{"type":"string"},"nativeName":{"type":"string"},"flag":{"type":"string"}},"required":["displayName","nativeName","flag"],"additionalProperties":false},"articleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"languages":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"fallbackLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"path":{"type":"string","minLength":2,"maxLength":40,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"displayName":{"type":"string"},"nativeName":{"type":"string"},"flag":{"type":"string"},"publishedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"machineDraftCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"missingCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outdatedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"translateJob":{"type":"object","properties":{"status":{"type":"string","enum":["idle","queued","running","done","stopped"]},"stopReason":{"type":"string","enum":["","ai-limit","ai-unavailable","failed"]},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"doneCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finishedAtMs":{"type":"number"}},"required":["status","stopReason","totalCount","doneCount","failedCount","finishedAtMs"],"additionalProperties":false}},"required":["language","fallbackLanguage","path","displayName","nativeName","flag","publishedCount","draftCount","machineDraftCount","missingCount","outdatedCount","translateJob"],"additionalProperties":false}},"availableLanguages":{"type":"array","items":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]}},"isTranslateAvailable":{"type":"boolean"}},"required":["defaultLanguage","main","articleCount","languages","availableLanguages","isTranslateAvailable"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/language-catalog":{"post":{"operationId":"knowledge_base_language_catalog","summary":"List every language a knowledge base can use, with its own name, flag choices and suggested web address.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"languages":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"nativeName":{"type":"string"},"flags":{"type":"array","items":{"type":"string"}},"path":{"type":"string","minLength":2,"maxLength":40,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"required":["language","nativeName","flags","path"],"additionalProperties":false}},"flagRegions":{"type":"array","items":{"type":"string","enum":["ad","ae","af","ag","ai","al","am","ao","aq","ar","as","at","au","aw","ax","az","ba","bb","bd","be","bf","bg","bh","bi","bj","bl","bm","bn","bo","bq","br","bs","bt","bv","bw","by","bz","ca","cc","cd","cf","cg","ch","ci","ck","cl","cm","cn","co","cp","cr","cu","cv","cw","cx","cy","cz","de","dg","dj","dk","dm","do","dz","ec","ee","eg","eh","er","es","es-ct","es-ga","es-pv","et","eu","fi","fj","fk","fm","fo","fr","ga","gb","gb-eng","gb-nir","gb-sct","gb-wls","gd","ge","gf","gg","gh","gi","gl","gm","gn","gp","gq","gr","gs","gt","gu","gw","gy","hk","hm","hn","hr","ht","hu","ic","id","ie","il","im","in","io","iq","ir","is","it","je","jm","jo","jp","ke","kg","kh","ki","km","kn","kp","kr","kw","ky","kz","la","lb","lc","li","lk","lr","ls","lt","lu","lv","ly","ma","mc","md","me","mf","mg","mh","mk","ml","mm","mn","mo","mp","mq","mr","ms","mt","mu","mv","mw","mx","my","mz","na","nc","ne","nf","ng","ni","nl","no","np","nr","nu","nz","om","pa","pc","pe","pf","pg","ph","pk","pl","pm","pn","pr","ps","pt","pw","py","qa","re","ro","rs","ru","rw","sa","sb","sc","sd","se","sg","sh","sh-ac","sh-hl","sh-ta","si","sj","sk","sl","sm","sn","so","sr","ss","st","sv","sx","sy","sz","tc","td","tf","tg","th","tj","tk","tl","tm","tn","to","tr","tt","tv","tw","tz","ua","ug","um","un","us","uy","uz","va","vc","ve","vg","vi","vn","vu","wf","ws","xk","ye","yt","za","zm","zw"]}}},"required":["languages","flagRegions"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/translation-missing-list":{"post":{"operationId":"knowledge_base_translation_missing_list","summary":"List the published articles of a knowledge base that have no version yet in one language, and the section names with none, so an AI agent can translate exactly those.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"kbArticleIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200}},"required":["companyId","knowledgeBaseId","language"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"sourceLanguage":{"type":"string"},"articleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"missingCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"articles":{"type":"array","items":{"type":"object","properties":{"kbArticleId":{"type":"string"},"kbCategoryId":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"}},"required":["kbArticleId","kbCategoryId","title","slug"],"additionalProperties":false}},"sections":{"type":"array","items":{"type":"object","properties":{"kbCategoryId":{"type":"string"},"title":{"type":"string"},"translations":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"title":{"type":"string"}},"required":["language","title"],"additionalProperties":false}}},"required":["kbCategoryId","title","translations"],"additionalProperties":false}}},"required":["language","sourceLanguage","articleCount","missingCount","articles","sections"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/semantic-search-get":{"post":{"operationId":"knowledge_base_semantic_search_get","summary":"Read whether search by meaning is on for a knowledge base and how many articles are ready for it.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","knowledgeBaseId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"isLaunched":{"type":"boolean"},"isEnabled":{"type":"boolean"},"state":{"type":"string","enum":["off","unavailable","preparing","ready","ai-limit"]},"articleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"readyArticleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"estimatePercent":{"type":["number","null"]}},"required":["isLaunched","isEnabled","state","articleCount","readyArticleCount","estimatePercent"],"additionalProperties":false}}}}}}}}},"/private/kb-article/tree":{"post":{"operationId":"kb_article_tree","summary":"List the sections of a knowledge base in order, each with its articles and their state: draft, published or changed.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","knowledgeBaseId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"categories":{"type":"array","items":{"type":"object","properties":{"kbCategoryId":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"translations":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"title":{"type":"string"}},"required":["language","title"],"additionalProperties":false}},"articles":{"type":"array","items":{"type":"object","properties":{"kbArticleId":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"isAiOnly":{"type":"boolean"},"state":{"type":"string","enum":["draft","published","changed"]}},"required":["kbArticleId","title","slug","isAiOnly","state"],"additionalProperties":false}}},"required":["kbCategoryId","title","slug","translations","articles"],"additionalProperties":false}}},"required":["categories"],"additionalProperties":false}}}}}}}}},"/private/kb-article/get":{"post":{"operationId":"kb_article_get","summary":"Read one knowledge base article with its Markdown text, state and public address.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"kbArticleId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","kbArticleId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"article":{"type":"object","properties":{"kbArticleId":{"type":"string"},"knowledgeBaseId":{"type":"string"},"kbCategoryId":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"bodyMarkdown":{"type":"string"},"seoDescription":{"type":"string"},"isAiOnly":{"type":"boolean"},"state":{"type":"string","enum":["draft","published","changed"]},"publishedAtMs":{"type":"number"},"contentUpdatedAtMs":{"type":"number"},"publicUrl":{"type":"string"}},"required":["kbArticleId","knowledgeBaseId","kbCategoryId","title","slug","bodyMarkdown","seoDescription","isAiOnly","state","publishedAtMs","contentUpdatedAtMs","publicUrl"],"additionalProperties":false}},"required":["article"],"additionalProperties":false}}}}}}}}},"/private/kb-article/search":{"post":{"operationId":"kb_article_search","summary":"Search the published articles by words (fuzzy) or by meaning (semantic). Leave knowledgeBaseId out to search every knowledge base of the company (up to 10), or give one to search only it; each hit names its knowledgeBaseId. Drafts are never found; kb_article_tree lists every article, drafts included.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"query":{"type":"string","maxLength":200},"mode":{"type":"string","enum":["fuzzy","semantic"]},"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]}},"required":["companyId","query","mode"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"kbArticleId":{"type":"string"},"kbCategoryId":{"type":"string"},"title":{"type":"string"},"categoryTitle":{"type":"string"},"path":{"type":"string"},"snippet":{"type":"string"},"isAiOnly":{"type":"boolean"},"knowledgeBaseId":{"type":"string"}},"required":["kbArticleId","kbCategoryId","title","categoryTitle","path","snippet","isAiOnly","knowledgeBaseId"],"additionalProperties":false}},"mode":{"type":"string","enum":["fuzzy","semantic"]},"engine":{"type":"string","enum":["meilisearch","database"]},"fallbackReason":{"type":"string","enum":["","short-query","engine-database","ai-off","ai-limit","ai-failed","not-ready"]},"tookMs":{"type":"number"}},"required":["items","mode","engine","fallbackReason","tookMs"],"additionalProperties":false}}}}}}}}},"/private/kb-article/translation-list":{"post":{"operationId":"kb_article_translation_list","summary":"List the languages of one article and the state of its translation in each.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"kbArticleId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","kbArticleId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"items":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"state":{"type":"string","enum":["missing","draft","published","changed"]},"isMachineTranslated":{"type":"boolean"},"isSourceNewer":{"type":"boolean"}},"required":["language","state","isMachineTranslated","isSourceNewer"],"additionalProperties":false}}},"required":["defaultLanguage","items"],"additionalProperties":false}}}}}}}}},"/private/kb-article/translation-get":{"post":{"operationId":"kb_article_translation_get","summary":"Read the translation of one article in one language.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"kbArticleId":{"type":"string","minLength":1,"maxLength":80},"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]}},"required":["companyId","kbArticleId","language"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"translation":{"type":"object","properties":{"kbArticleId":{"type":"string"},"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"state":{"type":"string","enum":["missing","draft","published","changed"]},"title":{"type":"string"},"bodyMarkdown":{"type":"string"},"seoDescription":{"type":"string"},"isMachineTranslated":{"type":"boolean"},"isSourceNewer":{"type":"boolean"},"contentUpdatedAtMs":{"type":"number"},"publishedAtMs":{"type":"number"},"publicUrl":{"type":"string"},"fallbackLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"isMainPublished":{"type":"boolean"},"source":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"title":{"type":"string"},"bodyMarkdown":{"type":"string"}},"required":["language","title","bodyMarkdown"],"additionalProperties":false}},"required":["kbArticleId","language","state","title","bodyMarkdown","seoDescription","isMachineTranslated","isSourceNewer","contentUpdatedAtMs","publishedAtMs","publicUrl","fallbackLanguage","isMainPublished","source"],"additionalProperties":false}},"required":["translation"],"additionalProperties":false}}}}}}}}},"/private/kb-media/list":{"post":{"operationId":"kb_media_list","summary":"Read the uploaded images and videos an article names by their kbm- ids: file name, kind, size and whether they are ready.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"kbMediaIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"required":["companyId","kbMediaIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"kbMediaId":{"type":"string"},"knowledgeBaseId":{"type":"string"},"kind":{"type":"string","enum":["video","image"]},"fileName":{"type":"string"},"sizeBytes":{"type":"number"},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"number"},"widthPx":{"type":"number"},"heightPx":{"type":"number"},"videoCodec":{"type":"string"},"fileUrl":{"type":"string"},"posterUrl":{"type":"string"}},"required":["kbMediaId","knowledgeBaseId","kind","fileName","sizeBytes","status","rejectReason","durationMs","widthPx","heightPx","videoCodec","fileUrl","posterUrl"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}}}}}}},"/private/kb-article/create":{"post":{"operationId":"kb_article_create","summary":"Create a draft article in a section with its title and, if you have them, its Markdown text, search description, address and AI only flag. Answers kbArticleId, slug and contentUpdatedAtMs.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"kbCategoryId":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":120},"bodyMarkdown":{"type":"string","maxLength":100000},"seoDescription":{"type":"string","maxLength":160},"slug":{"type":"string","maxLength":80},"isAiOnly":{"type":"boolean"}},"required":["companyId","kbCategoryId","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"kbArticleId":{"type":"string"},"slug":{"type":"string"},"contentUpdatedAtMs":{"type":"number"}},"required":["kbArticleId","slug","contentUpdatedAtMs"],"additionalProperties":false}}}}}}}}},"/private/kb-article/update":{"post":{"operationId":"kb_article_update","summary":"Change the title, address, Markdown text, search description or AI only flag of an article. Send the contentUpdatedAtMs you read as baseContentUpdatedAtMs.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"kbArticleId":{"type":"string","minLength":1,"maxLength":80},"baseContentUpdatedAtMs":{"type":"number"},"title":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","maxLength":80},"bodyMarkdown":{"type":"string","maxLength":100000},"seoDescription":{"type":"string","maxLength":160},"isAiOnly":{"type":"boolean"}},"required":["companyId","kbArticleId","baseContentUpdatedAtMs"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"article":{"type":"object","properties":{"kbArticleId":{"type":"string"},"knowledgeBaseId":{"type":"string"},"kbCategoryId":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"bodyMarkdown":{"type":"string"},"seoDescription":{"type":"string"},"isAiOnly":{"type":"boolean"},"state":{"type":"string","enum":["draft","published","changed"]},"publishedAtMs":{"type":"number"},"contentUpdatedAtMs":{"type":"number"},"publicUrl":{"type":"string"}},"required":["kbArticleId","knowledgeBaseId","kbCategoryId","title","slug","bodyMarkdown","seoDescription","isAiOnly","state","publishedAtMs","contentUpdatedAtMs","publicUrl"],"additionalProperties":false}},"required":["article"],"additionalProperties":false}}}}}}}}},"/private/kb-article/set-published":{"post":{"operationId":"kb_article_set_published","summary":"Publish the current text of an article, or turn it back into a draft.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"kbArticleId":{"type":"string","minLength":1,"maxLength":80},"isPublished":{"type":"boolean"}},"required":["companyId","kbArticleId","isPublished"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"article":{"type":"object","properties":{"kbArticleId":{"type":"string"},"knowledgeBaseId":{"type":"string"},"kbCategoryId":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"bodyMarkdown":{"type":"string"},"seoDescription":{"type":"string"},"isAiOnly":{"type":"boolean"},"state":{"type":"string","enum":["draft","published","changed"]},"publishedAtMs":{"type":"number"},"contentUpdatedAtMs":{"type":"number"},"publicUrl":{"type":"string"}},"required":["kbArticleId","knowledgeBaseId","kbCategoryId","title","slug","bodyMarkdown","seoDescription","isAiOnly","state","publishedAtMs","contentUpdatedAtMs","publicUrl"],"additionalProperties":false}},"required":["article"],"additionalProperties":false}}}}}}}}},"/private/kb-article/delete":{"post":{"operationId":"kb_article_delete","summary":"Delete an article. Readers no longer see it. (destructive)","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"kbArticleId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","kbArticleId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"isDeleted":{"type":"boolean","const":true}},"required":["isDeleted"],"additionalProperties":false}}}}}}}}},"/private/kb-article/translation-save":{"post":{"operationId":"kb_article_translation_save","summary":"Write or change the translation of an article in one language of its knowledge base. It stays a draft until kb_article_translation_set_published. An AI agent cannot change a translation a team member wrote.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"kbArticleId":{"type":"string","minLength":1,"maxLength":80},"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"baseContentUpdatedAtMs":{"type":"number","minimum":0},"title":{"type":"string","minLength":1,"maxLength":120},"bodyMarkdown":{"type":"string","maxLength":100000},"seoDescription":{"type":"string","maxLength":160}},"required":["companyId","kbArticleId","language","baseContentUpdatedAtMs","title","bodyMarkdown","seoDescription"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"translation":{"type":"object","properties":{"kbArticleId":{"type":"string"},"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"state":{"type":"string","enum":["missing","draft","published","changed"]},"title":{"type":"string"},"bodyMarkdown":{"type":"string"},"seoDescription":{"type":"string"},"isMachineTranslated":{"type":"boolean"},"isSourceNewer":{"type":"boolean"},"contentUpdatedAtMs":{"type":"number"},"publishedAtMs":{"type":"number"},"publicUrl":{"type":"string"},"fallbackLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"isMainPublished":{"type":"boolean"},"source":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"title":{"type":"string"},"bodyMarkdown":{"type":"string"}},"required":["language","title","bodyMarkdown"],"additionalProperties":false}},"required":["kbArticleId","language","state","title","bodyMarkdown","seoDescription","isMachineTranslated","isSourceNewer","contentUpdatedAtMs","publishedAtMs","publicUrl","fallbackLanguage","isMainPublished","source"],"additionalProperties":false}},"required":["translation"],"additionalProperties":false}}}}}}}}},"/private/kb-article/translation-set-published":{"post":{"operationId":"kb_article_translation_set_published","summary":"Publish or unpublish the translation of an article in one language.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"kbArticleId":{"type":"string","minLength":1,"maxLength":80},"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"isPublished":{"type":"boolean"}},"required":["companyId","kbArticleId","language","isPublished"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"translation":{"type":"object","properties":{"kbArticleId":{"type":"string"},"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"state":{"type":"string","enum":["missing","draft","published","changed"]},"title":{"type":"string"},"bodyMarkdown":{"type":"string"},"seoDescription":{"type":"string"},"isMachineTranslated":{"type":"boolean"},"isSourceNewer":{"type":"boolean"},"contentUpdatedAtMs":{"type":"number"},"publishedAtMs":{"type":"number"},"publicUrl":{"type":"string"},"fallbackLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"isMainPublished":{"type":"boolean"},"source":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"title":{"type":"string"},"bodyMarkdown":{"type":"string"}},"required":["language","title","bodyMarkdown"],"additionalProperties":false}},"required":["kbArticleId","language","state","title","bodyMarkdown","seoDescription","isMachineTranslated","isSourceNewer","contentUpdatedAtMs","publishedAtMs","publicUrl","fallbackLanguage","isMainPublished","source"],"additionalProperties":false}},"required":["translation"],"additionalProperties":false}}}}}}}}},"/private/kb-category/create":{"post":{"operationId":"kb_category_create","summary":"Create a section in a knowledge base, optionally with its address and translated titles. Answers kbCategoryId and slug.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":80},"slug":{"type":"string","maxLength":60},"translations":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"title":{"type":"string","minLength":1,"maxLength":80}},"required":["language","title"],"additionalProperties":false}}},"required":["companyId","knowledgeBaseId","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"kbCategoryId":{"type":"string"},"slug":{"type":"string"}},"required":["kbCategoryId","slug"],"additionalProperties":false}}}}}}}}},"/private/kb-category/update":{"post":{"operationId":"kb_category_update","summary":"Change the title, address or translated titles of a section.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"kbCategoryId":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":80},"slug":{"type":"string","maxLength":60},"translations":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"title":{"type":"string","minLength":1,"maxLength":80}},"required":["language","title"],"additionalProperties":false}}},"required":["companyId","kbCategoryId","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"kbCategoryId":{"type":"string"}},"required":["kbCategoryId"],"additionalProperties":false}}}}}}}}},"/private/kb-category/delete":{"post":{"operationId":"kb_category_delete","summary":"Delete an empty section. A section with articles, or the last section, cannot be deleted.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"kbCategoryId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","kbCategoryId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"isDeleted":{"type":"boolean","const":true}},"required":["isDeleted"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/reorder":{"post":{"operationId":"knowledge_base_reorder","summary":"Change the order of the sections of a knowledge base and of the articles in each. Send every section and every article.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"sections":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"kbCategoryId":{"type":"string","minLength":1,"maxLength":80},"kbArticleIds":{"maxItems":2000,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"required":["kbCategoryId","kbArticleIds"],"additionalProperties":false}}},"required":["companyId","knowledgeBaseId","sections"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"isSaved":{"type":"boolean","const":true}},"required":["isSaved"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/translate-missing":{"post":{"operationId":"knowledge_base_translate_missing","summary":"Start HRC AI translating every article that has no translation in one language yet. It uses the company's AI capacity and the translations arrive as drafts.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]}},"required":["companyId","knowledgeBaseId","language"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"main":{"type":"object","properties":{"displayName":{"type":"string"},"nativeName":{"type":"string"},"flag":{"type":"string"}},"required":["displayName","nativeName","flag"],"additionalProperties":false},"articleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"languages":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"fallbackLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"path":{"type":"string","minLength":2,"maxLength":40,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"displayName":{"type":"string"},"nativeName":{"type":"string"},"flag":{"type":"string"},"publishedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"machineDraftCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"missingCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outdatedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"translateJob":{"type":"object","properties":{"status":{"type":"string","enum":["idle","queued","running","done","stopped"]},"stopReason":{"type":"string","enum":["","ai-limit","ai-unavailable","failed"]},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"doneCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finishedAtMs":{"type":"number"}},"required":["status","stopReason","totalCount","doneCount","failedCount","finishedAtMs"],"additionalProperties":false}},"required":["language","fallbackLanguage","path","displayName","nativeName","flag","publishedCount","draftCount","machineDraftCount","missingCount","outdatedCount","translateJob"],"additionalProperties":false}},"availableLanguages":{"type":"array","items":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]}},"isTranslateAvailable":{"type":"boolean"}},"required":["defaultLanguage","main","articleCount","languages","availableLanguages","isTranslateAvailable"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/create":{"post":{"operationId":"knowledge_base_create","summary":"Create a knowledge base with its name, address on hrc.lt, main language and any extra languages. It starts hidden.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":80},"subdomain":{"type":"string","maxLength":63},"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"languages":{"maxItems":30,"type":"array","items":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]}}},"required":["companyId","name","subdomain","defaultLanguage"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"knowledgeBaseId":{"type":"string"}},"required":["knowledgeBaseId"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/update":{"post":{"operationId":"knowledge_base_update","summary":"Change the name, description, main language, address or visibility of a knowledge base.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":160},"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"isPublic":{"type":"boolean"},"subdomain":{"type":"string","maxLength":63}},"required":["companyId","knowledgeBaseId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"knowledgeBase":{"type":"object","properties":{"knowledgeBaseId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"isPublic":{"type":"boolean"},"subdomain":{"type":"string"},"subdomainHost":{"type":"string"},"address":{"type":"string"},"publicUrl":{"type":"string"},"customDomain":{"type":"object","properties":{"host":{"type":"string"},"status":{"type":"string","enum":["none","waiting-dns","checking","active","failed"]},"failure":{"type":"string","enum":["","cloudflare-refused","ssl-failed","hostname-blocked"]},"checkedAtMs":{"type":"number"},"cnameName":{"type":"string"},"cnameTarget":{"type":"string"},"ownershipName":{"type":"string"},"ownershipValue":{"type":"string"},"isOwnershipProven":{"type":"boolean"}},"required":["host","status","failure","checkedAtMs","cnameName","cnameTarget","ownershipName","ownershipValue","isOwnershipProven"],"additionalProperties":false},"isCustomDomainAvailable":{"type":"boolean"},"site":{"type":"object","properties":{"design":{"type":"object","properties":{"primaryColor":{"type":"string"},"colorScheme":{"type":"string","enum":["auto","light","dark"]},"font":{"type":"string","enum":["geist","system","manrope","ibm-plex-sans","source-serif"]},"logo":{"type":"object","properties":{"kbAssetId":{"type":"string"},"mimeType":{"anyOf":[{"type":"string","const":""},{"type":"string","enum":["image/png","image/svg+xml"]}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kbAssetId","mimeType","sizeBytes"],"additionalProperties":false},"favicon":{"type":"object","properties":{"kbAssetId":{"type":"string"},"mimeType":{"anyOf":[{"type":"string","const":""},{"type":"string","enum":["image/png","image/svg+xml"]}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kbAssetId","mimeType","sizeBytes"],"additionalProperties":false},"isNameShown":{"type":"boolean"},"isReferralLinkShown":{"type":"boolean"}},"required":["primaryColor","colorScheme","font","logo","favicon","isNameShown","isReferralLinkShown"],"additionalProperties":false},"menu":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"},"isNewTab":{"type":"boolean"}},"required":["label","url","isNewTab"],"additionalProperties":false}},"customCode":{"type":"object","properties":{"headHtml":{"type":"string"},"bodyEndHtml":{"type":"string"},"extraHosts":{"type":"array","items":{"type":"string"}},"allowedHosts":{"type":"array","items":{"type":"string"}}},"required":["headHtml","bodyEndHtml","extraHosts","allowedHosts"],"additionalProperties":false},"chat":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"projectId":{"type":"string"}},"required":["isEnabled","projectId"],"additionalProperties":false}},"required":["design","menu","customCode","chat"],"additionalProperties":false}},"required":["knowledgeBaseId","name","description","defaultLanguage","isPublic","subdomain","subdomainHost","address","publicUrl","customDomain","isCustomDomainAvailable","site"],"additionalProperties":false}},"required":["knowledgeBase"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/languages-update":{"post":{"operationId":"knowledge_base_languages_update","summary":"Set the extra languages of a knowledge base, which language each one shows when an article has no translation, and each language's web address, menu name and flag.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"languages":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"fallbackLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"path":{"type":"string","maxLength":40},"displayName":{"type":"string","maxLength":40},"flag":{"type":"string"}},"required":["language","fallbackLanguage"],"additionalProperties":false}},"main":{"type":"object","properties":{"displayName":{"type":"string","maxLength":40},"flag":{"type":"string"}},"additionalProperties":false}},"required":["companyId","knowledgeBaseId","languages"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"main":{"type":"object","properties":{"displayName":{"type":"string"},"nativeName":{"type":"string"},"flag":{"type":"string"}},"required":["displayName","nativeName","flag"],"additionalProperties":false},"articleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"languages":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"fallbackLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"path":{"type":"string","minLength":2,"maxLength":40,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"displayName":{"type":"string"},"nativeName":{"type":"string"},"flag":{"type":"string"},"publishedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"machineDraftCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"missingCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outdatedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"translateJob":{"type":"object","properties":{"status":{"type":"string","enum":["idle","queued","running","done","stopped"]},"stopReason":{"type":"string","enum":["","ai-limit","ai-unavailable","failed"]},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"doneCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finishedAtMs":{"type":"number"}},"required":["status","stopReason","totalCount","doneCount","failedCount","finishedAtMs"],"additionalProperties":false}},"required":["language","fallbackLanguage","path","displayName","nativeName","flag","publishedCount","draftCount","machineDraftCount","missingCount","outdatedCount","translateJob"],"additionalProperties":false}},"availableLanguages":{"type":"array","items":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]}},"isTranslateAvailable":{"type":"boolean"}},"required":["defaultLanguage","main","articleCount","languages","availableLanguages","isTranslateAvailable"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/main-language-set":{"post":{"operationId":"knowledge_base_main_language_set","summary":"Make an extra language the main language of a knowledge base. Every published article needs a published translation in it first. The old main language becomes an extra language at the given path, and old links redirect.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"path":{"type":"string","maxLength":40}},"required":["companyId","knowledgeBaseId","language","path"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"main":{"type":"object","properties":{"displayName":{"type":"string"},"nativeName":{"type":"string"},"flag":{"type":"string"}},"required":["displayName","nativeName","flag"],"additionalProperties":false},"articleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"languages":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"fallbackLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"path":{"type":"string","minLength":2,"maxLength":40,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"displayName":{"type":"string"},"nativeName":{"type":"string"},"flag":{"type":"string"},"publishedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"machineDraftCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"missingCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outdatedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"translateJob":{"type":"object","properties":{"status":{"type":"string","enum":["idle","queued","running","done","stopped"]},"stopReason":{"type":"string","enum":["","ai-limit","ai-unavailable","failed"]},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"doneCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finishedAtMs":{"type":"number"}},"required":["status","stopReason","totalCount","doneCount","failedCount","finishedAtMs"],"additionalProperties":false}},"required":["language","fallbackLanguage","path","displayName","nativeName","flag","publishedCount","draftCount","machineDraftCount","missingCount","outdatedCount","translateJob"],"additionalProperties":false}},"availableLanguages":{"type":"array","items":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]}},"isTranslateAvailable":{"type":"boolean"}},"required":["defaultLanguage","main","articleCount","languages","availableLanguages","isTranslateAvailable"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/menu-update":{"post":{"operationId":"knowledge_base_menu_update","summary":"Set the links in the menu of the knowledge base site.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"items":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":40},"url":{"type":"string","minLength":1,"maxLength":500},"isNewTab":{"type":"boolean"}},"required":["label","url","isNewTab"],"additionalProperties":false}}},"required":["companyId","knowledgeBaseId","items"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"knowledgeBase":{"type":"object","properties":{"knowledgeBaseId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"isPublic":{"type":"boolean"},"subdomain":{"type":"string"},"subdomainHost":{"type":"string"},"address":{"type":"string"},"publicUrl":{"type":"string"},"customDomain":{"type":"object","properties":{"host":{"type":"string"},"status":{"type":"string","enum":["none","waiting-dns","checking","active","failed"]},"failure":{"type":"string","enum":["","cloudflare-refused","ssl-failed","hostname-blocked"]},"checkedAtMs":{"type":"number"},"cnameName":{"type":"string"},"cnameTarget":{"type":"string"},"ownershipName":{"type":"string"},"ownershipValue":{"type":"string"},"isOwnershipProven":{"type":"boolean"}},"required":["host","status","failure","checkedAtMs","cnameName","cnameTarget","ownershipName","ownershipValue","isOwnershipProven"],"additionalProperties":false},"isCustomDomainAvailable":{"type":"boolean"},"site":{"type":"object","properties":{"design":{"type":"object","properties":{"primaryColor":{"type":"string"},"colorScheme":{"type":"string","enum":["auto","light","dark"]},"font":{"type":"string","enum":["geist","system","manrope","ibm-plex-sans","source-serif"]},"logo":{"type":"object","properties":{"kbAssetId":{"type":"string"},"mimeType":{"anyOf":[{"type":"string","const":""},{"type":"string","enum":["image/png","image/svg+xml"]}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kbAssetId","mimeType","sizeBytes"],"additionalProperties":false},"favicon":{"type":"object","properties":{"kbAssetId":{"type":"string"},"mimeType":{"anyOf":[{"type":"string","const":""},{"type":"string","enum":["image/png","image/svg+xml"]}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kbAssetId","mimeType","sizeBytes"],"additionalProperties":false},"isNameShown":{"type":"boolean"},"isReferralLinkShown":{"type":"boolean"}},"required":["primaryColor","colorScheme","font","logo","favicon","isNameShown","isReferralLinkShown"],"additionalProperties":false},"menu":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"},"isNewTab":{"type":"boolean"}},"required":["label","url","isNewTab"],"additionalProperties":false}},"customCode":{"type":"object","properties":{"headHtml":{"type":"string"},"bodyEndHtml":{"type":"string"},"extraHosts":{"type":"array","items":{"type":"string"}},"allowedHosts":{"type":"array","items":{"type":"string"}}},"required":["headHtml","bodyEndHtml","extraHosts","allowedHosts"],"additionalProperties":false},"chat":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"projectId":{"type":"string"}},"required":["isEnabled","projectId"],"additionalProperties":false}},"required":["design","menu","customCode","chat"],"additionalProperties":false}},"required":["knowledgeBaseId","name","description","defaultLanguage","isPublic","subdomain","subdomainHost","address","publicUrl","customDomain","isCustomDomainAvailable","site"],"additionalProperties":false}},"required":["knowledgeBase"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/chat-update":{"post":{"operationId":"knowledge_base_chat_update","summary":"Show or hide a chat widget on the knowledge base site.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"isEnabled":{"type":"boolean"},"projectId":{"type":"string","maxLength":80}},"required":["companyId","knowledgeBaseId","isEnabled","projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"knowledgeBase":{"type":"object","properties":{"knowledgeBaseId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"isPublic":{"type":"boolean"},"subdomain":{"type":"string"},"subdomainHost":{"type":"string"},"address":{"type":"string"},"publicUrl":{"type":"string"},"customDomain":{"type":"object","properties":{"host":{"type":"string"},"status":{"type":"string","enum":["none","waiting-dns","checking","active","failed"]},"failure":{"type":"string","enum":["","cloudflare-refused","ssl-failed","hostname-blocked"]},"checkedAtMs":{"type":"number"},"cnameName":{"type":"string"},"cnameTarget":{"type":"string"},"ownershipName":{"type":"string"},"ownershipValue":{"type":"string"},"isOwnershipProven":{"type":"boolean"}},"required":["host","status","failure","checkedAtMs","cnameName","cnameTarget","ownershipName","ownershipValue","isOwnershipProven"],"additionalProperties":false},"isCustomDomainAvailable":{"type":"boolean"},"site":{"type":"object","properties":{"design":{"type":"object","properties":{"primaryColor":{"type":"string"},"colorScheme":{"type":"string","enum":["auto","light","dark"]},"font":{"type":"string","enum":["geist","system","manrope","ibm-plex-sans","source-serif"]},"logo":{"type":"object","properties":{"kbAssetId":{"type":"string"},"mimeType":{"anyOf":[{"type":"string","const":""},{"type":"string","enum":["image/png","image/svg+xml"]}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kbAssetId","mimeType","sizeBytes"],"additionalProperties":false},"favicon":{"type":"object","properties":{"kbAssetId":{"type":"string"},"mimeType":{"anyOf":[{"type":"string","const":""},{"type":"string","enum":["image/png","image/svg+xml"]}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kbAssetId","mimeType","sizeBytes"],"additionalProperties":false},"isNameShown":{"type":"boolean"},"isReferralLinkShown":{"type":"boolean"}},"required":["primaryColor","colorScheme","font","logo","favicon","isNameShown","isReferralLinkShown"],"additionalProperties":false},"menu":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"},"isNewTab":{"type":"boolean"}},"required":["label","url","isNewTab"],"additionalProperties":false}},"customCode":{"type":"object","properties":{"headHtml":{"type":"string"},"bodyEndHtml":{"type":"string"},"extraHosts":{"type":"array","items":{"type":"string"}},"allowedHosts":{"type":"array","items":{"type":"string"}}},"required":["headHtml","bodyEndHtml","extraHosts","allowedHosts"],"additionalProperties":false},"chat":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"projectId":{"type":"string"}},"required":["isEnabled","projectId"],"additionalProperties":false}},"required":["design","menu","customCode","chat"],"additionalProperties":false}},"required":["knowledgeBaseId","name","description","defaultLanguage","isPublic","subdomain","subdomainHost","address","publicUrl","customDomain","isCustomDomainAvailable","site"],"additionalProperties":false}},"required":["knowledgeBase"],"additionalProperties":false}}}}}}}}},"/private/knowledge-base/design-update":{"post":{"operationId":"knowledge_base_design_update","summary":"Change the color, color scheme, font, logo and favicon of the knowledge base site.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"primaryColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"colorScheme":{"type":"string","enum":["auto","light","dark"]},"font":{"type":"string","enum":["geist","system","manrope","ibm-plex-sans","source-serif"]},"isNameShown":{"type":"boolean"},"isReferralLinkShown":{"type":"boolean"},"logoUpload":{"type":"object","properties":{"mimeType":{"type":"string","enum":["image/png","image/svg+xml"]},"dataBase64":{"type":"string","minLength":4,"maxLength":273068,"pattern":"^[A-Za-z0-9+/]+={0,2}$"}},"required":["mimeType","dataBase64"],"additionalProperties":false},"isLogoRemoved":{"type":"boolean"},"faviconUpload":{"type":"object","properties":{"mimeType":{"type":"string","enum":["image/png","image/svg+xml"]},"dataBase64":{"type":"string","minLength":4,"maxLength":273068,"pattern":"^[A-Za-z0-9+/]+={0,2}$"}},"required":["mimeType","dataBase64"],"additionalProperties":false},"isFaviconRemoved":{"type":"boolean"}},"required":["companyId","knowledgeBaseId","primaryColor","colorScheme","font","isNameShown","isReferralLinkShown"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"knowledgeBase":{"type":"object","properties":{"knowledgeBaseId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"isPublic":{"type":"boolean"},"subdomain":{"type":"string"},"subdomainHost":{"type":"string"},"address":{"type":"string"},"publicUrl":{"type":"string"},"customDomain":{"type":"object","properties":{"host":{"type":"string"},"status":{"type":"string","enum":["none","waiting-dns","checking","active","failed"]},"failure":{"type":"string","enum":["","cloudflare-refused","ssl-failed","hostname-blocked"]},"checkedAtMs":{"type":"number"},"cnameName":{"type":"string"},"cnameTarget":{"type":"string"},"ownershipName":{"type":"string"},"ownershipValue":{"type":"string"},"isOwnershipProven":{"type":"boolean"}},"required":["host","status","failure","checkedAtMs","cnameName","cnameTarget","ownershipName","ownershipValue","isOwnershipProven"],"additionalProperties":false},"isCustomDomainAvailable":{"type":"boolean"},"site":{"type":"object","properties":{"design":{"type":"object","properties":{"primaryColor":{"type":"string"},"colorScheme":{"type":"string","enum":["auto","light","dark"]},"font":{"type":"string","enum":["geist","system","manrope","ibm-plex-sans","source-serif"]},"logo":{"type":"object","properties":{"kbAssetId":{"type":"string"},"mimeType":{"anyOf":[{"type":"string","const":""},{"type":"string","enum":["image/png","image/svg+xml"]}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kbAssetId","mimeType","sizeBytes"],"additionalProperties":false},"favicon":{"type":"object","properties":{"kbAssetId":{"type":"string"},"mimeType":{"anyOf":[{"type":"string","const":""},{"type":"string","enum":["image/png","image/svg+xml"]}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kbAssetId","mimeType","sizeBytes"],"additionalProperties":false},"isNameShown":{"type":"boolean"},"isReferralLinkShown":{"type":"boolean"}},"required":["primaryColor","colorScheme","font","logo","favicon","isNameShown","isReferralLinkShown"],"additionalProperties":false},"menu":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"},"isNewTab":{"type":"boolean"}},"required":["label","url","isNewTab"],"additionalProperties":false}},"customCode":{"type":"object","properties":{"headHtml":{"type":"string"},"bodyEndHtml":{"type":"string"},"extraHosts":{"type":"array","items":{"type":"string"}},"allowedHosts":{"type":"array","items":{"type":"string"}}},"required":["headHtml","bodyEndHtml","extraHosts","allowedHosts"],"additionalProperties":false},"chat":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"projectId":{"type":"string"}},"required":["isEnabled","projectId"],"additionalProperties":false}},"required":["design","menu","customCode","chat"],"additionalProperties":false}},"required":["knowledgeBaseId","name","description","defaultLanguage","isPublic","subdomain","subdomainHost","address","publicUrl","customDomain","isCustomDomainAvailable","site"],"additionalProperties":false}},"required":["knowledgeBase"],"additionalProperties":false}}}}}}}}},"/private/kb-stats/get":{"post":{"operationId":"kb_stats_get","summary":"Read the knowledge base reading figures for a period: page and article views, visitors, searches, searches with no result, countries and devices.","x-hrc-area":"analytics","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"period":{"type":"string","enum":["today","7d","30d","60d"]},"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]}},"required":["companyId","period"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"period":{"type":"string","enum":["today","7d","30d","60d"]},"retentionDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"knowledgeBases":{"type":"array","items":{"type":"object","properties":{"knowledgeBaseId":{"type":"string"},"name":{"type":"string"}},"required":["knowledgeBaseId","name"],"additionalProperties":false}},"languages":{"type":"array","items":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]}},"kpis":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["visitors","pageViews","articleViews","searches","noResultShare","clickShare"]},"value":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"change":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"tone":{"type":"string","enum":["good","bad","neutral"]}},"required":["key","value","change","tone"],"additionalProperties":false}},"visitors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"topArticles":{"type":"array","items":{"type":"object","properties":{"kbArticleId":{"type":"string"},"knowledgeBaseId":{"type":"string"},"knowledgeBaseName":{"type":"string"},"title":{"type":"string"},"isDeleted":{"type":"boolean"},"views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"change":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"helped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"notHelped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kbArticleId","knowledgeBaseId","knowledgeBaseName","title","isDeleted","views","change","helped","notHelped"],"additionalProperties":false}},"missedSearches":{"type":"array","items":{"type":"object","properties":{"knowledgeBaseId":{"type":"string"},"knowledgeBaseName":{"type":"string"},"query":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["knowledgeBaseId","knowledgeBaseName","query","count"],"additionalProperties":false}},"countries":{"type":"array","items":{"type":"object","properties":{"countryCode":{"type":"string"},"visitors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["countryCode","visitors"],"additionalProperties":false}},"unknownCountryVisitors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"devices":{"type":"object","properties":{"desktop":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tablet":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"mobile":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"other":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["desktop","tablet","mobile","other"],"additionalProperties":false},"videos":{"type":"object","properties":{"plays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["plays","completions"],"additionalProperties":false},"votes":{"type":"object","properties":{"helped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"notHelped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"helpedShare":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"helpedShareChange":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["helped","notHelped","helpedShare","helpedShareChange"],"additionalProperties":false}},"required":["period","retentionDays","knowledgeBases","languages","kpis","visitors","topArticles","missedSearches","countries","unknownCountryVisitors","devices","videos","votes"],"additionalProperties":false}}}}}}}}},"/private/analytics/support-get":{"post":{"operationId":"analytics_support_get","summary":"Read the support figures for a period: first and next reply times and conversation volume, per chat widget and per team member.","x-hrc-area":"analytics","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"period":{"default":"30d","type":"string","enum":["today","7d","30d","90d","180d","custom"]},"fromDay":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"toDay":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"projectId":{"default":"","type":"string","maxLength":80},"channel":{"default":"all","type":"string","enum":["all","widget","email"]}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"range":{"type":"object","properties":{"period":{"type":"string","enum":["today","7d","30d","90d","180d","custom"]},"fromDay":{"type":"string"},"toDay":{"type":"string"},"todayDay":{"type":"string"},"retentionStartDay":{"type":"string"},"startAtMs":{"type":"number"},"endAtMs":{"type":"number"},"bucket":{"type":"string","enum":["hour","day","week"]},"timeZone":{"type":"string"},"hasPrevious":{"type":"boolean"}},"required":["period","fromDay","toDay","todayDay","retentionStartDay","startAtMs","endAtMs","bucket","timeZone","hasPrevious"],"additionalProperties":false},"kpis":{"type":"object","properties":{"firstResponse":{"type":"object","properties":{"medianSec":{"type":["number","null"]},"p90Sec":{"type":["number","null"]},"count":{"type":"number"},"previousMedianSec":{"type":["number","null"]},"changePercent":{"type":["number","null"]},"tone":{"type":"string","enum":["good","bad","neutral"]}},"required":["medianSec","p90Sec","count","previousMedianSec","changePercent","tone"],"additionalProperties":false},"nextResponse":{"type":"object","properties":{"medianSec":{"type":["number","null"]},"p90Sec":{"type":["number","null"]},"count":{"type":"number"},"previousMedianSec":{"type":["number","null"]},"changePercent":{"type":["number","null"]},"tone":{"type":"string","enum":["good","bad","neutral"]}},"required":["medianSec","p90Sec","count","previousMedianSec","changePercent","tone"],"additionalProperties":false},"newConversations":{"type":"object","properties":{"value":{"type":"number"},"previousValue":{"type":["number","null"]},"changePercent":{"type":["number","null"]}},"required":["value","previousValue","changePercent"],"additionalProperties":false},"contactMessages":{"type":"object","properties":{"value":{"type":"number"},"previousValue":{"type":["number","null"]},"changePercent":{"type":["number","null"]}},"required":["value","previousValue","changePercent"],"additionalProperties":false},"teamReplies":{"type":"object","properties":{"value":{"type":"number"},"previousValue":{"type":["number","null"]},"changePercent":{"type":["number","null"]}},"required":["value","previousValue","changePercent"],"additionalProperties":false},"closedConversations":{"type":"object","properties":{"value":{"type":"number"},"previousValue":{"type":["number","null"]},"changePercent":{"type":["number","null"]}},"required":["value","previousValue","changePercent"],"additionalProperties":false},"solved":{"type":"object","properties":{"percent":{"type":["number","null"]},"previousPercent":{"type":["number","null"]},"changePoints":{"type":["number","null"]},"tone":{"type":"string","enum":["good","bad","neutral"]}},"required":["percent","previousPercent","changePoints","tone"],"additionalProperties":false}},"required":["firstResponse","nextResponse","newConversations","contactMessages","teamReplies","closedConversations","solved"],"additionalProperties":false},"waitingNow":{"type":"object","properties":{"firstCount":{"type":"number"},"firstLongestSec":{"type":["number","null"]},"nextCount":{"type":"number"},"nextLongestSec":{"type":["number","null"]}},"required":["firstCount","firstLongestSec","nextCount","nextLongestSec"],"additionalProperties":false},"series":{"type":"array","items":{"type":"object","properties":{"startAtMs":{"type":"number"},"endAtMs":{"type":"number"},"newConversations":{"type":"number"},"contactMessages":{"type":"number"},"teamReplies":{"type":"number"},"closedConversations":{"type":"number"},"firstResponseMedianSec":{"type":["number","null"]},"nextResponseMedianSec":{"type":["number","null"]}},"required":["startAtMs","endAtMs","newConversations","contactMessages","teamReplies","closedConversations","firstResponseMedianSec","nextResponseMedianSec"],"additionalProperties":false}},"projects":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["blue","green","amber","red","violet","teal","pink","gray"]},"isDeleted":{"type":"boolean"},"newConversations":{"type":"number"},"firstResponseMedianSec":{"type":["number","null"]},"nextResponseMedianSec":{"type":["number","null"]},"solvedPercent":{"type":["number","null"]},"waitingNowCount":{"type":"number"}},"required":["projectId","name","color","isDeleted","newConversations","firstResponseMedianSec","nextResponseMedianSec","solvedPercent","waitingNowCount"],"additionalProperties":false}},"projectOptions":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["blue","green","amber","red","violet","teal","pink","gray"]}},"required":["projectId","name","color"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"isMe":{"type":"boolean"},"isFormerMember":{"type":"boolean"},"replies":{"type":"number"},"conversationsReplied":{"type":"number"},"firstResponseMedianSec":{"type":["number","null"]},"nextResponseMedianSec":{"type":["number","null"]},"closedConversations":{"type":"number"},"replySharePercent":{"type":"number"}},"required":["userId","name","email","isMe","isFormerMember","replies","conversationsReplied","firstResponseMedianSec","nextResponseMedianSec","closedConversations","replySharePercent"],"additionalProperties":false}},"isMemberTableLimited":{"type":"boolean"},"isComplete":{"type":"boolean"},"dataUpdatedAtMs":{"type":"number"}},"required":["range","kpis","waitingNow","series","projects","projectOptions","members","isMemberTableLimited","isComplete","dataUpdatedAtMs"],"additionalProperties":false}}}}}}}}},"/private/analytics/widget-get":{"post":{"operationId":"analytics_widget_get","summary":"Read the chat widget traffic for a period: loads, visitors, opens, conversations, pages, countries, devices and browsers.","x-hrc-area":"analytics","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"period":{"default":"30d","type":"string","enum":["today","7d","30d","60d"]},"projectId":{"default":"","type":"string","maxLength":80}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"range":{"type":"object","properties":{"period":{"type":"string","enum":["today","7d","30d","60d"]},"fromDay":{"type":"string"},"toDay":{"type":"string"},"todayDay":{"type":"string"},"retentionStartDay":{"type":"string"},"timeZone":{"type":"string"}},"required":["period","fromDay","toDay","todayDay","retentionStartDay","timeZone"],"additionalProperties":false},"totals":{"type":"object","properties":{"loads":{"type":"number"},"visitors":{"type":"number"},"opens":{"type":"number"},"conversations":{"type":"number"},"openPercent":{"type":["number","null"]},"conversationPercent":{"type":["number","null"]}},"required":["loads","visitors","opens","conversations","openPercent","conversationPercent"],"additionalProperties":false},"pagesByLoads":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"loads":{"type":"number"},"conversations":{"type":"number"}},"required":["path","loads","conversations"],"additionalProperties":false}},"pagesByConversations":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"loads":{"type":"number"},"conversations":{"type":"number"}},"required":["path","loads","conversations"],"additionalProperties":false}},"countries":{"type":"array","items":{"type":"object","properties":{"countryCode":{"type":"string"},"loads":{"type":"number"},"sharePercent":{"type":"number"}},"required":["countryCode","loads","sharePercent"],"additionalProperties":false}},"devices":{"type":"array","items":{"type":"object","properties":{"deviceType":{"type":"string","enum":["desktop","tablet","mobile",""]},"loads":{"type":"number"},"sharePercent":{"type":"number"}},"required":["deviceType","loads","sharePercent"],"additionalProperties":false}},"browsers":{"type":"array","items":{"type":"object","properties":{"browserName":{"type":"string"},"loads":{"type":"number"},"sharePercent":{"type":"number"}},"required":["browserName","loads","sharePercent"],"additionalProperties":false}},"projectOptions":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["blue","green","amber","red","violet","teal","pink","gray"]}},"required":["projectId","name","color"],"additionalProperties":false}},"isConversationCountComplete":{"type":"boolean"},"dataUpdatedAtMs":{"type":"number"}},"required":["range","totals","pagesByLoads","pagesByConversations","countries","devices","browsers","projectOptions","isConversationCountComplete","dataUpdatedAtMs"],"additionalProperties":false}}}}}}}}},"/private/kb-check/settings-get":{"post":{"operationId":"kb_check_settings_get","summary":"Read the rules and the AI model the AI check of a knowledge base uses.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","knowledgeBaseId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"criteria":{"type":"array","items":{"type":"object","properties":{"criterionId":{"type":"string"},"text":{"type":"string"}},"required":["criterionId","text"],"additionalProperties":false}},"modelId":{"type":"string"},"updatedAtMs":{"type":"number"}},"required":["criteria","modelId","updatedAtMs"],"additionalProperties":false}}}}}}}}},"/private/kb-check/estimate":{"post":{"operationId":"kb_check_estimate","summary":"Read how much of the month's AI capacity a check of a whole knowledge base takes.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","knowledgeBaseId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"articleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"monthPercent":{"type":["number","null"]},"leftPercent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isUsedUp":{"type":"boolean"}},"required":["articleCount","monthPercent","leftPercent","isUsedUp"],"additionalProperties":false}}}}}}}}},"/private/kb-check/status":{"post":{"operationId":"kb_check_status","summary":"Read the newest AI check of a knowledge base or of one article and what it found.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"kbArticleId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","knowledgeBaseId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"run":{"anyOf":[{"type":"object","properties":{"kbCheckRunId":{"type":"string"},"scope":{"type":"string","enum":["kb","article"]},"kbArticleId":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped"]},"stopReason":{"type":"string","enum":["","member","ai-limit","ai-unavailable","failed"]},"isStopRequested":{"type":"boolean"},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"doneCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"needsReviewCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"modelName":{"type":"string"},"createdAtMs":{"type":"number"},"finishedAtMs":{"type":"number"}},"required":["kbCheckRunId","scope","kbArticleId","status","stopReason","isStopRequested","totalCount","doneCount","needsReviewCount","failedCount","modelName","createdAtMs","finishedAtMs"],"additionalProperties":false},{"type":"null"}]},"results":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"kbArticleId":{"type":"string"},"title":{"type":"string"},"outcome":{"type":"string","enum":["checked","failed","empty"]},"needsReview":{"type":"boolean"},"isChangedSinceCheck":{"type":"boolean"},"checkedAtMs":{"type":"number"},"modelName":{"type":"string"},"rules":{"type":"array","items":{"type":"object","properties":{"criterionId":{"type":"string"},"criterionText":{"type":"string"},"isOk":{"type":"boolean"},"reason":{"type":"string"},"fix":{"type":"string"}},"required":["criterionId","criterionText","isOk","reason","fix"],"additionalProperties":false}},"fixedAtMs":{"type":"number"},"canUndoFix":{"type":"boolean"}},"required":["kbArticleId","title","outcome","needsReview","isChangedSinceCheck","checkedAtMs","modelName","rules","fixedAtMs","canUndoFix"],"additionalProperties":false}},"resultTotal":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"needsReviewTotal":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["run","results","resultTotal","needsReviewTotal"],"additionalProperties":false}}}}}}}}},"/private/kb-check/settings-save":{"post":{"operationId":"kb_check_settings_save","summary":"Save the rules and the AI model of the AI check of a knowledge base. Send baseUpdatedAtMs from kb_check_settings_get.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"criteria":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"criterionId":{"type":"string","maxLength":80},"text":{"type":"string","minLength":1,"maxLength":300}},"required":["text"],"additionalProperties":false}},"modelId":{"type":"string","maxLength":120},"baseUpdatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["companyId","knowledgeBaseId","criteria","modelId","baseUpdatedAtMs"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"criteria":{"type":"array","items":{"type":"object","properties":{"criterionId":{"type":"string"},"text":{"type":"string"}},"required":["criterionId","text"],"additionalProperties":false}},"modelId":{"type":"string"},"updatedAtMs":{"type":"number"}},"required":["criteria","modelId","updatedAtMs"],"additionalProperties":false}}}}}}}}},"/private/kb-check/start":{"post":{"operationId":"kb_check_start","summary":"Start HRC AI checking a whole knowledge base or one article against its rules. It uses the company's AI capacity; read the results with kb_check_status.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"kbArticleId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","knowledgeBaseId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"run":{"type":"object","properties":{"kbCheckRunId":{"type":"string"},"scope":{"type":"string","enum":["kb","article"]},"kbArticleId":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped"]},"stopReason":{"type":"string","enum":["","member","ai-limit","ai-unavailable","failed"]},"isStopRequested":{"type":"boolean"},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"doneCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"needsReviewCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"modelName":{"type":"string"},"createdAtMs":{"type":"number"},"finishedAtMs":{"type":"number"}},"required":["kbCheckRunId","scope","kbArticleId","status","stopReason","isStopRequested","totalCount","doneCount","needsReviewCount","failedCount","modelName","createdAtMs","finishedAtMs"],"additionalProperties":false}},"required":["run"],"additionalProperties":false}}}}}}}}},"/private/kb-check/stop":{"post":{"operationId":"kb_check_stop","summary":"Stop a running AI check of a knowledge base. What it found so far stays.","x-hrc-area":"kb","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"kbCheckRunId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","kbCheckRunId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"run":{"type":"object","properties":{"kbCheckRunId":{"type":"string"},"scope":{"type":"string","enum":["kb","article"]},"kbArticleId":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped"]},"stopReason":{"type":"string","enum":["","member","ai-limit","ai-unavailable","failed"]},"isStopRequested":{"type":"boolean"},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"doneCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"needsReviewCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"modelName":{"type":"string"},"createdAtMs":{"type":"number"},"finishedAtMs":{"type":"number"}},"required":["kbCheckRunId","scope","kbArticleId","status","stopReason","isStopRequested","totalCount","doneCount","needsReviewCount","failedCount","modelName","createdAtMs","finishedAtMs"],"additionalProperties":false}},"required":["run"],"additionalProperties":false}}}}}}}}},"/private/kb-build/guide":{"post":{"operationId":"kb_build_guide","summary":"Read the method and the ready prompt for building or extending a knowledge base: research the website, the existing articles and the customers' questions, plan sections and articles, write drafts, review and report. Call this first when you are asked to build or fill a knowledge base.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"client":{"default":"other","type":"string","enum":["chatgpt","claude","claude-code","codex","cursor","other"]},"language":{"type":"string","enum":["lt","en"]},"website":{"type":"string","maxLength":300,"pattern":"^(https?:\\/\\/)?[^\\s/]+\\.[^\\s]+$"}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"guideMarkdown":{"type":"string"},"formatMarkdown":{"type":"string"},"client":{"type":"string","enum":["chatgpt","claude","claude-code","codex","cursor","other"]},"knowledgeBase":{"anyOf":[{"type":"object","properties":{"knowledgeBaseId":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"defaultLanguage":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"articleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["knowledgeBaseId","name","address","defaultLanguage","articleCount"],"additionalProperties":false},{"type":"null"}]},"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"website":{"type":"string"},"siteDomains":{"type":"array","items":{"type":"string"}},"limits":{"type":"object","properties":{"articleLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"articleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"articleRoom":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sectionLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bodyMaxChars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"titleMax":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"seoDescriptionMax":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"articleSlugMax":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sectionSlugMax":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"callsPerMinute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["articleLimit","articleCount","articleRoom","sectionLimit","bodyMaxChars","titleMax","seoDescriptionMax","articleSlugMax","sectionSlugMax","callsPerMinute"],"additionalProperties":false}},"required":["guideMarkdown","formatMarkdown","client","knowledgeBase","language","website","siteDomains","limits"],"additionalProperties":false}}}}}}}}},"/private/kb-build/translate-guide":{"post":{"operationId":"kb_build_translate_guide","summary":"Read the method and the ready prompt for translating a knowledge base into its extra languages: which articles and section names are missing, the tools to use and the rules. Call this first when you are asked to translate a knowledge base.","x-hrc-area":"kb","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"knowledgeBaseId":{"type":"string","minLength":1,"maxLength":80},"client":{"default":"other","type":"string","enum":["chatgpt","claude","claude-code","codex","cursor","other"]},"languages":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]}},"kbArticleIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"isPublishAllowed":{"default":false,"type":"boolean"}},"required":["companyId","knowledgeBaseId","languages"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"guideMarkdown":{"type":"string"},"client":{"type":"string","enum":["chatgpt","claude","claude-code","codex","cursor","other"]},"knowledgeBase":{"type":"object","properties":{"knowledgeBaseId":{"type":"string"},"name":{"type":"string"},"sourceLanguage":{"type":"string"}},"required":["knowledgeBaseId","name","sourceLanguage"],"additionalProperties":false},"languages":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string","enum":["lt","en","lv","et","pl","de","ru","uk","be","fr","es","it","fi","sv","no","da","nl","cs","sk","pt","ro","hu","bg","el","hr","sl","tr","ka","zh-Hans","ga","mt","af","am","az","bn","bs","ca","cy","eo","eu","fo","fy","gd","gl","gu","ha","hi","hy","id","ig","is","ja","kk","km","kn","ko","ky","lb","lo","mg","mk","ml","mn","mr","ms","my","ne","pa","rw","si","so","sq","sr","sw","ta","te","tg","th","tk","tl","uz","vi","xh","yo","zh-Hant","zu","aa","ab","ae","ak","an","as","av","ay","ba","bi","bm","bo","br","ce","ch","co","cr","cu","cv","dz","ee","ff","fj","gn","gv","ho","ht","hz","ia","ie","ii","ik","io","iu","jv","kg","ki","kj","kl","kr","ku","kv","kw","la","lg","li","ln","lu","mh","mi","na","nb","nd","ng","nn","nr","nv","ny","oc","oj","om","or","os","pi","qu","rm","rn","sa","sc","se","sg","sm","sn","ss","st","su","ti","tn","to","ts","tt","tw","ty","ve","vo","wa","wo","za","en-GB","en-US","pt-BR","pt-PT","es-MX","es-419","fr-CA","de-CH","nl-BE"]},"missingCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["language","missingCount"],"additionalProperties":false}},"articles":{"type":"array","items":{"type":"object","properties":{"kbArticleId":{"type":"string"},"title":{"type":"string"}},"required":["kbArticleId","title"],"additionalProperties":false}},"isPublishAllowed":{"type":"boolean"}},"required":["guideMarkdown","client","knowledgeBase","languages","articles","isPublishAllowed"],"additionalProperties":false}}}}}}}}},"/private/file/summary":{"post":{"operationId":"file_summary","summary":"Show the company's file storage use, sums per source and the largest file allowed.","x-hrc-area":"files","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"usedBytes":{"type":"number"},"pendingBytes":{"type":"number"},"quotaBytes":{"type":"number"},"freeBytes":{"type":"number"},"maxFileBytes":{"type":"number"},"platformMaxFileBytes":{"type":"number"},"bySource":{"type":"object","properties":{"conversation":{"type":"object","properties":{"bytes":{"type":"number"},"count":{"type":"number"}},"required":["bytes","count"],"additionalProperties":false},"kb":{"type":"object","properties":{"bytes":{"type":"number"},"count":{"type":"number"}},"required":["bytes","count"],"additionalProperties":false},"task":{"type":"object","properties":{"bytes":{"type":"number"},"count":{"type":"number"}},"required":["bytes","count"],"additionalProperties":false},"folder":{"type":"object","properties":{"bytes":{"type":"number"},"count":{"type":"number"}},"required":["bytes","count"],"additionalProperties":false}},"required":["conversation","kb","task","folder"],"additionalProperties":false},"trash":{"type":"object","properties":{"bytes":{"type":"number"},"count":{"type":"number"}},"required":["bytes","count"],"additionalProperties":false},"deleting":{"type":"object","properties":{"bytes":{"type":"number"},"count":{"type":"number"}},"required":["bytes","count"],"additionalProperties":false},"rawEmailBytes":{"type":"number"},"messages":{"type":"object","properties":{"bytes":{"type":"number"},"count":{"type":"number"}},"required":["bytes","count"],"additionalProperties":false},"recountedAtMs":{"type":"number"},"isIndexBuilding":{"type":"boolean"},"publicLinksBy":{"type":"string","enum":["members","owners","off"]},"canCreatePublicLinks":{"type":"boolean"},"canDeleteSourceFiles":{"type":"boolean"},"canEmptyTrash":{"type":"boolean"}},"required":["usedBytes","pendingBytes","quotaBytes","freeBytes","maxFileBytes","platformMaxFileBytes","bySource","trash","deleting","rawEmailBytes","messages","recountedAtMs","isIndexBuilding","publicLinksBy","canCreatePublicLinks","canDeleteSourceFiles","canEmptyTrash"],"additionalProperties":false}}}}}}}}},"/private/file/list":{"post":{"operationId":"file_list","summary":"List company files across conversations, knowledge bases, tasks and folders with filters (source, type, date, size, uploader, name) and a sort.","x-hrc-area":"files","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"view":{"type":"string","enum":["all","folder","trash"]},"folderId":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"string","const":""}]},"sources":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["conversation","kb","task","folder"]}},"kinds":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["image","video","audio","document","other"]}},"createdFromMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdToMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"sizeMinBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"sizeMaxBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"uploader":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"member"},"userId":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","userId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"customers"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"ai-agents"}},"required":["kind"],"additionalProperties":false}]},"searchQuery":{"type":"string","minLength":1,"maxLength":120},"sort":{"type":"string","enum":["newest","oldest","name-asc","name-desc","largest","smallest"]},"cursor":{"type":"string","maxLength":1000},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["companyId","view"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"fileEntryId":{"type":"string"},"companyId":{"type":"string"},"source":{"type":"string","enum":["conversation","kb","task","folder"]},"sourceId":{"type":"string"},"fileId":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","document","other"]},"previewKind":{"type":"string","enum":["image","video","audio","pdf","text","none"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"storageBytes":{"type":"number"},"status":{"type":"string","enum":["copying","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"copyProgress":{"anyOf":[{"type":"object","properties":{"copiedBytes":{"type":"number"},"totalBytes":{"type":"number"}},"required":["copiedBytes","totalBytes"],"additionalProperties":false},{"type":"null"}]},"widthPx":{"type":"number"},"heightPx":{"type":"number"},"durationMs":{"type":"number"},"hasThumbnail":{"type":"boolean"},"captureKind":{"type":"string","enum":["","screenshot","recording","email"]},"createdAtMs":{"type":"number"},"uploader":{"type":"object","properties":{"kind":{"type":"string","enum":["member","contact","email","ai-agent","public-link","unknown"]},"userId":{"type":"string"},"contactId":{"type":"string"},"aiAgentId":{"type":"string"},"fileShareId":{"type":"string"},"name":{"type":"string"}},"required":["kind","userId","contactId","aiAgentId","fileShareId","name"],"additionalProperties":false},"place":{"type":"object","properties":{"kind":{"type":"string","enum":["conversation","kb","task","folder","root"]},"label":{"type":"string"},"appPath":{"type":"string"},"conversationId":{"type":"string"},"knowledgeBaseId":{"type":"string"},"taskId":{"type":"string"},"folderId":{"type":"string"}},"required":["kind","label","appPath","conversationId","knowledgeBaseId","taskId","folderId"],"additionalProperties":false},"urls":{"type":"object","properties":{"view":{"type":"string"},"download":{"type":"string"},"thumbnail":{"type":"string"}},"required":["view","download","thumbnail"],"additionalProperties":false},"isTrashed":{"type":"boolean"},"trashedAtMs":{"type":"number"},"purgeAtMs":{"type":"number"},"hasPublicLink":{"type":"boolean"},"isRestricted":{"type":"boolean"},"canRename":{"type":"boolean"},"canMove":{"type":"boolean"},"canCopy":{"type":"boolean"},"canTrash":{"type":"boolean"},"canDelete":{"type":"boolean"},"canShare":{"type":"boolean"}},"required":["fileEntryId","companyId","source","sourceId","fileId","name","extension","kind","previewKind","mimeType","sizeBytes","storageBytes","status","rejectReason","copyProgress","widthPx","heightPx","durationMs","hasThumbnail","captureKind","createdAtMs","uploader","place","urls","isTrashed","trashedAtMs","purgeAtMs","hasPublicLink","isRestricted","canRename","canMove","canCopy","canTrash","canDelete","canShare"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}}}}}}},"/private/file/get":{"post":{"operationId":"file_get","summary":"Read one file with its folder path and where it is used.","x-hrc-area":"files","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"fileEntryId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","fileEntryId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"item":{"type":"object","properties":{"fileEntryId":{"type":"string"},"companyId":{"type":"string"},"source":{"type":"string","enum":["conversation","kb","task","folder"]},"sourceId":{"type":"string"},"fileId":{"type":"string"},"name":{"type":"string"},"extension":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","document","other"]},"previewKind":{"type":"string","enum":["image","video","audio","pdf","text","none"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"storageBytes":{"type":"number"},"status":{"type":"string","enum":["copying","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"copyProgress":{"anyOf":[{"type":"object","properties":{"copiedBytes":{"type":"number"},"totalBytes":{"type":"number"}},"required":["copiedBytes","totalBytes"],"additionalProperties":false},{"type":"null"}]},"widthPx":{"type":"number"},"heightPx":{"type":"number"},"durationMs":{"type":"number"},"hasThumbnail":{"type":"boolean"},"captureKind":{"type":"string","enum":["","screenshot","recording","email"]},"createdAtMs":{"type":"number"},"uploader":{"type":"object","properties":{"kind":{"type":"string","enum":["member","contact","email","ai-agent","public-link","unknown"]},"userId":{"type":"string"},"contactId":{"type":"string"},"aiAgentId":{"type":"string"},"fileShareId":{"type":"string"},"name":{"type":"string"}},"required":["kind","userId","contactId","aiAgentId","fileShareId","name"],"additionalProperties":false},"place":{"type":"object","properties":{"kind":{"type":"string","enum":["conversation","kb","task","folder","root"]},"label":{"type":"string"},"appPath":{"type":"string"},"conversationId":{"type":"string"},"knowledgeBaseId":{"type":"string"},"taskId":{"type":"string"},"folderId":{"type":"string"}},"required":["kind","label","appPath","conversationId","knowledgeBaseId","taskId","folderId"],"additionalProperties":false},"urls":{"type":"object","properties":{"view":{"type":"string"},"download":{"type":"string"},"thumbnail":{"type":"string"}},"required":["view","download","thumbnail"],"additionalProperties":false},"isTrashed":{"type":"boolean"},"trashedAtMs":{"type":"number"},"purgeAtMs":{"type":"number"},"hasPublicLink":{"type":"boolean"},"isRestricted":{"type":"boolean"},"canRename":{"type":"boolean"},"canMove":{"type":"boolean"},"canCopy":{"type":"boolean"},"canTrash":{"type":"boolean"},"canDelete":{"type":"boolean"},"canShare":{"type":"boolean"}},"required":["fileEntryId","companyId","source","sourceId","fileId","name","extension","kind","previewKind","mimeType","sizeBytes","storageBytes","status","rejectReason","copyProgress","widthPx","heightPx","durationMs","hasThumbnail","captureKind","createdAtMs","uploader","place","urls","isTrashed","trashedAtMs","purgeAtMs","hasPublicLink","isRestricted","canRename","canMove","canCopy","canTrash","canDelete","canShare"],"additionalProperties":false},"folderPath":{"type":"array","items":{"type":"object","properties":{"folderId":{"type":"string"},"name":{"type":"string"}},"required":["folderId","name"],"additionalProperties":false}},"usages":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["message","task","task-comment","kb-article","public-link"]},"label":{"type":"string"},"appPath":{"type":"string"}},"required":["kind","label","appPath"],"additionalProperties":false}},"liveLinkCount":{"type":"number"}},"required":["item","folderPath","usages","liveLinkCount"],"additionalProperties":false}}}}}}}}},"/private/file/usage":{"post":{"operationId":"file_usage","summary":"Show where files are used and what deleting them would do.","x-hrc-area":"files","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"fileEntryIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"folderIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"required":["companyId","fileEntryIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"fileEntryId":{"type":"string"},"folderId":{"type":"string"},"name":{"type":"string"},"source":{"type":"string","enum":["conversation","kb","task","folder"]},"deleteMode":{"type":"string","enum":["trash-or-forever","forever","refuse"]},"refuseCode":{"type":"string","enum":["","FILE_IN_USE","OWNER_ROLE_REQUIRED"]},"sizeBytes":{"type":"number"},"usages":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["message","task","task-comment","kb-article","public-link"]},"label":{"type":"string"},"appPath":{"type":"string"}},"required":["kind","label","appPath"],"additionalProperties":false}},"folderContents":{"anyOf":[{"type":"object","properties":{"fileCount":{"type":"number"},"folderCount":{"type":"number"},"sizeBytes":{"type":"number"}},"required":["fileCount","folderCount","sizeBytes"],"additionalProperties":false},{"type":"null"}]}},"required":["fileEntryId","folderId","name","source","deleteMode","refuseCode","sizeBytes","usages","folderContents"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}}}}}}},"/private/file-folder/list":{"post":{"operationId":"file_folder_list","summary":"List the folders inside a folder, or find folders by name.","x-hrc-area":"files","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"parentFolderId":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"string","const":""}]},"view":{"type":"string","enum":["folder","trash"]},"searchQuery":{"type":"string","minLength":1,"maxLength":120},"sort":{"type":"string","enum":["name-asc","name-desc","newest","oldest"]},"cursor":{"type":"string","maxLength":1000},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"folderId":{"type":"string"},"companyId":{"type":"string"},"parentFolderId":{"type":"string"},"name":{"type":"string"},"access":{"type":"string","enum":["company","members"]},"isRestricted":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdByFileShareId":{"type":"string"},"createdByName":{"type":"string"},"createdAtMs":{"type":"number"},"updatedAtMs":{"type":"number"},"isTrashed":{"type":"boolean"},"trashedAtMs":{"type":"number"},"purgeAtMs":{"type":"number"},"hasPublicLink":{"type":"boolean"},"pathLabel":{"type":"string"},"canRename":{"type":"boolean"},"canMove":{"type":"boolean"},"canTrash":{"type":"boolean"},"canDelete":{"type":"boolean"},"canShare":{"type":"boolean"},"canManageAccess":{"type":"boolean"}},"required":["folderId","companyId","parentFolderId","name","access","isRestricted","createdByUserId","createdByFileShareId","createdByName","createdAtMs","updatedAtMs","isTrashed","trashedAtMs","purgeAtMs","hasPublicLink","pathLabel","canRename","canMove","canTrash","canDelete","canShare","canManageAccess"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}}}}}}},"/private/file-folder/get":{"post":{"operationId":"file_folder_get","summary":"Read one folder with its path, size and who can see it.","x-hrc-area":"files","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"folderId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","folderId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"folder":{"type":"object","properties":{"folderId":{"type":"string"},"companyId":{"type":"string"},"parentFolderId":{"type":"string"},"name":{"type":"string"},"access":{"type":"string","enum":["company","members"]},"isRestricted":{"type":"boolean"},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"}},"required":["userId","name"],"additionalProperties":false}},"createdByUserId":{"type":"string"},"createdByFileShareId":{"type":"string"},"createdByName":{"type":"string"},"createdAtMs":{"type":"number"},"isTrashed":{"type":"boolean"},"hasPublicLink":{"type":"boolean"},"canRename":{"type":"boolean"},"canMove":{"type":"boolean"},"canTrash":{"type":"boolean"},"canDelete":{"type":"boolean"},"canShare":{"type":"boolean"},"canManageAccess":{"type":"boolean"}},"required":["folderId","companyId","parentFolderId","name","access","isRestricted","members","createdByUserId","createdByFileShareId","createdByName","createdAtMs","isTrashed","hasPublicLink","canRename","canMove","canTrash","canDelete","canShare","canManageAccess"],"additionalProperties":false},"path":{"type":"array","items":{"type":"object","properties":{"folderId":{"type":"string"},"name":{"type":"string"}},"required":["folderId","name"],"additionalProperties":false}},"contents":{"type":"object","properties":{"fileCount":{"type":"number"},"folderCount":{"type":"number"},"sizeBytes":{"type":"number"},"isApproximate":{"type":"boolean"}},"required":["fileCount","folderCount","sizeBytes","isApproximate"],"additionalProperties":false}},"required":["folder","path","contents"],"additionalProperties":false}}}}}}}}},"/private/file-share/list":{"post":{"operationId":"file_share_list","summary":"List the public links of a file, a folder or the whole company.","x-hrc-area":"files","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"file"},"fileId":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","fileId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"folder"},"folderId":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","folderId"],"additionalProperties":false}]},"cursor":{"type":"string","maxLength":200},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"fileShareId":{"type":"string"},"companyId":{"type":"string"},"targetKind":{"type":"string","enum":["file","folder"]},"targetId":{"type":"string"},"targetName":{"type":"string"},"targetFileEntryId":{"type":"string"},"url":{"type":"string"},"permission":{"type":"string","enum":["view","download"]},"permissions":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["view","download","upload","create-folders"]}},"expiresAtMs":{"type":"number"},"isExpired":{"type":"boolean"},"hasPassword":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdByName":{"type":"string"},"createdAtMs":{"type":"number"},"openCount":{"type":"number"},"lastOpenedAtMs":{"type":"number"},"canChange":{"type":"boolean"}},"required":["fileShareId","companyId","targetKind","targetId","targetName","targetFileEntryId","url","permission","permissions","expiresAtMs","isExpired","hasPassword","createdByUserId","createdByName","createdAtMs","openCount","lastOpenedAtMs","canChange"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}}}}}}},"/private/file-folder/create":{"post":{"operationId":"file_folder_create","summary":"Create a folder.","x-hrc-area":"files","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentFolderId":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"string","const":""}]},"name":{"type":"string","minLength":1,"maxLength":120}},"required":["companyId","requestId","parentFolderId","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"folderId":{"type":"string"},"companyId":{"type":"string"},"name":{"type":"string"}},"required":["folderId","companyId","name"],"additionalProperties":false}}}}}}}}},"/private/file-folder/rename":{"post":{"operationId":"file_folder_rename","summary":"Rename a folder.","x-hrc-area":"files","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"folderId":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":120}},"required":["companyId","folderId","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"folderId":{"type":"string"},"companyId":{"type":"string"},"name":{"type":"string"}},"required":["folderId","companyId","name"],"additionalProperties":false}}}}}}}}},"/private/file/rename":{"post":{"operationId":"file_rename","summary":"Rename a file in a folder.","x-hrc-area":"files","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"fileId":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":180}},"required":["companyId","fileId","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"fileId":{"type":"string"},"companyId":{"type":"string"},"name":{"type":"string"}},"required":["fileId","companyId","name"],"additionalProperties":false}}}}}}}}},"/private/file/move":{"post":{"operationId":"file_move","summary":"Move files and folders into another folder.","x-hrc-area":"files","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"fileIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"folderIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"targetFolderId":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"string","const":""}]},"isAccessChangeConfirmed":{"type":"boolean"}},"required":["companyId","requestId","fileIds","folderIds","targetFolderId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"succeeded":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"}},"required":["id","code"],"additionalProperties":false}}},"required":["succeeded","failed"],"additionalProperties":false}}}}}}}}},"/private/file/copy":{"post":{"operationId":"file_copy","summary":"Copy files from any source, or folders, into a folder. The copies use storage.","x-hrc-area":"files","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"fileEntryIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"folderIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"targetFolderId":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"string","const":""}]},"isAccessChangeConfirmed":{"type":"boolean"}},"required":["companyId","requestId","fileEntryIds","folderIds","targetFolderId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"succeeded":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"newId":{"type":"string"},"kind":{"type":"string","enum":["file","folder"]},"name":{"type":"string"}},"required":["sourceId","newId","kind","name"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"code":{"type":"string"},"freeBytes":{"type":"number"}},"required":["sourceId","code","freeBytes"],"additionalProperties":false}}},"required":["succeeded","failed"],"additionalProperties":false}}}}}}}}},"/private/file/trash":{"post":{"operationId":"file_trash","summary":"Move files and folders to the trash, where they stay 30 days.","x-hrc-area":"files","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"fileIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"folderIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"required":["companyId","requestId","fileIds","folderIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"succeeded":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"}},"required":["id","code"],"additionalProperties":false}}},"required":["succeeded","failed"],"additionalProperties":false}}}}}}}}},"/private/file/restore":{"post":{"operationId":"file_restore","summary":"Restore files and folders from the trash.","x-hrc-area":"files","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"fileIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"folderIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"isAccessChangeConfirmed":{"type":"boolean"}},"required":["companyId","requestId","fileIds","folderIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"succeeded":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isRestoredToRoot":{"type":"boolean"}},"required":["id","name","isRestoredToRoot"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"}},"required":["id","code"],"additionalProperties":false}}},"required":["succeeded","failed"],"additionalProperties":false}}}}}}}}},"/private/conversation/questions":{"post":{"operationId":"conversation_questions","summary":"List the customers' real questions, newest first, for the last 90 days by default: per conversation the first customer message and, on request, the team's first reply. Spam and notes are left out; e-mail addresses and long numbers are hidden.","x-hrc-area":"conversations","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"sinceMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"projectIds":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":80}},"types":{"maxItems":3,"type":"array","items":{"type":"string","enum":["bug","feature","question"]}},"channels":{"maxItems":2,"type":"array","items":{"type":"string","enum":["widget","email"]}},"includeAgentReply":{"default":false,"type":"boolean"},"cursor":{"type":"string","maxLength":1024},"limit":{"default":100,"type":"integer","minimum":1,"maximum":200}},"required":["companyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string"},"ref":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"projectId":{"type":"string"},"channel":{"type":"string","enum":["widget","email"]},"type":{"type":"string","enum":["bug","feature","question",""]},"status":{"type":"string","enum":["new","open","pending","closed"]},"createdAtMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"subject":{"type":"string"},"question":{"type":"string"},"agentReply":{"type":"string"}},"required":["conversationId","ref","projectId","channel","type","status","createdAtMs","subject","question","agentReply"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}}}}}}},"/private/changelog-settings/get":{"post":{"operationId":"changelog_settings_get","summary":"Read where the published news of one chat widget (projectId from whoami chatWidgets) show: isWidgetShown is the News tab in the chat widget, isPageShown a separate page at the address of the knowledge base knowledgeBaseId (https://<knowledge base address>/changelog with RSS), isKbLinkShown a News link in that knowledge base's menu. Call it before you publish so you can tell the person where visitors will see the entry.","x-hrc-area":"news","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"settings":{"type":"object","properties":{"isWidgetShown":{"type":"boolean"},"isPageShown":{"type":"boolean"},"isKbLinkShown":{"type":"boolean"},"knowledgeBaseId":{"type":"string","maxLength":80}},"required":["isWidgetShown","isPageShown","isKbLinkShown","knowledgeBaseId"],"additionalProperties":false}},"required":["settings"],"additionalProperties":false}}}}}}}}},"/private/changelog-entry/list":{"post":{"operationId":"changelog_entry_list","summary":"List the news entries of one chat widget (projectId), newest created first, 50 a page: changelogEntryId, the title in locale (lt or en), kind (new, improved or fixed), status (draft or published), publishedAtMs and the number of linked tasks.","x-hrc-area":"news","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string","minLength":1,"maxLength":80},"locale":{"type":"string","enum":["lt","en"]},"cursor":{"type":"string","maxLength":400},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"required":["companyId","projectId","locale"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"changelogEntryId":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["new","improved","fixed"]},"status":{"type":"string","enum":["draft","published"]},"publishedAtMs":{"type":"number"},"updatedAtMs":{"type":"number"},"taskCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["changelogEntryId","title","kind","status","publishedAtMs","updatedAtMs","taskCount"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}}}}}}},"/private/changelog-entry/get":{"post":{"operationId":"changelog_entry_get","summary":"Read one news entry of a chat widget with its Lithuanian and English texts (title and Markdown bodyMd, either may be null), kind, status, first publish time, linked tasks and updatedAtMs, the version to send back as baseUpdatedAtMs to changelog_entry_update.","x-hrc-area":"news","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string","minLength":1,"maxLength":80},"changelogEntryId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","projectId","changelogEntryId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"entry":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string"},"changelogEntryId":{"type":"string"},"texts":{"type":"object","properties":{"lt":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"bodyMd":{"type":"string"}},"required":["title","bodyMd"],"additionalProperties":false},{"type":"null"}]},"en":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"bodyMd":{"type":"string"}},"required":["title","bodyMd"],"additionalProperties":false},{"type":"null"}]}},"required":["lt","en"],"additionalProperties":false},"kind":{"type":"string","enum":["new","improved","fixed"]},"status":{"type":"string","enum":["draft","published"]},"publishedAtMs":{"type":"number"},"createdAtMs":{"type":"number"},"updatedAtMs":{"type":"number"},"tasks":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"}},"required":["taskId","number","title"],"additionalProperties":false}}},"required":["companyId","projectId","changelogEntryId","texts","kind","status","publishedAtMs","createdAtMs","updatedAtMs","tasks"],"additionalProperties":false}},"required":["entry"],"additionalProperties":false}}}}}}}}},"/private/changelog-entry/create":{"post":{"operationId":"changelog_entry_create","summary":"Write a news entry for one chat widget (projectId) to tell its visitors what was fixed, improved or is new. Send a new UUID v4 as requestId (a repeat with the same requestId returns the first entry). texts is { lt, en }: each null or { title: 1 to 120 characters, bodyMd: up to 10000 characters }, at least one language set; visitors read their language, else the other one. bodyMd is short plain Markdown for customers (paragraphs, lists, bold, links); a picture by its https link, or a YouTube or Vimeo link, on a line of its own; no task numbers, member names or customer data. kind is new, improved or fixed. status draft keeps it hidden; published shows it to visitors at once. taskIds links up to 10 done tasks it announces (their taskId from task_get). Create it as a draft, show it to the person, then publish it with changelog_entry_set_status.","x-hrc-area":"news","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string","minLength":1,"maxLength":80},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"texts":{"type":"object","properties":{"lt":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"bodyMd":{"type":"string","maxLength":10000}},"required":["title","bodyMd"],"additionalProperties":false},{"type":"null"}]},"en":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"bodyMd":{"type":"string","maxLength":10000}},"required":["title","bodyMd"],"additionalProperties":false},{"type":"null"}]}},"required":["lt","en"],"additionalProperties":false},"kind":{"type":"string","enum":["new","improved","fixed"]},"status":{"type":"string","enum":["draft","published"]},"taskIds":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"required":["companyId","projectId","requestId","texts","kind","status"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string"},"changelogEntryId":{"type":"string"}},"required":["companyId","projectId","changelogEntryId"],"additionalProperties":false}}}}}}}}},"/private/changelog-entry/update":{"post":{"operationId":"changelog_entry_update","summary":"Replace the texts, kind, status and linked tasks of a news entry. Every field is replaced: read it with changelog_entry_get first and send texts, kind, status and taskIds back, or the linked tasks you leave out are unlinked. Send the updatedAtMs you read as baseUpdatedAtMs; CHANGELOG_ENTRY_CHANGED (409) means someone changed it since: read it again and reapply your change. Same limits as changelog_entry_create (title 120, bodyMd 10000 characters, 10 tasks). To only publish or hide it, use changelog_entry_set_status.","x-hrc-area":"news","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string","minLength":1,"maxLength":80},"changelogEntryId":{"type":"string","minLength":1,"maxLength":80},"texts":{"type":"object","properties":{"lt":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"bodyMd":{"type":"string","maxLength":10000}},"required":["title","bodyMd"],"additionalProperties":false},{"type":"null"}]},"en":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"bodyMd":{"type":"string","maxLength":10000}},"required":["title","bodyMd"],"additionalProperties":false},{"type":"null"}]}},"required":["lt","en"],"additionalProperties":false},"kind":{"type":"string","enum":["new","improved","fixed"]},"status":{"type":"string","enum":["draft","published"]},"taskIds":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"baseUpdatedAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["companyId","projectId","changelogEntryId","texts","kind","status","baseUpdatedAtMs"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string"},"changelogEntryId":{"type":"string"},"updatedAtMs":{"type":"number"}},"required":["companyId","projectId","changelogEntryId","updatedAtMs"],"additionalProperties":false}}}}}}}}},"/private/changelog-entry/set-status":{"post":{"operationId":"changelog_entry_set_status","summary":"Publish a news entry (status published: visitors see it at once wherever changelog_settings_get says; the first publish date stays) or hide it again (status draft). The texts and linked tasks stay as they are.","x-hrc-area":"news","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string","minLength":1,"maxLength":80},"changelogEntryId":{"type":"string","minLength":1,"maxLength":80},"status":{"type":"string","enum":["draft","published"]}},"required":["companyId","projectId","changelogEntryId","status"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string"},"changelogEntryId":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"publishedAtMs":{"type":"number"}},"required":["companyId","projectId","changelogEntryId","status","publishedAtMs"],"additionalProperties":false}}}}}}}}},"/private/changelog-entry/delete":{"post":{"operationId":"changelog_entry_delete","summary":"Delete a news entry for good. Visitors no longer see it; its linked tasks stay. To only hide it, use changelog_entry_set_status with status draft. (destructive)","x-hrc-area":"news","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string","minLength":1,"maxLength":80},"changelogEntryId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","projectId","changelogEntryId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string"},"changelogEntryId":{"type":"string"}},"required":["companyId","projectId","changelogEntryId"],"additionalProperties":false}}}}}}}}},"/private/changelog-settings/update":{"post":{"operationId":"changelog_settings_update","summary":"Set where the published news of a chat widget show. Send all four fields, the ones you keep as changelog_settings_get answered them: isWidgetShown (the News tab in the chat widget), isPageShown (a separate page; needs knowledgeBaseId of a live knowledge base of the company: the one changelog_settings_get answered, or one from knowledge_base_list with the Knowledge bases permission), isKbLinkShown (a News link in that knowledge base's menu; needs isPageShown) and knowledgeBaseId (\"\" for none). Errors: CHANGELOG_KB_TAKEN (409) when that knowledge base already shows another chat widget's news, CHANGELOG_SLUG_TAKEN (409) when it has a section at the address changelog (rename that section first), NOT_FOUND when the knowledge base is gone.","x-hrc-area":"news","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"projectId":{"type":"string","minLength":1,"maxLength":80},"isWidgetShown":{"type":"boolean"},"isPageShown":{"type":"boolean"},"isKbLinkShown":{"type":"boolean"},"knowledgeBaseId":{"type":"string","maxLength":80}},"required":["companyId","projectId","isWidgetShown","isPageShown","isKbLinkShown","knowledgeBaseId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"settings":{"type":"object","properties":{"isWidgetShown":{"type":"boolean"},"isPageShown":{"type":"boolean"},"isKbLinkShown":{"type":"boolean"},"knowledgeBaseId":{"type":"string","maxLength":80}},"required":["isWidgetShown","isPageShown","isKbLinkShown","knowledgeBaseId"],"additionalProperties":false}},"required":["settings"],"additionalProperties":false}}}}}}}}},"/private/task-file/list":{"post":{"operationId":"task_file_list","summary":"List the uploaded files of a task (taskId from task_get or task_list), on the task and on its comments: name, type, size, state (processing while it is checked, ready, rejected), who added it (an AI agent shows as agent name (member name)) and when, and for each ready file a downloadUrl that works for 5 minutes (call again for a new one). A file just added is processing for a few seconds and its downloadUrl is empty until status is ready: call again then.","x-hrc-area":"tasks","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","taskId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"task":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":0,"maximum":9007199254740991},"title":{"type":"string"}},"required":["taskId","number","title"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"taskFileId":{"type":"string"},"fileName":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"taskCommentId":{"type":"string"},"createdByUserId":{"type":"string"},"createdByAiAgentId":{"type":"string"},"createdByName":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"downloadUrl":{"type":"string"},"downloadUrlExpiresAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","fileName","kind","mimeType","sizeBytes","status","rejectReason","taskCommentId","createdByUserId","createdByAiAgentId","createdByName","createdAtMs","downloadUrl","downloadUrlExpiresAtMs"],"additionalProperties":false}}},"required":["task","files"],"additionalProperties":false}}}}}}}}},"/private/task-file/add":{"post":{"operationId":"task_file_add","summary":"Add a small file to a task: the file bytes as base64 in contentBase64 (a data: URL works too), up to 10 MB of file, with fileName (its extension sets the type; mimeType adds one when the name has none). It appears in the task at once (status processing for a few seconds while it is checked, then ready; task_file_list gives its downloadUrl once ready), counts in the company storage and is checked like a member's upload. Programs (exe and similar) are refused; a task holds up to 10 files. Send a new UUID v4 as requestId so a retry adds it once. For a larger file use task_file_add_from_url (it has an https link) or task_file_upload_start (you can run curl).","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskId":{"type":"string","minLength":1,"maxLength":80},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"fileName":{"type":"string","minLength":1,"maxLength":180},"mimeType":{"type":"string","maxLength":200},"contentBase64":{"type":"string","minLength":1,"maxLength":13400000}},"required":["companyId","taskId","fileName","contentBase64"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"task":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":0,"maximum":9007199254740991},"title":{"type":"string"}},"required":["taskId","number","title"],"additionalProperties":false},"file":{"type":"object","properties":{"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasThumbnail":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","kind","fileName","sizeBytes","status","rejectReason","durationMs","hasThumbnail","createdByUserId","createdAtMs"],"additionalProperties":false}},"required":["task","file"],"additionalProperties":false}}}}}}}}},"/private/task-file/add-from-url":{"post":{"operationId":"task_file_add_from_url","summary":"Add a file to a task from a public https link (url), up to the company's largest file (task_file_upload_start limits apply the same). HRC downloads it without your credentials or cookies: https on port 443 only, a public domain name, at most 3 redirects, no private network addresses. fileName is optional (else the link's name). A small file is added within about 20 s and the answer has it (status done); a larger one answers status running with an uploadId: poll task_file_upload_status. The added file is processing for a few seconds before task_file_list gives its downloadUrl. In ChatGPT pass the user's uploaded file as file. A task holds up to 10 files. Send a new UUID v4 as requestId so a retry adds it once.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskId":{"type":"string","minLength":1,"maxLength":80},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"url":{"type":"string","minLength":1,"maxLength":4096},"fileName":{"type":"string","minLength":1,"maxLength":180},"mimeType":{"type":"string","maxLength":200},"file":{"type":"object","properties":{"download_url":{"type":"string","minLength":1,"maxLength":4096},"file_id":{"type":"string","maxLength":200},"mime_type":{"type":"string","maxLength":200},"file_name":{"type":"string","maxLength":400}},"required":["download_url","file_id"]}},"required":["companyId","taskId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"task":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":0,"maximum":9007199254740991},"title":{"type":"string"}},"required":["taskId","number","title"],"additionalProperties":false},"upload":{"type":"object","properties":{"uploadId":{"type":"string"},"status":{"type":"string","enum":["running","done","failed"]},"file":{"anyOf":[{"type":"object","properties":{"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasThumbnail":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","kind","fileName","sizeBytes","status","rejectReason","durationMs","hasThumbnail","createdByUserId","createdAtMs"],"additionalProperties":false},{"type":"null"}]},"errorCode":{"type":"string"},"errorMessage":{"type":"string"}},"required":["uploadId","status","file","errorCode","errorMessage"],"additionalProperties":false}},"required":["task","upload"],"additionalProperties":false}}}}}}}}},"/private/task-file/upload-status":{"post":{"operationId":"task_file_upload_status","summary":"Read where a task_file_add_from_url download stands by its uploadId: running, done (with the file, now in the task) or failed (errorCode and errorMessage say why). Poll every few seconds while it is running.","x-hrc-area":"tasks","x-hrc-level":"read","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"uploadId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","uploadId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"upload":{"type":"object","properties":{"uploadId":{"type":"string"},"status":{"type":"string","enum":["running","done","failed"]},"file":{"anyOf":[{"type":"object","properties":{"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasThumbnail":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","kind","fileName","sizeBytes","status","rejectReason","durationMs","hasThumbnail","createdByUserId","createdAtMs"],"additionalProperties":false},{"type":"null"}]},"errorCode":{"type":"string"},"errorMessage":{"type":"string"}},"required":["uploadId","status","file","errorCode","errorMessage"],"additionalProperties":false}},"required":["upload"],"additionalProperties":false}}}}}}}}},"/private/task-file/upload-start":{"post":{"operationId":"task_file_upload_start","summary":"Start uploading a file of any size to a task when you can run a shell (curl). Send taskId, fileName, sizeBytes (exact) and a new UUID v4 requestId. The answer has the upload plan, presigned PUT URLs (one putUrl up to 16 MiB, else the first 16 part URLs) and in instructions the exact curl commands. URLs work 15 minutes; get more part URLs with task_file_upload_sign_parts, then call task_file_upload_complete with taskFileId and taskId. Company limits and storage are checked here. A task holds up to 10 files. Calling again with the same requestId answers the same upload with fresh URLs.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskId":{"type":"string","minLength":1,"maxLength":80},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"fileName":{"type":"string","minLength":1,"maxLength":180},"sizeBytes":{"type":"integer","minimum":1,"maximum":5000000000000},"declaredDurationMs":{"type":"integer","minimum":0,"maximum":604800000}},"required":["companyId","taskId","requestId","fileName","sizeBytes"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"task":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":0,"maximum":9007199254740991},"title":{"type":"string"}},"required":["taskId","number","title"],"additionalProperties":false},"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"mimeType":{"type":"string"},"mode":{"type":"string","enum":["single","multipart"]},"putUrl":{"type":"string"},"partSizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partUrls":{"type":"array","items":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["partNumber","url","sizeBytes"],"additionalProperties":false}},"expiresAtMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"instructions":{"type":"string"}},"required":["task","taskFileId","kind","mimeType","mode","expiresAtMs","instructions"],"additionalProperties":false}}}}}}}}},"/private/task-file/upload-sign-parts":{"post":{"operationId":"task_file_upload_sign_parts","summary":"Get presigned PUT URLs (15 minutes) for more parts of a multipart upload from task_file_upload_start: taskFileId and up to 100 partNumbers. PUT each part's exact bytes: tail -c +((partNumber - 1) * partSizeBytes + 1) FILE | head -c sizeBytes | curl -sS --fail -X PUT --data-binary @- URL.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskFileId":{"type":"string","minLength":1,"maxLength":80},"partNumbers":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"integer","minimum":1,"maximum":10000}}},"required":["companyId","taskFileId","partNumbers"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["partNumber","url","sizeBytes"],"additionalProperties":false}},"expiresAtMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["parts","expiresAtMs"],"additionalProperties":false}}}}}}}}},"/private/task-file/upload-complete":{"post":{"operationId":"task_file_upload_complete","summary":"Finish an upload from task_file_upload_start: send taskFileId and taskId. The server reads the uploaded parts itself (no ETags needed), checks the size and puts the file in the task at once (status processing for a few seconds while it is checked, then ready; task_file_list gives its downloadUrl once ready). UPLOAD_PARTS_INCOMPLETE names the missing part numbers (also in details.missingPartNumbers): upload them and call again.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskFileId":{"type":"string","minLength":1,"maxLength":80},"taskId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","taskFileId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"file":{"type":"object","properties":{"taskFileId":{"type":"string"},"kind":{"type":"string","enum":["image","video","document"]},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["uploading","processing","ready","rejected"]},"rejectReason":{"type":"string","enum":["","unreadable","type-mismatch","too-long"]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasThumbnail":{"type":"boolean"},"createdByUserId":{"type":"string"},"createdAtMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["taskFileId","kind","fileName","sizeBytes","status","rejectReason","durationMs","hasThumbnail","createdByUserId","createdAtMs"],"additionalProperties":false}},"required":["file"],"additionalProperties":false}}}}}}}}},"/private/task-file/discard":{"post":{"operationId":"task_file_upload_abort","summary":"Cancel an upload from task_file_upload_start that is not finished or not on a task yet (taskFileId): its parts are deleted and the reserved storage is given back. A file already in a task is removed with task_file_remove.","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskFileId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","taskFileId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"isDiscarded":{"type":"boolean"}},"required":["isDiscarded"],"additionalProperties":false}}}}}}}}},"/private/task-file/remove":{"post":{"operationId":"task_file_remove","summary":"Remove an uploaded file from a task for good (taskId and taskFileId from task_file_list): it leaves the task and Failai and its storage is freed. Files of linked conversations are not removed here. (destructive)","x-hrc-area":"tasks","x-hrc-level":"write","x-hrc-owner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":80},"taskId":{"type":"string","minLength":1,"maxLength":80},"taskFileId":{"type":"string","minLength":1,"maxLength":80}},"required":["companyId","taskId","taskFileId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The envelope; data on success, error otherwise","content":{"application/json":{"schema":{"type":"object","properties":{"error":{},"data":{"type":"object","properties":{"task":{"type":"object","properties":{"taskId":{"type":"string"},"number":{"type":"integer","minimum":0,"maximum":9007199254740991},"title":{"type":"string"}},"required":["taskId","number","title"],"additionalProperties":false},"taskFileId":{"type":"string"},"fileName":{"type":"string"}},"required":["task","taskFileId","fileName"],"additionalProperties":false}}}}}}}}}}}