CINXE.COM
Web API Reference | Text Platform Docs & API Reference
<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>Web API Reference | Text Platform Docs & API Reference</title><link rel="canonical" href="https://platform.text.com/docs/messaging/agent-chat-api/v3.4"/><link rel="preconnect" href="https://LATDYRDX9J-dsn.algolia.net" crossorigin="true"/><meta name="description" content="Build powerful Text integrations with an open messaging protocol. Use the Agent Chat Web API to send messages and manage access and properties."/><meta name="robots" content="noindex"/><meta property="og:title" content="Web API Reference"/><meta property="og:description" content="Build powerful Text integrations with an open messaging protocol. Use the Agent Chat Web API to send messages and manage access and properties."/><meta property="og:type" content="website"/><meta property="og:image" content="https://platform.text.com/docs/images/text-docs-og.png"/><link rel="icon" href="/docs/images/favicon.ico"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:creator" content="@textplatform"/><meta name="twitter:title" content="Web API Reference"/><meta name="twitter:description" content="Build powerful Text integrations with an open messaging protocol. Use the Agent Chat Web API to send messages and manage access and properties."/><meta name="twitter:image" content="https://platform.text.com/docs/images/livechat-docs-og.png"/><script type="text/javascript"> window.__lc = window.__lc || {}; window.__lc.license = 1520; ;(function(n,t,c){function i(n){return e._h?e._h.apply(null,n):e._q.push(n)}var e={_q:[],_h:null,_v:"2.0",on:function(){i(["on",c.call(arguments)])},once:function(){i(["once",c.call(arguments)])},off:function(){i(["off",c.call(arguments)])},get:function(){if(!e._h)throw new Error("[LiveChatWidget] You can't use getters before load.");return i(["get",c.call(arguments)])},call:function(){i(["call",c.call(arguments)])},init:function(){var n=t.createElement("script");n.async=!0,n.type="text/javascript",n.src="https://cdn.livechatinc.com/staging/tracking.js",t.head.appendChild(n)}};!n.__lc.asyncInit&&e.init(),n.LiveChatWidget=n.LiveChatWidget||e}(window,document,[].slice)) </script><meta name="next-head-count" content="18"/><link rel="preload" href="/docs/_next/static/css/5c94b719b441ef6e576e.css" as="style"/><link rel="stylesheet" href="/docs/_next/static/css/5c94b719b441ef6e576e.css" data-n-g=""/><noscript data-n-css=""></noscript><link rel="preload" href="/docs/_next/static/chunks/webpack-af19fbe32e13fc779465.js" as="script"/><link rel="preload" href="/docs/_next/static/chunks/framework.57a22ac5870571c2eff5.js" as="script"/><link rel="preload" href="/docs/_next/static/chunks/commons.0889bf71124535c6c4cd.js" as="script"/><link rel="preload" href="/docs/_next/static/chunks/main-7bb61c4f8d40f1e634e9.js" as="script"/><link rel="preload" href="/docs/_next/static/chunks/pages/_app-cdbe91fdfdbd305577ef.js" as="script"/><link rel="preload" href="/docs/_next/static/chunks/f66b9295.f9eceaafe4216b86326e.js" as="script"/><link rel="preload" href="/docs/_next/static/chunks/b31dc3a52fd33fe1943f491eae223576a0413e10.a959722d54aa3f55ce3f.js" as="script"/><link rel="preload" href="/docs/_next/static/chunks/067aff065064306958fa97cea949633bebf95d70.dede6f8249fbb82aff52.js" as="script"/><link rel="preload" href="/docs/_next/static/chunks/pages/messaging/agent-chat-api/v3.4-1174c12e7e192cd09d5c.js" as="script"/> <script>!function(e){var n="https://s.go-mpulse.net/boomerang/";if("False"=="True")e.BOOMR_config=e.BOOMR_config||{},e.BOOMR_config.PageParams=e.BOOMR_config.PageParams||{},e.BOOMR_config.PageParams.pci=!0,n="https://s2.go-mpulse.net/boomerang/";if(window.BOOMR_API_key="SWHJY-Y2PHV-NVPM2-PDH42-VMPQS",function(){function e(){if(!o){var e=document.createElement("script");e.id="boomr-scr-as",e.src=window.BOOMR.url,e.async=!0,i.parentNode.appendChild(e),o=!0}}function t(e){o=!0;var n,t,a,r,d=document,O=window;if(window.BOOMR.snippetMethod=e?"if":"i",t=function(e,n){var t=d.createElement("script");t.id=n||"boomr-if-as",t.src=window.BOOMR.url,BOOMR_lstart=(new Date).getTime(),e=e||d.body,e.appendChild(t)},!window.addEventListener&&window.attachEvent&&navigator.userAgent.match(/MSIE [67]\./))return window.BOOMR.snippetMethod="s",void t(i.parentNode,"boomr-async");a=document.createElement("IFRAME"),a.src="about:blank",a.title="",a.role="presentation",a.loading="eager",r=(a.frameElement||a).style,r.width=0,r.height=0,r.border=0,r.display="none",i.parentNode.appendChild(a);try{O=a.contentWindow,d=O.document.open()}catch(_){n=document.domain,a.src="javascript:var d=document.open();d.domain='"+n+"';void(0);",O=a.contentWindow,d=O.document.open()}if(n)d._boomrl=function(){this.domain=n,t()},d.write("<bo"+"dy onload='document._boomrl();'>");else if(O._boomrl=function(){t()},O.addEventListener)O.addEventListener("load",O._boomrl,!1);else if(O.attachEvent)O.attachEvent("onload",O._boomrl);d.close()}function a(e){window.BOOMR_onload=e&&e.timeStamp||(new Date).getTime()}if(!window.BOOMR||!window.BOOMR.version&&!window.BOOMR.snippetExecuted){window.BOOMR=window.BOOMR||{},window.BOOMR.snippetStart=(new Date).getTime(),window.BOOMR.snippetExecuted=!0,window.BOOMR.snippetVersion=12,window.BOOMR.url=n+"SWHJY-Y2PHV-NVPM2-PDH42-VMPQS";var i=document.currentScript||document.getElementsByTagName("script")[0],o=!1,r=document.createElement("link");if(r.relList&&"function"==typeof r.relList.supports&&r.relList.supports("preload")&&"as"in r)window.BOOMR.snippetMethod="p",r.href=window.BOOMR.url,r.rel="preload",r.as="script",r.addEventListener("load",e),r.addEventListener("error",function(){t(!0)}),setTimeout(function(){if(!o)t(!0)},3e3),BOOMR_lstart=(new Date).getTime(),i.parentNode.appendChild(r);else t(!1);if(window.addEventListener)window.addEventListener("load",a,!1);else if(window.attachEvent)window.attachEvent("onload",a)}}(),"".length>0)if(e&&"performance"in e&&e.performance&&"function"==typeof e.performance.setResourceTimingBufferSize)e.performance.setResourceTimingBufferSize();!function(){if(BOOMR=e.BOOMR||{},BOOMR.plugins=BOOMR.plugins||{},!BOOMR.plugins.AK){var n=""=="true"?1:0,t="",a="bdpnbetikgfhcz2lflxa-f-f8b78b70a-clientnsv4-s.akamaihd.net",i="false"=="true"?2:1,o={"ak.v":"39","ak.cp":"1461330","ak.ai":parseInt("908031",10),"ak.ol":"0","ak.cr":1,"ak.ipv":4,"ak.proto":"http/1.1","ak.rid":"38c9e46f","ak.r":34600,"ak.a2":n,"ak.m":"b","ak.n":"essl","ak.bpcip":"8.222.208.0","ak.cport":59264,"ak.gh":"104.81.138.69","ak.quicv":"","ak.tlsv":"tls1.2","ak.0rtt":"","ak.0rtt.ed":"","ak.csrc":"-","ak.acc":"reno","ak.t":"1732979438","ak.ak":"hOBiQwZUYzCg5VSAfCLimQ==FZrVSB5/iKSABuGXTBCrBdse2AEU0+qg63sU9fZ2yT39r1LUWKF3U+3TiDijfOQSSaIlAGBJSY5NS5pwbyXNTsJ+QYbYkQisLzatLr+ykP+6REuwCxDCXVkgVLh6O+BdDTYNBMRItxnP3gKxNpRmbvBiM03lKX/5x5+LhZ+hb88ytTN91Fc6OmxctaQLU5Mca4oAS5rGGYy50+YqNIqYs7ZrrUX508EUen1gkk7nLBlfZk2HsgRNUabmLWkfTNE18LsYI7abLgLKmmsVhLFpl5aDCu5MRCn+dlrifSCOX6sLPgGeSexwLwF7pxnQSEQNwZgUCmPRNOX31fhiAnRak/+RbpiEgFAzlzoIieYvfB87gpaVjHNPoZuifTdwhNjChEhotcgq0P4BBjh4k7iZAAGzAOyNIRoednZ4uiKJtcI=","ak.pv":"55","ak.dpoabenc":"","ak.tf":i};if(""!==t)o["ak.ruds"]=t;var r={i:!1,av:function(n){var t="http.initiator";if(n&&(!n[t]||"spa_hard"===n[t]))o["ak.feo"]=void 0!==e.aFeoApplied?1:0,BOOMR.addVar(o)},rv:function(){var e=["ak.bpcip","ak.cport","ak.cr","ak.csrc","ak.gh","ak.ipv","ak.m","ak.n","ak.ol","ak.proto","ak.quicv","ak.tlsv","ak.0rtt","ak.0rtt.ed","ak.r","ak.acc","ak.t","ak.tf"];BOOMR.removeVar(e)}};BOOMR.plugins.AK={akVars:o,akDNSPreFetchDomain:a,init:function(){if(!r.i){var e=BOOMR.subscribe;e("before_beacon",r.av,null,null),e("onbeacon",r.rv,null,null),r.i=!0}return this},is_complete:function(){return!0}}}}()}(window);</script></head><body><div id="__next"><style data-emotion-css="cvn8wj">.css-cvn8wj{font-family:Colfax,colfax-web,Proxima Nova,Open Sans,Gill Sans MT, Gill Sans,Corbel,Arial,sans-serif;background-color:#4a4a55;height:60px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:fixed;top:0;width:100%;z-index:99;}@media (min-width:768px){.css-cvn8wj{height:60px;}}</style><div class="css-cvn8wj"><style data-emotion-css="y9662z">.css-y9662z{background:#4a4a55;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}</style><div class="css-y9662z"><style data-emotion-css="qqcdow">.css-qqcdow{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:15px;margin:0 20px;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:60px;}.css-qqcdow > a > svg{margin:0;display:block;height:24px;}</style><nav class="css-qqcdow"><style data-emotion-css="c2yzgf">.css-c2yzgf{color:white;-webkit-text-decoration:none;text-decoration:none;font-weight:500;white-space:nowrap;margin-left:8px;}.css-c2yzgf:hover{-webkit-text-decoration:none;text-decoration:none;color:white;}</style><a href="https://text.com/" class="css-c2yzgf"><style data-emotion-css="ofqsza">.css-ofqsza{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;justify-items:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:0.8em;height:40px;}.css-ofqsza .logo{margin:0;font-size:2em;font-weight:500;-webkit-letter-spacing:-0.01em;-moz-letter-spacing:-0.01em;-ms-letter-spacing:-0.01em;letter-spacing:-0.01em;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.css-ofqsza .adjacent{margin:0;font-size:1.8em;font-weight:500;line-height:34px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-letter-spacing:-0.5px;-moz-letter-spacing:-0.5px;-ms-letter-spacing:-0.5px;letter-spacing:-0.5px;}.css-ofqsza .carrier{font-weight:500;-webkit-animation-name:blink;animation-name:blink;-webkit-animation-duration:0.9s;animation-duration:0.9s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}</style><header class="css-ofqsza"><span class="logo">text<span class="carrier">|</span></span></header></a><a href="/docs" class="css-c2yzgf">Platform Docs</a></nav><style data-emotion-css="16b59id">.css-16b59id{margin:0;padding:0;max-width:calc(100% - 60px);width:calc(100% - 60px);overflow-x:auto;overflow-y:hidden;display:none;margin-right:10px;margin-left:40px;}@media (min-width:1024px){.css-16b59id{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:32px;}}</style><div class="css-16b59id"><style data-emotion-css="11hjr56">.css-11hjr56{font-family:Colfax,colfax-web,Proxima Nova,Open Sans,Gill Sans MT, Gill Sans,Corbel,Arial,sans-serif;position:relative;display:inline-block;height:100%;color:#ffffff;font-weight:400;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.css-11hjr56:hover{cursor:default;}</style><div class="css-11hjr56">Platform<svg width="24" height="24" fill="#FFFFFF" class="rmi rmi-chevron-down undefined" viewBox="0 0 24 24"><path d="M7.41 8.58 12 13.17l4.59-4.59L18 10l-6 6-6-6 1.41-1.42z"></path></svg></div><div class="css-11hjr56">APIs & SDKs<svg width="24" height="24" fill="#FFFFFF" class="rmi rmi-chevron-down undefined" viewBox="0 0 24 24"><path d="M7.41 8.58 12 13.17l4.59-4.59L18 10l-6 6-6-6 1.41-1.42z"></path></svg></div><div class="css-11hjr56">Resources<svg width="24" height="24" fill="#FFFFFF" class="rmi rmi-chevron-down undefined" viewBox="0 0 24 24"><path d="M7.41 8.58 12 13.17l4.59-4.59L18 10l-6 6-6-6 1.41-1.42z"></path></svg></div></div><style data-emotion-css="1hppjzv">.css-1hppjzv{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}</style><div class="css-1hppjzv"><style data-emotion-css="7wgbw1">.css-7wgbw1{display:none;}@media (min-width:1024px){.css-7wgbw1{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:192px;margin-right:16px;}}</style><div class="DocSearch-Button-Desktop css-7wgbw1"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div><style data-emotion-css="1i8rrts">.css-1i8rrts{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;}@media (min-width:1024px){.css-1i8rrts{display:none;}}</style><div class="DocSearch-Button-Mobile css-1i8rrts"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div><p>...</p><style data-emotion-css="pskeb7">@media (min-width:1024px){.css-pskeb7{display:none;}}</style><style data-emotion-css="19rp0xe">.css-19rp0xe{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:16px;cursor:pointer;}@media (min-width:1024px){.css-19rp0xe{display:none;}}@media (min-width:1024px){.css-19rp0xe{display:none;}}</style><svg width="32px" height="28px" fill="#ffffff" class="rmi rmi-menu css-19rp0xe" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"></path></svg></div></div></div><style data-emotion-css="ov1ktg">.css-ov1ktg{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}</style><div class="css-ov1ktg"><style data-emotion-css="hpx2k5">.css-hpx2k5{border-right:1px solid #e2e2e4;height:50px;position:fixed;-webkit-transition:height 300ms;transition:height 300ms;display:block;bottom:0%;width:100%;opacity:1;z-index:10;box-shadow:0px 0px 8px rgba(0,0,0,0.25);background-color:white;}@media (min-width:768px){.css-hpx2k5{box-shadow:none;height:100vh;max-height:100vh;position:-webkit-sticky;position:sticky;top:60px;-webkit-transition:all 0s;transition:all 0s;width:260px;}}</style><aside class="css-hpx2k5"><style data-emotion-css="y8dejn">.css-y8dejn{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:white;padding:10px 14px;cursor:pointer;}@media (min-width:768px){.css-y8dejn{display:none;}}</style><div class="css-y8dejn"><svg style="transform:rotate(270deg);transition:transform 300ms" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" fill="currentColor"></path><path d="M0 0h24v24H0z" fill="none"></path></svg>Web API Reference</div><style data-emotion-css="v8mm6">.css-v8mm6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}@media (min-width:768px){.css-v8mm6{display:none;}}</style><div class="css-v8mm6"><style data-emotion-css="1pjh3pd">.css-1pjh3pd{width:100%;color:#62626D;}.css-1pjh3pd:hover{cursor:pointer;-webkit-text-decoration:none;text-decoration:none;background-color:#f6f6f7;}</style><a class="css-1pjh3pd"><style data-emotion-css="1yw2pv4">.css-1yw2pv4{padding:4px 14px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:16px;}</style><div class="css-1yw2pv4"><style data-emotion-css="5c7uuc">.css-5c7uuc{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:start;-ms-flex-pack:start;justify-content:start;}</style><div class="css-5c7uuc"><svg width="24" height="20px" fill="#62626D" class="rmi rmi-home undefined" viewBox="0 0 24 24"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8h5z"></path></svg></div>Home</div></a></div><style data-emotion-css="1ln71vl">.css-1ln71vl{overflow:scroll;height:calc(100% - 90px);}@media (min-width:768px){.css-1ln71vl{height:calc(100% - 60px);position:fixed;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:100%;max-height:100vh;position:-webkit-sticky;position:-webkit-sticky;position:sticky;top:0;margin-top:8px;}}</style><div class="css-1ln71vl"><style data-emotion-css="1psvkz3">.css-1psvkz3{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;margin-right:10px;font-weight:500;font-size:16px;border-radius:0px 8px 8px 0px;}.css-1psvkz3:hover{background-color:#f6f6f7;}</style><div class="css-1psvkz3"><style data-emotion-css="19nl305">.css-19nl305{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#62626D;width:100%;}.css-19nl305:hover{color:#4284F5;cursor:pointer;-webkit-text-decoration:none;text-decoration:none;}</style><a class="css-19nl305"><style data-emotion-css="2hhlpj">.css-2hhlpj{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:6px 16px 6px 20px;margin-right:10px;font-weight:500;font-size:16px;border-radius:0px 8px 8px 0px;width:100%;}.css-2hhlpj:hover{background-color:#f6f6f7;}</style><div class="css-2hhlpj"><style data-emotion-css="oe3dsw">.css-oe3dsw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-right:8px;}</style><div class="css-oe3dsw"><svg fill="#ABABB1" width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><path d="M1.5,0.5 C0.675,0.5 0.0075,1.175 0.0075,2 L0,14 C0,14.825 0.6675,15.5 1.4925,15.5 L10.5,15.5 C11.325,15.5 12,14.825 12,14 L12,5 L7.5,0.5 L1.5,0.5 Z M6.75,5.75 L6.75,1.625 L10.875,5.75 L6.75,5.75 Z" fill-rule="nonzero" fill="currentColor"></path></svg></div>Messaging Overview</div></a></div><div class="css-1psvkz3"><a class="css-19nl305"><div class="css-2hhlpj"><div class="css-oe3dsw"><svg fill="#ABABB1" width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><path d="M1.5,0.5 C0.675,0.5 0.0075,1.175 0.0075,2 L0,14 C0,14.825 0.6675,15.5 1.4925,15.5 L10.5,15.5 C11.325,15.5 12,14.825 12,14 L12,5 L7.5,0.5 L1.5,0.5 Z M6.75,5.75 L6.75,1.625 L10.875,5.75 L6.75,5.75 Z" fill-rule="nonzero" fill="currentColor"></path></svg></div>Agent Chat API</div></a><style data-emotion-css="5opgc4">.css-5opgc4{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;padding-right:5px;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);-webkit-transition:-webkit-transform 300ms;-webkit-transition:transform 300ms;transition:transform 300ms;cursor:pointer;}</style><div class="css-5opgc4"><svg width="24" height="24px" fill="#62626D" weight="24px" class="rmi rmi-chevron-right undefined" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"></path></svg></div></div><style data-emotion-css="17iyluq">.css-17iyluq{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#4284F5;width:100%;}.css-17iyluq:hover{color:#4284F5;cursor:pointer;-webkit-text-decoration:none;text-decoration:none;}</style><a class="css-17iyluq"><style data-emotion-css="yqezgo">.css-yqezgo{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:6px 16px 6px 30px;margin-right:10px;font-weight:600;font-size:16px;border-radius:0px 8px 8px 0px;width:100%;}.css-yqezgo:hover{background-color:#f6f6f7;}</style><div class="css-yqezgo"><div class="css-oe3dsw"><svg fill="#ABABB1" width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><path d="M1.5,0.5 C0.675,0.5 0.0075,1.175 0.0075,2 L0,14 C0,14.825 0.6675,15.5 1.4925,15.5 L10.5,15.5 C11.325,15.5 12,14.825 12,14 L12,5 L7.5,0.5 L1.5,0.5 Z M6.75,5.75 L6.75,1.625 L10.875,5.75 L6.75,5.75 Z" fill-rule="nonzero" fill="currentColor"></path></svg></div>Web API Reference</div></a><a class="css-19nl305"><style data-emotion-css="1hg01uv">.css-1hg01uv{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:6px 16px 6px 30px;margin-right:10px;font-weight:500;font-size:16px;border-radius:0px 8px 8px 0px;width:100%;}.css-1hg01uv:hover{background-color:#f6f6f7;}</style><div class="css-1hg01uv"><div class="css-oe3dsw"><svg fill="#ABABB1" width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><path d="M1.5,0.5 C0.675,0.5 0.0075,1.175 0.0075,2 L0,14 C0,14.825 0.6675,15.5 1.4925,15.5 L10.5,15.5 C11.325,15.5 12,14.825 12,14 L12,5 L7.5,0.5 L1.5,0.5 Z M6.75,5.75 L6.75,1.625 L10.875,5.75 L6.75,5.75 Z" fill-rule="nonzero" fill="currentColor"></path></svg></div>RTM API Reference</div></a><a class="css-19nl305"><div class="css-1hg01uv"><div class="css-oe3dsw"><svg fill="#ABABB1" width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><path d="M1.5,0.5 C0.675,0.5 0.0075,1.175 0.0075,2 L0,14 C0,14.825 0.6675,15.5 1.4925,15.5 L10.5,15.5 C11.325,15.5 12,14.825 12,14 L12,5 L7.5,0.5 L1.5,0.5 Z M6.75,5.75 L6.75,1.625 L10.875,5.75 L6.75,5.75 Z" fill-rule="nonzero" fill="currentColor"></path></svg></div>Data structures</div></a><a class="css-19nl305"><div class="css-1hg01uv"><div class="css-oe3dsw"><svg fill="#ABABB1" width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><path d="M1.5,0.5 C0.675,0.5 0.0075,1.175 0.0075,2 L0,14 C0,14.825 0.6675,15.5 1.4925,15.5 L10.5,15.5 C11.325,15.5 12,14.825 12,14 L12,5 L7.5,0.5 L1.5,0.5 Z M6.75,5.75 L6.75,1.625 L10.875,5.75 L6.75,5.75 Z" fill-rule="nonzero" fill="currentColor"></path></svg></div>RTM pushes</div></a><a class="css-19nl305"><div class="css-1hg01uv"><div class="css-oe3dsw"><svg fill="#ABABB1" width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><path d="M1.5,0.5 C0.675,0.5 0.0075,1.175 0.0075,2 L0,14 C0,14.825 0.6675,15.5 1.4925,15.5 L10.5,15.5 C11.325,15.5 12,14.825 12,14 L12,5 L7.5,0.5 L1.5,0.5 Z M6.75,5.75 L6.75,1.625 L10.875,5.75 L6.75,5.75 Z" fill-rule="nonzero" fill="currentColor"></path></svg></div>Changelog</div></a><div class="css-1psvkz3"><a class="css-19nl305"><div class="css-2hhlpj"><div class="css-oe3dsw"><svg fill="#ABABB1" width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><path d="M1.5,0.5 C0.675,0.5 0.0075,1.175 0.0075,2 L0,14 C0,14.825 0.6675,15.5 1.4925,15.5 L10.5,15.5 C11.325,15.5 12,14.825 12,14 L12,5 L7.5,0.5 L1.5,0.5 Z M6.75,5.75 L6.75,1.625 L10.875,5.75 L6.75,5.75 Z" fill-rule="nonzero" fill="currentColor"></path></svg></div>Customer Chat API</div></a><style data-emotion-css="155ms1k">.css-155ms1k{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;padding-right:5px;-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);-webkit-transition:-webkit-transform 300ms;-webkit-transition:transform 300ms;transition:transform 300ms;cursor:pointer;}</style><div class="css-155ms1k"><svg width="24" height="24px" fill="#62626D" weight="24px" class="rmi rmi-chevron-right undefined" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"></path></svg></div></div><div class="css-1psvkz3"><a class="css-19nl305"><div class="css-2hhlpj"><div class="css-oe3dsw"><svg fill="#ABABB1" width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><path d="M1.5,0.5 C0.675,0.5 0.0075,1.175 0.0075,2 L0,14 C0,14.825 0.6675,15.5 1.4925,15.5 L10.5,15.5 C11.325,15.5 12,14.825 12,14 L12,5 L7.5,0.5 L1.5,0.5 Z M6.75,5.75 L6.75,1.625 L10.875,5.75 L6.75,5.75 Z" fill-rule="nonzero" fill="currentColor"></path></svg></div>LiveChat Node.js SDK</div></a></div><div class="css-1psvkz3"><a class="css-19nl305"><div class="css-2hhlpj"><div class="css-oe3dsw"><svg fill="#ABABB1" width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><path d="M1.5,0.5 C0.675,0.5 0.0075,1.175 0.0075,2 L0,14 C0,14.825 0.6675,15.5 1.4925,15.5 L10.5,15.5 C11.325,15.5 12,14.825 12,14 L12,5 L7.5,0.5 L1.5,0.5 Z M6.75,5.75 L6.75,1.625 L10.875,5.75 L6.75,5.75 Z" fill-rule="nonzero" fill="currentColor"></path></svg></div>LiveChat Go SDK</div></a></div><div class="css-1psvkz3"><a class="css-19nl305"><div class="css-2hhlpj"><div class="css-oe3dsw"><svg fill="#ABABB1" width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><path d="M1.5,0.5 C0.675,0.5 0.0075,1.175 0.0075,2 L0,14 C0,14.825 0.6675,15.5 1.4925,15.5 L10.5,15.5 C11.325,15.5 12,14.825 12,14 L12,5 L7.5,0.5 L1.5,0.5 Z M6.75,5.75 L6.75,1.625 L10.875,5.75 L6.75,5.75 Z" fill-rule="nonzero" fill="currentColor"></path></svg></div>LiveChat JS SDK</div></a></div><div class="css-1psvkz3"><a class="css-19nl305"><div class="css-2hhlpj"><div class="css-oe3dsw"><svg fill="#ABABB1" width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><path d="M1.5,0.5 C0.675,0.5 0.0075,1.175 0.0075,2 L0,14 C0,14.825 0.6675,15.5 1.4925,15.5 L10.5,15.5 C11.325,15.5 12,14.825 12,14 L12,5 L7.5,0.5 L1.5,0.5 Z M6.75,5.75 L6.75,1.625 L10.875,5.75 L6.75,5.75 Z" fill-rule="nonzero" fill="currentColor"></path></svg></div>LiveChat Python SDK</div></a></div><div class="css-1psvkz3"><a class="css-19nl305"><div class="css-2hhlpj"><div class="css-oe3dsw"><svg fill="#ABABB1" width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"><path d="M1.5,0.5 C0.675,0.5 0.0075,1.175 0.0075,2 L0,14 C0,14.825 0.6675,15.5 1.4925,15.5 L10.5,15.5 C11.325,15.5 12,14.825 12,14 L12,5 L7.5,0.5 L1.5,0.5 Z M6.75,5.75 L6.75,1.625 L10.875,5.75 L6.75,5.75 Z" fill-rule="nonzero" fill="currentColor"></path></svg></div>References</div></a><div class="css-155ms1k"><svg width="24" height="24px" fill="#62626D" weight="24px" class="rmi rmi-chevron-right undefined" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"></path></svg></div></div></div></aside><style data-emotion-css="1g06r20">.css-1g06r20{padding-bottom:30vh;position:relative;width:100%;}@media (min-width:768px){.css-1g06r20{width:calc(100% - 258px);max-width:900px;}}</style><div class="css-1g06r20"><style data-emotion-css="yofbie">.css-yofbie{width:100%;position:fixed;top:60px;right:0;z-index:40;-webkit-transition:left 0.3s ease-out;transition:left 0.3s ease-out;}@media (min-width:768px){.css-yofbie{left:260px;width:calc(100% - 260px);top:60px;}}</style><div class="css-yofbie"><style data-emotion-css="9hc061">.css-9hc061{padding:20px 24px 32px 60px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;}@media (max-width:1270px){.css-9hc061{background-color:#fff;padding-bottom:24px;}}@media (max-width:768px){.css-9hc061{-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;padding-left:30px;}}</style><div class="css-9hc061"><style data-emotion-css="7fagxn">.css-7fagxn{font-weight:400;font-size:15px;line-height:22px;padding:7px 8px 7px 16px;}</style><button class="lc-btn lc-btn--secondary css-7fagxn" type="button"><div><style data-emotion-css="44gx6g">.css-44gx6g{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;}</style><div class="css-44gx6g"><span>API version:</span><span>3.5<!-- --> <!-- -->(stable)</span><svg width="20px" height="20px" fill="#424D57" class="rmi rmi-chevron-down undefined" viewBox="0 0 24 24"><path d="M7.41 8.58 12 13.17l4.59-4.59L18 10l-6 6-6-6 1.41-1.42z"></path></svg></div></div></button></div></div><style data-emotion-css="c8i9h7">.css-c8i9h7{margin-top:120px;padding:0px 30px;}@media (min-width:768px){.css-c8i9h7{padding:0px 60px;}}.css-c8i9h7.redoc{margin-top:60px;display:block;}</style><article class=" css-c8i9h7"><style data-emotion-css="1lyzzun">.css-1lyzzun{margin:3em 0 1em;padding:2em 0 1em;}</style><div class="css-1lyzzun"><style data-emotion-css="12qxxrf">.css-12qxxrf{margin:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;font-weight:500;text-rendering:optimizeLegibility;font-size:2.25rem;line-height:1.1;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;}@media (min-width:768px){.css-12qxxrf{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}}</style><h2 id="web-api-reference" class="css-12qxxrf"><span>Web API Reference</span><style data-emotion-css="1g0dr3m">.css-1g0dr3m{margin-top:8px;}.css-1g0dr3m > label{margin:0 0 5px 0;}.css-1g0dr3m label + div{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;}</style></h2></div><style data-emotion-css="1679d3t">.css-1679d3t{border-bottom:1px solid #e0e4e9;padding-bottom:0.5em;}</style><h2 class="heading css-1679d3t"><style data-emotion-css="180507a">.css-180507a{color:inherit;-webkit-text-decoration:none;text-decoration:none;position:relative;}.css-180507a:hover{color:inherit;-webkit-text-decoration:none;text-decoration:none;}.css-180507a:hover:before{content:"#";position:absolute;font-weight:300;left:-1em;top:1px;opacity:0.3;}.css-180507a:focus-visible{outline-width:0px;}</style><a id="introduction" href="#introduction" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#introduction"><span class="icon icon-link"></span></a>Introduction</a></h2><h3 class="heading"><a id="versioning" href="#versioning" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#versioning"><span class="icon icon-link"></span></a>Versioning</a></h3><p>This document describes the <strong>Agent Chat Web API v3.4</strong>, which is a legacy version. For production-ready applications, it's best to use to the current stable version. <a href="/docs/messaging#api-versioning">Read more about versioning...</a></p><h4 class="heading"><a id="lifecycle-headers" href="#lifecycle-headers" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#lifecycle-headers"><span class="icon icon-link"></span></a>Lifecycle headers</a></h4><p>API responses will contain one of two headers related to the API lifecycle: <code>Legacy</code> or <code>Deprecation</code>. These headers specify when the associated stage ends (in the <code>YYYY-MM-DD</code> format).</p><h3 class="heading"><a id="what-is-web-api" href="#what-is-web-api" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#what-is-web-api"><span class="icon icon-link"></span></a>What is Web API</a></h3><p>Web API is similar to REST API. Client can send a <strong>request message</strong> that results in getting a <strong>response message</strong>. It's also possible to get webhooks.</p><h3 class="heading"><a id="when-to-use-web-api" href="#when-to-use-web-api" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#when-to-use-web-api"><span class="icon icon-link"></span></a>When to use Web API</a></h3><p>If you're wondering which API to use - Agent Chat <strong>RTM API</strong> or <strong>Web API</strong>, keep on reading.</p><p><strong>Web API</strong> allows for building stateless integrations. The communication is done via <strong>XHR requests</strong>. The implementation is easier than with RTM API, but you need to take possible time delays into consideration.</p><p><strong>Not what you're looking for?</strong> Perhaps, you need to use <a href="./rtm-reference/"><strong>Agent Chat RTM API</strong></a> instead.</p><h3 class="heading"><a id="access" href="#access" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#access"><span class="icon icon-link"></span></a>Access</a></h3><p>The basics on authorization, access tokens, and scopes in the Agent Chat Web API.</p><h4 class="heading"><a id="authorization" href="#authorization" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#authorization"><span class="icon icon-link"></span></a>Authorization</a></h4><p><strong>Agent authorization</strong> is handled with access tokens. Find out how to get an <strong>access token</strong> from <a href="/docs/authorization/agent-authorization">Agent authorization flows</a>. Take note <strong>you won't be able to use this token</strong> for the Customer Chat API.</p><h4 class="heading"><a id="scopes" href="#scopes" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#scopes"><span class="icon icon-link"></span></a>Scopes</a></h4><p>All authorization scopes are listed in the <a href="/docs/authorization/scopes">Scopes</a> document. If a method requires certain scopes, you'll find them included in the method description. Keep in mind that Web API requires authorization every time you make a request.</p><h3 class="heading"><a id="data-centers" href="#data-centers" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#data-centers"><span class="icon icon-link"></span></a>Data centers</a></h3><p>LiveChat system operates in two data centers: <code>dal</code> (USA) and <code>fra</code> (Europe). The default data center is <code>dal</code>.</p><p>All the LiveChat OAuth 2.1 access tokens have a prefix: <code>dal:</code> or <code>fra:</code>. This prefix indicates the data center they belong to. If you need to specify the data center while making an API call, simply add the <code>X-Region: <token_prefix></code> optional header.</p><p>Summing up, if the user token starts with <code>fra</code>, you should add the <code>X-Region: fra</code> header. If the token starts with <code>dal</code>, you don’t have to specify the header.</p><p>If you get the <style data-emotion-css="kbi7q3">.css-kbi7q3{-webkit-text-decoration:none;text-decoration:none;}.css-kbi7q3 svg{vertical-align:middle;margin-left:2px;margin-right:4px;color:#4284F5;}.css-kbi7q3 code{color:#4284F5;}.css-kbi7q3:hover,.css-kbi7q3:active{-webkit-text-decoration:none;text-decoration:none;}.css-kbi7q3:hover code,.css-kbi7q3:active code{color:#4284F5;-webkit-text-decoration:underline;text-decoration:underline;}</style><a href="/docs/messaging/agent-chat-api/v3.4#possible-errors" class="css-kbi7q3"><code>misdirected_request</code></a> error, use the prefix returned in the error as the value of <code>X-Region</code>.</p><h3 class="heading"><a id="rate-limits" href="#rate-limits" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#rate-limits"><span class="icon icon-link"></span></a>Rate limits</a></h3><p>To prevent sending a massive number of requests, there are rate limits for method calls. After exceeding those limits, the requester will get a <code>Too many requests</code> error in the response of a specific request. After some time, the request will be unblocked so it can be sent again.</p><h3 class="heading"><a id="pagination" href="#pagination" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#pagination"><span class="icon icon-link"></span></a>Pagination</a></h3><p>Pagination is a mechanism that allows splitting the database output into more manageable chunks of data. Based on the <code>limit</code> and <code>sort order</code> parameters, pagination is able to decide how many records will be returned at once and whether it should fetch the oldest or the latest data first.</p><p>Any filters that could be applied should be provided in first pagination request. In the response, you'll get the <code>next_page_id</code> and <code>previous_page_id</code> parameters. You should make the subsequent request using one of these parameters as <code>page_id</code>, depending on the direction of iteration: forward or backward.</p><p>The <code>filters</code>, <code>limit</code>, and <code>sort_order</code> parameters can't be provided along with <code>page_id</code>.</p><p>💡 The maximum duration of the <code>page_id</code> parameter before it expires is one month.</p><h3 class="heading"><a id="calling-the-api-as-a-bot" href="#calling-the-api-as-a-bot" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#calling-the-api-as-a-bot"><span class="icon icon-link"></span></a>Calling the API as a bot</a></h3><p>Sometimes, you want to <a href="/docs/messaging/agent-chat-api/v3.4#send-event">send an event as a bot</a>. To do it, you need to have a token that allows you to send it. The token can be easily generated for an agent, but you cannot generate a token for a bot. The other time you want to <a href="/docs/messaging/agent-chat-api/v3.4#add-user-to-chat">add a user to your chat</a>, and this user happens to be a bot in the group with no access to this chat, so you cannot add it. </p><p>In both situations, the <code>X-Author-Id</code> header is what you need to include in your request. With it, you can authorize using the agent’s token and send the event as a bot or add a bot to a chat even if the bot belongs to the group that has no access to this chat.</p><p><code>X-Author-Id: <bot_id></code> header is needed with a <a href="/docs/authorization/agent-authorization">Bearer Token</a> that needs to have the same <code>client_id</code> as the bot or <a href="/docs/authorization/agent-authorization#personal-access-tokens">PAT</a> that is from the organization that owns the bot's <code>client_id</code>.</p><h3 class="heading"><a id="postman-collection" href="#postman-collection" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#postman-collection"><span class="icon icon-link"></span></a>Postman collection</a></h3><p>You can find all the requests from the Agent Chat Web API v3.4 in Postman. In our collection, we use <a href="https://learning.getpostman.com/docs/postman/environments_and_globals/manage_environments/">environment variables</a> that store, for example, the access token. Importing the collection from the link below downloads the environment as well. Remember to replace sample tokens with your own.</p><p><a href="https://god.gw.postman.com/run-collection/18768877-db1e2ed9-ca99-4fa5-8a1e-3d98a83e4171?action=collection%2Ffork&collection-url=entityId%3D18768877-db1e2ed9-ca99-4fa5-8a1e-3d98a83e4171%26entityType%3Dcollection%26workspaceId%3D5e6fb31b-587b-4258-b215-4dccaae38a38#?env%5BLiveChat%20APIs%5D=W3sia2V5IjoiZGF0ZV9mcm9tIiwidmFsdWUiOiIyMDEzLTAxLTI5IiwiZW5hYmxlZCI6dHJ1ZSwic2Vzc2lvblZhbHVlIjoiMjAxMy0wMS0yOSIsInNlc3Npb25JbmRleCI6MH0seyJrZXkiOiJkYXRlX3RvIiwidmFsdWUiOiIyMDEzLTAxLTI5IiwiZW5hYmxlZCI6dHJ1ZSwic2Vzc2lvblZhbHVlIjoiMjAxMy0wMS0yOSIsInNlc3Npb25JbmRleCI6MX0seyJrZXkiOiJhZ2VudCIsInZhbHVlIjoiam9obi5kb2VAbXljb21wYW55LmNvbSIsImVuYWJsZWQiOnRydWUsInNlc3Npb25WYWx1ZSI6ImpvaG4uZG9lQG15Y29tcGFueS5jb20iLCJzZXNzaW9uSW5kZXgiOjJ9LHsia2V5IjoiZ3JvdXBfYnkiLCJ2YWx1ZSI6ImhvdXIiLCJlbmFibGVkIjp0cnVlLCJzZXNzaW9uVmFsdWUiOiJob3VyIiwic2Vzc2lvbkluZGV4IjozfSx7ImtleSI6Imdyb3VwIiwidmFsdWUiOiIyIiwiZW5hYmxlZCI6dHJ1ZSwic2Vzc2lvblZhbHVlIjoiMiIsInNlc3Npb25JbmRleCI6NH0seyJrZXkiOiJ3ZWVrZGF5IiwidmFsdWUiOiJtb24iLCJlbmFibGVkIjp0cnVlLCJzZXNzaW9uVmFsdWUiOiJtb24iLCJzZXNzaW9uSW5kZXgiOjV9LHsia2V5IjoiYXBpX3ZlcnNpb24iLCJ2YWx1ZSI6InYzLjQiLCJlbmFibGVkIjp0cnVlLCJzZXNzaW9uVmFsdWUiOiJ2My40Iiwic2Vzc2lvbkluZGV4Ijo2fSx7ImtleSI6ImFjY2Vzc190b2tlbiIsInZhbHVlIjoiZGFsOnRlc3RfLUF2WlNTT0RLa1pzcmpvUGtRIiwiZW5hYmxlZCI6dHJ1ZSwic2Vzc2lvblZhbHVlIjoiZGFsOnRlc3RfLUF2WlNTT0RLa1pzcmpvUGtRIiwic2Vzc2lvbkluZGV4Ijo3fSx7ImtleSI6ImN1c3RvbWVyX2FjY2Vzc190b2tlbiIsInZhbHVlIjoiZGFsOnRlc3RfcHE3UVllVlpMRkV6RE5CVGciLCJlbmFibGVkIjp0cnVlLCJzZXNzaW9uVmFsdWUiOiJkYWw6dGVzdF9wcTdRWWVWWkxGRXpETkJUZyIsInNlc3Npb25JbmRleCI6OH0seyJrZXkiOiJhY2NvdW50X2lkIiwidmFsdWUiOiJiN2VmZjc5OC1mOGRmLTQzNjQtODA1OS02NDljMzVjOWVkMGMiLCJlbmFibGVkIjp0cnVlLCJzZXNzaW9uVmFsdWUiOiJiN2VmZjc5OC1mOGRmLTQzNjQtODA1OS02NDljMzVjOWVkMGMiLCJzZXNzaW9uSW5kZXgiOjl9LHsia2V5IjoibGljZW5zZV9pZCIsInZhbHVlIjoiMTA0MTMwNjIzIiwiZW5hYmxlZCI6dHJ1ZSwic2Vzc2lvblZhbHVlIjoiMTA0MTMwNjIzIiwic2Vzc2lvbkluZGV4IjoxMH0seyJrZXkiOiJwYXJ0bmVyX2FwaV91cmwiLCJ2YWx1ZSI6Imh0dHBzOi8vYXBpLmxpdmVjaGF0aW5jLmNvbS92Mi9wYXJ0bmVycyIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJkZWZhdWx0Iiwic2Vzc2lvblZhbHVlIjoiaHR0cHM6Ly9hcGkubGl2ZWNoYXRpbmMuY29tL3YyL3BhcnRuZXJzIiwic2Vzc2lvbkluZGV4IjoxMX0seyJrZXkiOiJwYXJ0bmVyX2FjY2Vzc190b2tlbiIsInZhbHVlIjoiZGFsOnRlc3Rfb3VoZWZnMzQ4N3dlcnRxM0pFQiIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJkZWZhdWx0Iiwic2Vzc2lvblZhbHVlIjoiZGFsOnRlc3Rfb3VoZWZnMzQ4N3dlcnRxM0pFQiIsInNlc3Npb25JbmRleCI6MTJ9LHsia2V5Ijoib3JnYW5pemF0aW9uX2lkIiwidmFsdWUiOiJiN2VmZjc5OC1mOGxqLTQzNjQtODA1OS02NDljMzVjOWVkMGMiLCJlbmFibGVkIjp0cnVlLCJ0eXBlIjoiZGVmYXVsdCIsInNlc3Npb25WYWx1ZSI6ImI3ZWZmNzk4LWY4bGotNDM2NC04MDU5LTY0OWMzNWM5ZWQwYyIsInNlc3Npb25JbmRleCI6MTN9XQ=="><div style="max-width:123px"><style data-emotion-css="v3memn">.css-v3memn{display:block;max-width:100%;overflow:hidden;position:relative;box-sizing:border-box;margin-top:0;margin-left:0;margin-right:0;margin-bottom:10px;}</style><div class="css-v3memn"><style data-emotion-css="sa8835">.css-sa8835{box-sizing:border-box;display:block;max-width:100%;padding-top:calc(30 / 123 * 100%);}</style><div class="css-sa8835"><style data-emotion-css="5r33xa">.css-5r33xa{position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;}</style><img alt="Run in Postman" src="https://run.pstmn.io/button.svg" decoding="async" class="css-5r33xa"/></div></div></div></a></p><h2 class="heading css-1679d3t"><a id="data-structures" href="#data-structures" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#data-structures"><span class="icon icon-link"></span></a>Data structures</a></h2><p>To find sample payloads of <strong>events</strong>, <strong>users</strong>, and <strong>other common structures</strong> such as chats or threads <a href="/docs/messaging/agent-chat-api/v3.4/data-structures">visit the Data structures</a> document.</p><style data-emotion-css="v24v0q">.css-v24v0q{max-width:830px;}</style><section class="css-v24v0q"><style data-emotion-css="11ycufd">.css-11ycufd{-webkit-box-flex:2;-webkit-flex-grow:2;-ms-flex-positive:2;flex-grow:2;max-width:100%;overflow-x:auto;}</style><div class="css-11ycufd"><h2 class="heading css-1679d3t"><a id="methods" href="#methods" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#methods"><span class="icon icon-link"></span></a>Methods</a></h2><style data-emotion-css="q76ucn">.css-q76ucn{width:100%;overflow-x:auto;}</style><div class="css-q76ucn"><table><thead><tr><th>HTTP method</th><th>The API endpoint</th></tr></thead><tbody><tr><td><code>POST</code></td><td><code>https://api.livechatinc.com/v3.4/agent/action/<action></code></td></tr></tbody></table></div><p>If you specify the API version in the URL, you don't have to include the optional <code>"X-API-Version: 3.4"</code> header.</p><div class="css-q76ucn"><table><thead><tr><th>Required Header</th><th align="center">Value</th><th align="right">Notes</th></tr></thead><tbody><tr><td><code>Content-Type</code></td><td align="center"><code>multipart/form-data; boundary=<boundary></code></td><td align="right">Valid for the <code>upload_file</code> method</td></tr><tr><td><code>Content-Type</code></td><td align="center"><code>application/json</code></td><td align="right">Valid for all methods except for <code>upload_file</code></td></tr><tr><td><code>Authorization</code></td><td align="center"><code>Bearer <token></code></td><td align="right">Access token</td></tr><tr><td><code>X-Author-Id</code></td><td align="center"><code><bot_id></code></td><td align="right"><a href="/docs/messaging/agent-chat-api/v3.4#calling-the-api-as-a-bot">Valid only for Bot Agents</a></td></tr></tbody></table></div></div><style data-emotion-css="17buymi">.css-17buymi{width:100%;}@media (min-width:768px){.css-17buymi{padding:25px 25px 30px 0px;}}</style><div class="css-17buymi"><style data-emotion-css="16prjg8">.css-16prjg8{border:1px solid #e8e8e8;border-radius:6px;background-color:#505671;color:white;margin:0 0 20px;max-width:100%;--code-color:#f5fbff;--code-background:#505671;--code-string-color:#56d4bc;}</style><div class="css-16prjg8"><style data-emotion-css="13hnul0">.css-13hnul0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:5px 15px;background-color:#383f54;border-radius:8px 8px 0 0;color:#dee5e8;}.css-13hnul0 code{font-size:12px;max-width:100%;-webkit-box-flex:2;-webkit-flex-grow:2;-ms-flex-positive:2;flex-grow:2;word-break:break-all;}.css-13hnul0 .code-sample-header{border:none;background-color:#383f54;color:#dee5e8;padding:0.2em 0;}</style><div class="css-13hnul0"><code class="code-sample-header">GENERAL WEB API REQUEST FORMAT </code><style data-emotion-css="1sg2lsz">.css-1sg2lsz{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}</style><div class="css-1sg2lsz"><style data-emotion-css="1wp1vo7">.css-1wp1vo7{position:relative;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;width:45px;}</style><div class="css-1wp1vo7"><style data-emotion-css="xnt8k0">.css-xnt8k0{position:relative;min-height:18px;}</style><div class="css-xnt8k0"><style data-emotion-css="6oazep">.css-6oazep{position:absolute;top:0;left:0;right:0;text-align:right;text-transform:capitalize;line-height:20px;font-size:13px;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;opacity:0;-webkit-transition-delay:0.25s;transition-delay:0.25s;-webkit-transition:none;transition:none;}</style><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><style data-emotion-css="139ndot">.css-139ndot{position:absolute;top:0;right:0;text-align:right;max-width:24px;opacity:1;-webkit-transition-delay:0.25;transition-delay:0.25;-webkit-transition:opacity 0.25s ease-in-out;transition:opacity 0.25s ease-in-out;}.css-139ndot:hover{cursor:pointer;}</style><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><style data-emotion-css="ju12u0">.css-ju12u0{min-height:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;max-width:100%;overflow:scroll;}.css-ju12u0 code{display:inline-block;}</style><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/<span class="token operator"><</span>action<span class="token operator">></span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: <content-type>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ // payload }'</span> </code></pre></div></div></div></div></section><h3 class="heading"><a id="available-methods" href="#available-methods" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#available-methods"><span class="icon icon-link"></span></a>Available methods</a></h3><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Chats</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4#list-chats" class="css-kbi7q3"><code>list_chats</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#list-threads" class="css-kbi7q3"><code>list_threads</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#get-chat" class="css-kbi7q3"><code>get_chat</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#list-archives" class="css-kbi7q3"><code>list_archives</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#start-chat" class="css-kbi7q3"><code>start_chat</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#resume-chat" class="css-kbi7q3"><code>resume_chat</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#deactivate-chat" class="css-kbi7q3"><code>deactivate_chat</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#follow-chat" class="css-kbi7q3"><code>follow_chat</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#unfollow-chat" class="css-kbi7q3"><code>unfollow_chat</code></a></td></tr><tr><td><strong>Chat access</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4#transfer-chat" class="css-kbi7q3"><code>transfer_chat</code></a></td></tr><tr><td><strong>Chat users</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4#add-user-to-chat" class="css-kbi7q3"><code>add_user_to_chat</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#remove-user-from-chat" class="css-kbi7q3"><code>remove_user_from_chat</code></a></td></tr><tr><td><strong>Events</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4#send-event" class="css-kbi7q3"><code>send_event</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#upload-file" class="css-kbi7q3"><code>upload_file</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#send-rich-message-postback" class="css-kbi7q3"><code>send_rich_message_postback</code></a></td></tr><tr><td><strong>Properties</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4#update-chat-properties" class="css-kbi7q3"><code>update_chat_properties</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#delete-chat-properties" class="css-kbi7q3"><code>delete_chat_properties</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#update-thread-properties" class="css-kbi7q3"><code>update_thread_properties</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#delete-thread-properties" class="css-kbi7q3"><code>delete_thread_properties</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#update-event-properties" class="css-kbi7q3"><code>update_event_properties</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#delete-event-properties" class="css-kbi7q3"><code>delete_event_properties</code></a></td></tr><tr><td><strong>Thread tags</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4#tag-thread" class="css-kbi7q3"><code>tag_thread</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#untag-thread" class="css-kbi7q3"><code>untag_thread</code></a></td></tr><tr><td><strong>Customers</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4#get-customer" class="css-kbi7q3"><code>get_customer</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#list-customers" class="css-kbi7q3"><code>list_customers</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#create-customer" class="css-kbi7q3"><code>create_customer</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#update-customer" class="css-kbi7q3"><code>update_customer</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#ban-customer" class="css-kbi7q3"><code>ban_customer</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#follow-customer" class="css-kbi7q3"><code>follow_customer</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#unfollow-customer" class="css-kbi7q3"><code>unfollow_customer</code></a></td></tr><tr><td><strong>Status</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4#set-routing-status" class="css-kbi7q3"><code>set_routing_status</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#list-routing-statuses" class="css-kbi7q3"><code>list_routing_statuses</code></a></td></tr><tr><td><strong>Other</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4#mark-events-as-seen" class="css-kbi7q3"><code>mark_events_as_seen</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#send-typing-indicator" class="css-kbi7q3"><code>send_typing_indicator</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#multicast" class="css-kbi7q3"><code>multicast</code></a> <a href="/docs/messaging/agent-chat-api/v3.4#list-agents-for-transfer" class="css-kbi7q3"><code>list_agents_for_transfer</code></a></td></tr></tbody></table></div><h3 class="heading"><a id="chats" href="#chats" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#chats"><span class="icon icon-link"></span></a>Chats</a></h3><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="list-chats" href="#list-chats" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#list-chats"><span class="icon icon-link"></span></a>List Chats</a></h4><p>It returns <a href="/docs/messaging/agent-chat-api/v3.4/data-structures#chat-summaries">summaries</a> of the chats an Agent has access to.</p><h5 class="heading"><a id="specifics" href="#specifics" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/list_chats</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:ro</code> <strong>*</strong> or <code>chats--access:ro</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#list-chats" class="css-kbi7q3"><code>list_chats</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:ro</code> - to find chats from all groups.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:ro</code> - to find chats from groups that the requester (related to the token) is a member of.</p><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>filters</code></td><td>No</td><td><code>object</code></td><td>When paginating, <code>filters</code> provided in the first request are remembered and automatically used for the subsequent requests. Providing a new <code>filters</code> object will result in a <code>validation</code> error. To reset the filters, start paginating with a new set of filters.</td></tr><tr><td><code>filters.include_active</code></td><td>No</td><td><code>bool</code></td><td>Defines if the returned chat summary includes active chats; default: <code>true</code>.</td></tr><tr><td><code>filters.include_chats_without_threads</code></td><td>No</td><td><code>bool</code></td><td>Defines if the returned chat summary includes chats without any threads; default: <code>true</code>.</td></tr><tr><td><code>filters.group_ids</code></td><td>No</td><td><code>array</code></td><td>Array of group IDs. Max array size: 200</td></tr><tr><td><code>filters.properties.<namespace>.<name>.<filter_type></code></td><td>No</td><td><code>any</code></td><td></td></tr><tr><td><code>sort_order</code></td><td>No</td><td><code>string</code></td><td>Possible values: <code>asc</code> - oldest chats first, <code>desc</code> - newest chats first (default)</td></tr><tr><td><code>limit</code></td><td>No</td><td><code>number</code></td><td>Default: 10, maximum: 100</td></tr><tr><td><code>page_id</code></td><td>No</td><td><code>string</code></td><td></td></tr></tbody></table></div><p><code>filter_type</code> can take the following values:</p><ul><li>exists (bool)</li><li>values (type[] - array with specific type for property: <code>string</code>, <code>int</code>, or <code>bool</code>)</li><li>exclude_values (type[] - array with specific type for property: <code>string</code>, <code>int</code>, or <code>bool</code>)</li></ul><p>There's only one value allowed for a single property.</p><h5 class="heading"><a id="response" href="#response" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response"><span class="icon icon-link"></span></a>Response</a></h5><div class="css-q76ucn"><table><thead><tr><th>Field</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chats_summary</code></td><td><code>array</code></td><td>An array of <a href="/docs/messaging/agent-chat-api/v3.4/data-structures#chat-summaries">Chat summary</a> data structures</td></tr><tr><td><code>next_page_id</code></td><td><code>string</code></td><td>In relation to <code>page_id</code> specified in the request. Appears in the response only when there's a next page.</td></tr><tr><td><code>previous_page_id</code></td><td><code>string</code></td><td>In relation to <code>page_id</code> specified in the request Appears in the response only when there's a previous page.</td></tr><tr><td><code>found_chats</code></td><td><code>number</code></td><td>An estimated number. The real number of found chats can slightly differ.</td></tr></tbody></table></div></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/list_chats <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -d <span class="token string">'{}'</span> </code></pre></div></div></div><style data-emotion-css="1vuwrgc">.css-1vuwrgc{border:1px solid #e8e8e8;border-radius:6px;background-color:#f1f6f8;min-height:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin:0 0 20px;max-width:100%;}.css-1vuwrgc .remark-highlight{min-height:0;}.css-1vuwrgc pre{min-height:0;}</style><div class="css-1vuwrgc"><style data-emotion-css="iwgofq">.css-iwgofq{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:5px 15px;height:42px;background-color:#dee5e8;border-radius:5px 5px 0 0;font-size:13px;text-transform:uppercase;-webkit-letter-spacing:0.04em;-moz-letter-spacing:0.04em;-ms-letter-spacing:0.04em;letter-spacing:0.04em;}</style><div class="css-iwgofq"><style data-emotion-css="w6gvpm">.css-w6gvpm{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}</style><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span> <span class="token property">"next_page_id"</span><span class="token operator">:</span> <span class="token string">"MTUxNzM5ODEzMTQ5Ng=="</span><span class="token punctuation">,</span> <span class="token comment">// optional</span> <span class="token property">"chats_summary"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"PJ0MRSHTDG"</span><span class="token punctuation">,</span> <span class="token property">"last_event_per_type"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"message"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"thread_id"</span><span class="token operator">:</span> <span class="token string">"K600PKZON8"</span><span class="token punctuation">,</span> <span class="token property">"thread_created_at"</span><span class="token operator">:</span> <span class="token string">"2020-05-07T07:11:28.288340Z"</span><span class="token punctuation">,</span> <span class="token property">"event"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"Q298LUVPRH_1"</span><span class="token punctuation">,</span> <span class="token property">"created_at"</span><span class="token operator">:</span> <span class="token string">"2019-12-09T12:01:18.909000Z"</span><span class="token punctuation">,</span> <span class="token property">"visibility"</span><span class="token operator">:</span> <span class="token string">"all"</span><span class="token punctuation">,</span> <span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">"message"</span><span class="token punctuation">,</span> <span class="token property">"text"</span><span class="token operator">:</span> <span class="token string">"hello world"</span><span class="token punctuation">,</span> <span class="token property">"author_id"</span><span class="token operator">:</span> <span class="token string">"b7eff798-f8df-4364-8059-649c35c9ed0c"</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"system_message"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"thread_id"</span><span class="token operator">:</span> <span class="token string">"K600PKZON8"</span><span class="token punctuation">,</span> <span class="token property">"thread_created_at"</span><span class="token operator">:</span> <span class="token string">"2020-05-07T07:11:28.288340Z"</span><span class="token punctuation">,</span> <span class="token property">"event"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token comment">// "System message" event</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"users"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span> <span class="token comment">// "Customer" user object</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> <span class="token comment">// "Agent" user object</span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"last_thread_summary"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"K600PKZON8"</span><span class="token punctuation">,</span> <span class="token property">"created_at"</span><span class="token operator">:</span> <span class="token string">"2020-05-07T07:11:28.288340Z"</span><span class="token punctuation">,</span> <span class="token property">"user_ids"</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">"b7eff798-f8df-4364-8059-649c35c9ed0c"</span><span class="token punctuation">,</span> <span class="token string">"smith@example.com"</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"properties"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token comment">// "Properties" object</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"active"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token property">"access"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"group_ids"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"properties"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token comment">// "Properties" object</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"access"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"group_ids"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"is_followed"</span><span class="token operator">:</span> <span class="token boolean">true</span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"found_chats"</span><span class="token operator">:</span> <span class="token number">4</span> <span class="token punctuation">}</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="list-threads" href="#list-threads" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#list-threads"><span class="icon icon-link"></span></a>List Threads</a></h4><p>It returns threads that the current Agent has access to in a given chat.</p><h5 class="heading"><a id="specifics-1" href="#specifics-1" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-1"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/list_threads</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:ro</code> <strong>*</strong> or <code>chats--access:ro</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#list-threads" class="css-kbi7q3"><code>list_threads</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:ro</code> - to find threads from all groups.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:ro</code> - to find threads from groups that the requester (related to the token) is a member of.</p><h5 class="heading"><a id="request" href="#request" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr><tr><td><code>sort_order</code></td><td>No</td><td><code>string</code></td><td>Possible values: <code>asc</code> - oldest threads first and <code>desc</code> - newest threads first (default).</td></tr><tr><td><code>limit</code></td><td>No</td><td><code>number</code></td><td>Default: 3, maximum: 100</td></tr><tr><td><code>page_id</code></td><td>No</td><td><code>string</code></td><td></td></tr><tr><td><code>min_events_count</code></td><td>No</td><td><code>number</code></td><td>Range: 1-100; Specifies the minimum number of events to be returned in the response. It's the <strong>total</strong> number of events, so they can come from more than one thread. You'll get as many latest threads as needed to meet the <code>min_events_count</code> condition.</td></tr><tr><td><code>filters</code></td><td>No</td><td><code>object</code></td><td></td></tr><tr><td><code>filters.from</code></td><td>No</td><td><code>string</code></td><td>Date & time format compatible with RFC3339 with a resolution of microseconds, <code>YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM</code></td></tr><tr><td><code>filters.to</code></td><td>No</td><td><code>string</code></td><td>Date & time format compatible with RFC3339 with a resolution of microseconds, <code>YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM</code></td></tr></tbody></table></div><p>You cannot use either <code>limit</code> and <code>min_events_count</code> or <code>filters</code> and <code>min_events_count</code> at the same time.</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/list_threads <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "PWJ8Y4THAV" }'</span> </code></pre></div></div></div><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span> <span class="token property">"threads"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"K600PKZON8"</span><span class="token punctuation">,</span> <span class="token property">"created_at"</span><span class="token operator">:</span> <span class="token string">"2019-12-17T07:57:41.512000Z"</span><span class="token punctuation">,</span> <span class="token property">"active"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token property">"user_ids"</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">"b7eff798-f8df-4364-8059-649c35c9ed0c"</span><span class="token punctuation">,</span> <span class="token string">"smith@example.com"</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"events"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"Q20N9CKRX2_1"</span><span class="token punctuation">,</span> <span class="token property">"created_at"</span><span class="token operator">:</span> <span class="token string">"2019-12-17T07:57:41.512000Z"</span><span class="token punctuation">,</span> <span class="token property">"visibility"</span><span class="token operator">:</span> <span class="token string">"all"</span><span class="token punctuation">,</span> <span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">"message"</span><span class="token punctuation">,</span> <span class="token property">"text"</span><span class="token operator">:</span> <span class="token string">"Hello"</span><span class="token punctuation">,</span> <span class="token property">"author_id"</span><span class="token operator">:</span> <span class="token string">"smith@example.com"</span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"properties"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token comment">// "Property" object</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"access"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"group_ids"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"previous_thread_id"</span><span class="token operator">:</span> <span class="token string">"K600PKZOM8"</span><span class="token punctuation">,</span> <span class="token comment">// optional</span> <span class="token property">"next_thread_id"</span><span class="token operator">:</span> <span class="token string">"K600PKZOO8"</span> <span class="token comment">// optional</span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"found_threads"</span><span class="token operator">:</span> <span class="token number">42</span><span class="token punctuation">,</span> <span class="token property">"next_page_id"</span><span class="token operator">:</span> <span class="token string">"MTUxNzM5ODEzMTQ5Ng=="</span><span class="token punctuation">,</span> <span class="token comment">// optional</span> <span class="token property">"previous_page_id"</span><span class="token operator">:</span> <span class="token string">"MTUxNzM5ODEzMTQ5Nw=="</span> <span class="token comment">// optional</span> <span class="token punctuation">}</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="get-chat" href="#get-chat" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#get-chat"><span class="icon icon-link"></span></a>Get Chat</a></h4><p>It returns a thread that the current Agent has access to in a given chat.</p><h5 class="heading"><a id="specifics-2" href="#specifics-2" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-2"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/get_chat</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:ro</code> <strong>*</strong> or <code>chats--access:ro</code> <strong>*<!-- -->*</strong>, depending on the requested thread’s groups.</td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#get-chat" class="css-kbi7q3"><code>get_chat</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:ro</code> - to get chat from any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:ro</code> - to get chat from a group that the requester (related to the token) is a member of.</p><h5 class="heading"><a id="request-1" href="#request-1" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-1"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr><tr><td><code>thread_id</code></td><td>No</td><td><code>string</code></td><td>Default: the latest thread (if exists)</td></tr></tbody></table></div></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/get_chat <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "PWJ8Y4THAV", "thread_id": "K600PKZON8" }'</span> </code></pre></div></div></div><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"PJ0MRSHTDG"</span><span class="token punctuation">,</span> <span class="token property">"thread"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"K600PKZON8"</span><span class="token punctuation">,</span> <span class="token property">"created_at"</span><span class="token operator">:</span> <span class="token string">"2020-05-07T07:11:28.288340Z"</span><span class="token punctuation">,</span> <span class="token property">"active"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token property">"user_ids"</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">"b7eff798-f8df-4364-8059-649c35c9ed0c"</span><span class="token punctuation">,</span> <span class="token string">"smith@example.com"</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"events"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"Q20N9CKRX2_1"</span><span class="token punctuation">,</span> <span class="token property">"created_at"</span><span class="token operator">:</span> <span class="token string">"2019-12-17T07:57:41.512000Z"</span><span class="token punctuation">,</span> <span class="token property">"visibility"</span><span class="token operator">:</span> <span class="token string">"all"</span><span class="token punctuation">,</span> <span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">"message"</span><span class="token punctuation">,</span> <span class="token property">"text"</span><span class="token operator">:</span> <span class="token string">"Hello"</span><span class="token punctuation">,</span> <span class="token property">"author_id"</span><span class="token operator">:</span> <span class="token string">"smith@example.com"</span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"properties"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"0805e283233042b37f460ed8fbf22160"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"string_property"</span><span class="token operator">:</span> <span class="token string">"string_value"</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"access"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"group_ids"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"previous_thread_id"</span><span class="token operator">:</span> <span class="token string">"K600PKZOM8"</span><span class="token punctuation">,</span> <span class="token property">"next_thread_id"</span><span class="token operator">:</span> <span class="token string">"K600PKZOO8"</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"users"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"b7eff798-f8df-4364-8059-649c35c9ed0c"</span><span class="token punctuation">,</span> <span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">"customer"</span><span class="token punctuation">,</span> <span class="token property">"present"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token property">"created_at"</span><span class="token operator">:</span> <span class="token string">"2019-12-17T08:53:20.693553+01:00"</span><span class="token punctuation">,</span> <span class="token property">"statistics"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"chats_count"</span><span class="token operator">:</span> <span class="token number">1</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"agent_last_event_created_at"</span><span class="token operator">:</span> <span class="token string">"2019-12-17T09:04:05.239000+01:00"</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"smith@example.com"</span><span class="token punctuation">,</span> <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">"Agent Smith"</span><span class="token punctuation">,</span> <span class="token property">"email"</span><span class="token operator">:</span> <span class="token string">"smith@example.com"</span><span class="token punctuation">,</span> <span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">"agent"</span><span class="token punctuation">,</span> <span class="token property">"present"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token property">"avatar"</span><span class="token operator">:</span> <span class="token string">"https://example.com/avatar.jpg"</span><span class="token punctuation">,</span> <span class="token property">"visibility"</span><span class="token operator">:</span> <span class="token string">"all"</span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"properties"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"0805e283233042b37f460ed8fbf22160"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"string_property"</span><span class="token operator">:</span> <span class="token string">"string_value"</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"access"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"group_ids"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"is_followed"</span><span class="token operator">:</span> <span class="token boolean">true</span> <span class="token punctuation">}</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="list-archives" href="#list-archives" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#list-archives"><span class="icon icon-link"></span></a>List Archives</a></h4><p>It returns a list of the chats an Agent has access to. Together with a <strong>chat</strong>, the <strong>events</strong> of <strong>one thread</strong> from this chat are returned.</p><p>The list classification is based on threads; 1 chat per 1 thread. Thus, the same <strong>chat</strong> object may appear on the list several times, but each time with a different <strong>thread</strong>. The returned <strong>chat</strong> is a complete object, not only a <strong>chat summary</strong>.</p><h5 class="heading"><a id="specifics-3" href="#specifics-3" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-3"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/list_archives</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:ro</code> <strong>*</strong> or <code>chats--access:ro</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#list-archives" class="css-kbi7q3"><code>list_archives</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:ro</code> - to find threads from all groups.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:ro</code> - to find threads from groups that the requester (related to the token) is a member of.</p><h5 class="heading"><a id="request-2" href="#request-2" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-2"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>filters</code></td><td>No</td><td><code>object</code></td><td></td></tr><tr><td><code>filters.query</code></td><td>No</td><td><code>string</code></td><td></td></tr><tr><td><code>filters.from</code></td><td>No</td><td><code>string</code></td><td>Date & time format compatible with RFC3339 with a resolution of microseconds, <code>YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM</code></td></tr><tr><td><code>filters.to</code></td><td>No</td><td><code>string</code></td><td>Date & time format compatible with RFC3339 with a resolution of microseconds, <code>YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM</code></td></tr><tr><td><code>filters.thread_ids</code></td><td>No</td><td><code>array</code></td><td>Array of thread IDs. Cannot be used with other filters or pagination; max array size: 20.</td></tr><tr><td><code>filters.group_ids</code></td><td>No</td><td><code>array</code></td><td>Array of group IDs. Max array size: 200</td></tr><tr><td><code>filters.properties.<namespace>.<name>.<properties_filter_type></code></td><td>No</td><td><code>any</code></td><td><strong>*<!-- --> described below</strong></td></tr><tr><td><code>filters.agents.<filter_type></code></td><td>No</td><td><code>any</code></td><td><strong>*<!-- -->*<!-- --> described below</strong> <code>exists</code> set to <code>false</code> will return unassigned chats; <code>true</code> will return the assigned ones.</td></tr><tr><td><code>filters.tags.<filter_type></code></td><td>No</td><td><code>any</code></td><td></td></tr><tr><td><code>filters.sales.<filter_type></code></td><td>No</td><td><code>any</code></td><td></td></tr><tr><td><code>filters.goals.<filter_type></code></td><td>No</td><td><code>any</code></td><td></td></tr><tr><td><code>filters.surveys.<survey></code></td><td>No</td><td><code>array</code></td><td><strong>*<!-- -->*<!-- -->*</strong> <strong>described below</strong></td></tr><tr><td><code>filters.event_types.<event_type_filter_type></code></td><td>No</td><td><code>any</code></td><td><strong>*<!-- -->*<!-- -->*<!-- -->*</strong> <strong>described below</strong></td></tr><tr><td><code>filters.greetings.<greetings_filter_type></code></td><td>No</td><td><code>any</code></td><td><strong>*<!-- -->*<!-- -->*<!-- -->*<!-- -->*<!-- -->*</strong> <strong>described below</strong></td></tr><tr><td><code>filters.agent_response.<agent_response_filter_type></code></td><td>No</td><td><code>any</code></td><td><strong>*<!-- -->*<!-- -->*<!-- -->*<!-- -->*<!-- -->*<!-- -->*</strong> <strong>described below</strong></td></tr><tr><td><code>page_id</code></td><td>No</td><td><code>string</code></td><td></td></tr><tr><td><code>sort_order</code> <strong>*<!-- -->*<!-- -->*<!-- -->*<!-- -->*</strong></td><td>No</td><td><code>string</code></td><td>Default: <code>desc</code></td></tr><tr><td><code>limit</code></td><td>No</td><td><code>number</code></td><td>Default: 10, min: 1, max: 100</td></tr><tr><td><code>highlights</code></td><td>No</td><td><code>object</code></td><td>Use it to highlight the match of <code>filters.query</code>. To enable highlights with default parameters, pass an empty object.</td></tr><tr><td><code>highlights.pre_tag</code></td><td>No</td><td><code>string</code></td><td>An HTML tag to use for highlighting the matched text; default: <code><em></code>. Use it together with <code>highlights.post_tag</code>.</td></tr><tr><td><code>highlights.post_tag</code></td><td>No</td><td><code>string</code></td><td>An HTML tag to use for highlighting the matched text; default: <code></em></code>. Use it together with <code>highlights.pre_tag</code>.</td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code><properties_filter_type></code> can take the following values:</p><ul><li><code>exists</code> (<code>bool</code>)</li><li><code>values</code> (<code>type[]</code> - an array with a specific type for property: <code>string</code>, <code>int</code> or <code>bool</code>)</li><li><code>exclude_values</code> (<code>type[]</code> - an array with a specific type for property: <code>string</code>, <code>int</code> or <code>bool</code>)</li></ul><p>There's only one value allowed for a single property.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code><filter_type></code> can take the following values:</p><ul><li><code>exists</code> (<code>bool</code>)</li><li><code>values</code> (<code>type[]</code> - an array with a specific type for property: <code>string</code>, <code>int</code> or <code>bool</code>)</li><li><code>exclude_values</code> (<code>type[]</code> - an array with a specific type for property: <code>string</code>, <code>int</code> or <code>bool</code>)</li><li><code>require_every_value</code> (<code>bool</code>) - if set to <code>true</code>, will return only those chats that have all elements passed in <code>values</code> or <code>exclude_values</code></li></ul><p>You can pass only one of the following values at a time: <code>exists</code>, <code>values</code> or <code>exclude_values</code>.</p><p><strong>*<!-- -->*<!-- -->*<!-- -->)</strong> <code><survey></code> contains the following fields:</p><ul><li><code>from</code> (<code>string</code>) - date & time format compatible with RFC3339 with a resolution of microseconds, <code>YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM</code></li><li><code>to</code> (<code>string</code>) - date & time format compatible with RFC3339 with a resolution of microseconds, <code>YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM</code></li><li><code>exists</code> (<code>bool</code>) - if set to <code>true</code>, will return only surveys with <code>survey_id</code></li><li><code>type</code> (<code>string</code>) - allowed values: <code>pre_chat</code>, <code>post_chat</code></li><li><code>values</code> (<code>string[]</code>) - an array of answer_ids</li><li><code>exclude_values</code> (<code>string[]</code>) - an array of answer_ids</li><li><code>groups.values</code> (<code>int[]</code>) - an array of group IDs</li><li><code>groups.exclude_values</code> (<code>int[]</code>) - an array of group IDs</li></ul><p><strong>*<!-- -->*<!-- -->*<!-- -->*<!-- -->)</strong> <code><event_type_filter_type></code> can take the following values:</p><ul><li><code>values</code> (<code>string[]</code> - an array of <a href="/docs/messaging/agent-chat-api/v3.4#events">Event</a> types, duplicates are ignored)</li><li><code>exclude_values</code> (<code>string[]</code> - an array of <a href="/docs/messaging/agent-chat-api/v3.4#events">Event</a> types, duplicates are ignored)</li><li><code>require_every_value</code> (<code>bool</code>) - if set to <code>true</code>, will return only those chats that have all elements passed in <code>values</code> or <code>exclude_values</code></li></ul><p>You can pass only one of the following values at a time: <code>values</code> or <code>exclude_values</code>.</p><p><strong>*<!-- -->*<!-- -->*<!-- -->*<!-- -->*<!-- -->)</strong> <code>sort_order</code> can take the following values:</p><ul><li><code>asc</code> - the oldest chats first</li><li><code>desc</code> - the newest chats first</li></ul><p><strong>*<!-- -->*<!-- -->*<!-- -->*<!-- -->*<!-- -->*<!-- -->)</strong> <code><greetings_filter_type></code> can take the following values:</p><ul><li><code>from</code> (<code>string</code>) - Date & time format compatible with RFC3339 with a resolution of microseconds, <code>YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM</code></li><li><code>to</code> (<code>string</code>) - Date & time format compatible with RFC3339 with a resolution of microseconds, <code>YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM</code></li><li><code>exists</code> (<code>bool</code>)</li><li><code>values</code> (<code>int[]</code>) - an array of greeting IDs</li><li><code>exclude_values</code> (<code>int[]</code>) - an array of greeting IDs</li><li><code>groups.values</code> (<code>int[]</code>) - an array of group IDs</li><li><code>groups.exclude_values</code> (<code>int[]</code>) - an array of group IDs</li></ul><p><strong>*<!-- -->*<!-- -->*<!-- -->*<!-- -->*<!-- -->*<!-- -->)</strong> <code><agent_response_filter_type></code> can take the following values:</p><ul><li><code>exists</code> (<code>bool</code>)</li><li><code>first</code> (<code>bool</code>) - modifier that makes the other <code>agent_response</code> filters operate only on agents' first response</li><li><code>agents.values</code> (<code>string[]</code>) - an array of agent IDs</li><li><code>agents.exclude_values</code> (<code>string[]</code>) - an array of agent IDs</li><li><code>groups.values</code> (<code>int[]</code>) - an array of group IDs</li><li><code>groups.exclude_values</code> (<code>int[]</code>) - an array of group IDs</li></ul></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/list_archives <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "filters": { "event_types": { "values": ["message", "filled_form"] } } }'</span> </code></pre></div></div></div><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span> <span class="token property">"chats"</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"PJ0MRSHTDG"</span><span class="token punctuation">,</span> <span class="token property">"users"</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"smith@example.com"</span><span class="token punctuation">,</span> <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">"Agent Smith"</span><span class="token punctuation">,</span> <span class="token property">"email"</span><span class="token operator">:</span> <span class="token string">"smith@example.com"</span><span class="token punctuation">,</span> <span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">"agent"</span><span class="token punctuation">,</span> <span class="token property">"present"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token property">"avatar"</span><span class="token operator">:</span> <span class="token string">"https://cdn.livechat-files.com/api/file/avatar.png"</span><span class="token punctuation">,</span> <span class="token property">"visibility"</span><span class="token operator">:</span> <span class="token string">"all"</span> <span class="token punctuation">}</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"thread"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"K600PKZON8"</span><span class="token punctuation">,</span> <span class="token property">"active"</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token property">"user_ids"</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">"smith@example.com"</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"events"</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token comment">//optional</span> <span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"QBT14H0Y3Y_1"</span><span class="token punctuation">,</span> <span class="token property">"created_at"</span><span class="token operator">:</span> <span class="token string">"2020-05-28T11:45:32.269000Z"</span><span class="token punctuation">,</span> <span class="token property">"visibility"</span><span class="token operator">:</span> <span class="token string">"all"</span><span class="token punctuation">,</span> <span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">"message"</span><span class="token punctuation">,</span> <span class="token property">"properties"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"0805e283233042b37f460ed8fbf22160"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"event_property"</span><span class="token operator">:</span> <span class="token string">"property_value"</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"text"</span><span class="token operator">:</span> <span class="token string">"Hello there"</span><span class="token punctuation">,</span> <span class="token property">"author_id"</span><span class="token operator">:</span> <span class="token string">"smith@example.com"</span> <span class="token punctuation">}</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"properties"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"0805e283233042b37f460ed8fbf22160"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"thread_property"</span><span class="token operator">:</span> <span class="token string">"property_value"</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"access"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"group_ids"</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span> <span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"created_at"</span><span class="token operator">:</span> <span class="token string">"2020-05-28T11:44:58.829000Z"</span><span class="token punctuation">,</span> <span class="token property">"previous_thread_id"</span><span class="token operator">:</span> <span class="token string">"K600PKZOM8"</span><span class="token punctuation">,</span> <span class="token comment">// optional</span> <span class="token property">"next_thread_id"</span><span class="token operator">:</span> <span class="token string">"K600PKZOO8"</span><span class="token punctuation">,</span> <span class="token comment">// optional</span> <span class="token property">"previous_accessible_thread_id"</span><span class="token operator">:</span> <span class="token string">"K600PKZOM8"</span><span class="token punctuation">,</span> <span class="token comment">// optional</span> <span class="token property">"next_accessible_thread_id"</span><span class="token operator">:</span> <span class="token string">"K600PKZOO8"</span> <span class="token comment">// optional</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"properties"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"0805e283233042b37f460ed8fbf22160"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"chat_property"</span><span class="token operator">:</span> <span class="token string">"property_value"</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"access"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"group_ids"</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span> <span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"is_followed"</span><span class="token operator">:</span> <span class="token boolean">false</span> <span class="token punctuation">}</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"found_chats"</span><span class="token operator">:</span> <span class="token number">42</span><span class="token punctuation">,</span> <span class="token property">"next_page_id"</span><span class="token operator">:</span> <span class="token string">"MTUxNzM5ODEzMTQ5Ng=="</span><span class="token punctuation">,</span> <span class="token property">"previous_page_id"</span><span class="token operator">:</span> <span class="token string">"MTUxNzM5ODEzMTQ5Ng=="</span> <span class="token punctuation">}</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="start-chat" href="#start-chat" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#start-chat"><span class="icon icon-link"></span></a>Start Chat</a></h4><p>Starts a chat.</p><p>Authors (except the requester) of all initial events must be listed in the <code>users</code> field. The default <code>visibility</code> of both the events and users is set to <code>all</code> and cannot be changed. The method updates the requester's <code>events_seen_up_to</code> as if they've seen all chat events.</p><h5 class="heading"><a id="specifics-4" href="#specifics-4" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-4"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/start_chat</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong>, depending on the requested groups</td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#start-chat" class="css-kbi7q3"><code>start_chat</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#incoming_chat" class="css-kbi7q3"><code>incoming_chat</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to start a chat in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to start a chat in groups that the requester (related to the token) is a member of.</p><h5 class="heading"><a id="request-3" href="#request-3" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-3"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameters</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat</code></td><td>No</td><td><code>object</code></td><td></td></tr><tr><td><code>chat.properties</code></td><td>No</td><td><code>object</code></td><td></td></tr><tr><td><code>chat.access</code></td><td>No</td><td><code>object</code></td><td></td></tr><tr><td><code>chat.users</code></td><td>No</td><td><code>[]object</code></td><td>The list of existing users. Up to 4 additional (other than the requester) agents and 1 customer allowed.</td></tr><tr><td><code>chat.users.id</code></td><td>Yes</td><td><code>string</code></td><td>User ID</td></tr><tr><td><code>chat.users.type</code></td><td>Yes</td><td><code>string</code></td><td><code>agent</code> or <code>customer</code></td></tr><tr><td><code>chat.thread</code></td><td>No</td><td><code>object</code></td><td></td></tr><tr><td><code>chat.thread.events</code></td><td>No</td><td><code>array</code></td><td>The list of initial chat <a href="/docs/messaging/agent-chat-api/data-structures#events">events</a> object. Does not support the <code>form</code> type event in the LiveChat app.</td></tr><tr><td><code>chat.thread.properties</code></td><td>No</td><td><code>object</code></td><td></td></tr><tr><td><code>active</code></td><td>No</td><td><code>bool</code></td><td>When set to <code>false</code>, creates an inactive thread; default: <code>true</code>.</td></tr><tr><td><code>continuous</code></td><td>No</td><td><code>bool</code></td><td>Starts chat as continuous (online group is not required); default: <code>false</code>.</td></tr></tbody></table></div><h5 class="heading"><a id="response-1" href="#response-1" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-1"><span class="icon icon-link"></span></a>Response</a></h5><div class="css-q76ucn"><table><thead><tr><th>Field</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td><code>string</code></td><td></td></tr><tr><td><code>thread_id</code></td><td><code>string</code></td><td></td></tr><tr><td><code>event_ids</code></td><td><code>[]string</code></td><td>Returned only when the chat was started with initial events. Returns only the IDs of user-generated events; server-side generated events are not included in the array.</td></tr></tbody></table></div></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/start_chat <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{}'</span> </code></pre></div></div></div><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span> <span class="token property">"chat_id"</span><span class="token operator">:</span> <span class="token string">"PJ0MRSHTDG"</span><span class="token punctuation">,</span> <span class="token property">"thread_id"</span><span class="token operator">:</span> <span class="token string">"PGDGHT5G"</span> <span class="token punctuation">}</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="resume-chat" href="#resume-chat" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#resume-chat"><span class="icon icon-link"></span></a>Resume Chat</a></h4><p>Restarts an archived chat.</p><p>Authors (except the requester) of all initial events must be listed in the <code>users</code> field. The default <code>visibility</code> of both the events and users is set to <code>all</code> and cannot be changed. The method updates the requester's <code>events_seen_up_to</code> as if they've seen all chat events.</p><h5 class="heading"><a id="specifics-5" href="#specifics-5" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-5"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/resume_chat</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong>, depending on the requested groups</td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#resume-chat" class="css-kbi7q3"><code>resume_chat</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#incoming_chat" class="css-kbi7q3"><code>incoming_chat</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to resume a chat in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to resume a chat in groups that the requester (related to the token) is a member of.</p><h5 class="heading"><a id="request-4" href="#request-4" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-4"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat</code></td><td>Yes</td><td><code>object</code></td><td></td></tr><tr><td><code>chat.id</code></td><td>Yes</td><td><code>string</code></td><td>ID of the chat that will be resumed.</td></tr><tr><td><code>chat.access</code></td><td>No</td><td><code>object</code></td><td>Chat access to set, default: all agents.</td></tr><tr><td><code>chat.properties</code></td><td>No</td><td><code>object</code></td><td>Initial chat properties</td></tr><tr><td><code>chat.users</code></td><td>No</td><td><code>[]object</code></td><td>The list of existing users. Up to 4 additional (other than the requester) agents and 1 customer allowed.</td></tr><tr><td><code>chat.users.id</code></td><td>Yes</td><td><code>string</code></td><td>User ID</td></tr><tr><td><code>chat.users.type</code></td><td>Yes</td><td><code>string</code></td><td><code>agent</code> or <code>customer</code></td></tr><tr><td><code>chat.thread</code></td><td>No</td><td><code>object</code></td><td></td></tr><tr><td><code>chat.thread.events</code></td><td>No</td><td><code>array</code></td><td>Initial chat events array</td></tr><tr><td><code>chat.thread.properties</code></td><td>No</td><td><code>object</code></td><td>Initial thread properties</td></tr><tr><td><code>active</code></td><td>No</td><td><code>bool</code></td><td>When set to <code>false</code>, creates an inactive thread; default: <code>true</code>.</td></tr><tr><td><code>continuous</code></td><td>No</td><td><code>bool</code></td><td>Sets a chat to the continuous mode. When unset, leaves the mode unchanged.</td></tr></tbody></table></div><h5 class="heading"><a id="response-2" href="#response-2" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-2"><span class="icon icon-link"></span></a>Response</a></h5><div class="css-q76ucn"><table><thead><tr><th>Field</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>thread_id</code></td><td><code>string</code></td><td></td></tr><tr><td><code>event_ids</code></td><td><code>[]string</code></td><td>Returned only when the chat was resumed with initial events. Returns only the IDs of user-generated events; server-side generated events are not included in the array.</td></tr></tbody></table></div></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/resume_chat <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat": { "id": "PWJ8Y4THAV" } }'</span> </code></pre></div></div></div><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span> <span class="token property">"thread_id"</span><span class="token operator">:</span> <span class="token string">"Z8AGR5OUW"</span> <span class="token punctuation">}</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="deactivate-chat" href="#deactivate-chat" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#deactivate-chat"><span class="icon icon-link"></span></a>Deactivate Chat</a></h4><p>Deactivates a chat by closing the currently open thread. Sending messages to this thread will no longer be possible.</p><p>The requester must be present on the list of chat users. You can override it by setting the <code>ignore_requester_presence</code> parameter.</p><h5 class="heading"><a id="specifics-6" href="#specifics-6" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-6"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/deactivate_chat</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong>, depending on the requested groups</td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#deactivate-chat" class="css-kbi7q3"><code>deactivate_chat</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#chat_deactivated" class="css-kbi7q3"><code>chat_deactivated</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to deactivate a chat in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to deactivate a chat in groups that the agent (related to the token) is a member of.</p><h5 class="heading"><a id="request-5" href="#request-5" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-5"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr><tr><td><code>ignore_requester_presence</code></td><td>No</td><td><code>bool</code></td><td>If <code>true</code>, the requester doesn't need to be present on the list of chat users; default <code>false</code>.</td></tr></tbody></table></div><h5 class="heading"><a id="response-3" href="#response-3" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-3"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/deactivate_chat <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "id": "PJ0MRSHTDG" }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="follow-chat" href="#follow-chat" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#follow-chat"><span class="icon icon-link"></span></a>Follow Chat</a></h4><p>Marks a chat as followed. All changes to the chat will be sent to the requester until the chat is reactivated or unfollowed. Chat members don't need to follow their chats. They receive all chat pushes regardless of their follower status.</p><h5 class="heading"><a id="specifics-7" href="#specifics-7" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-7"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/follow_chat</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:ro</code> <strong>*</strong> or <code>chats--access:ro</code> <strong>*<!-- -->*</strong>, depending on the requested groups</td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#follow-chat" class="css-kbi7q3"><code>follow_chat</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:ro</code> - to follow chats from all groups.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:ro</code> - to follow chats from groups that the requester (related to the token) is a member of.</p><h5 class="heading"><a id="request-6" href="#request-6" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-6"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th></th></tr></thead><tbody><tr><td><code>id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr></tbody></table></div><h5 class="heading"><a id="response-4" href="#response-4" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-4"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/follow_chat <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "id": "PW94SJTGW6" }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="unfollow-chat" href="#unfollow-chat" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#unfollow-chat"><span class="icon icon-link"></span></a>Unfollow Chat</a></h4><p>Removes the requester from the chat followers. After that, only key changes to the chat (like <code>transfer_chat</code> or <code>close_active_thread</code>) will be sent to the requester. Chat members cannot unfollow the chat.</p><h5 class="heading"><a id="specifics-8" href="#specifics-8" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-8"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/unfollow_chat</code></td></tr><tr><td><strong>Required scopes</strong></td><td>-</td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#unfollow-chat" class="css-kbi7q3"><code>unfollow_chat</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><h5 class="heading"><a id="request-7" href="#request-7" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-7"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th></th></tr></thead><tbody><tr><td><code>id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr></tbody></table></div><h5 class="heading"><a id="response-5" href="#response-5" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-5"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/unfollow_chat <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "id": "PJ0MRSHTDG" }'</span> </code></pre></div></div></div></div></section><h3 class="heading"><a id="chat-access" href="#chat-access" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#chat-access"><span class="icon icon-link"></span></a>Chat access</a></h3><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="transfer-chat" href="#transfer-chat" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#transfer-chat"><span class="icon icon-link"></span></a>Transfer Chat</a></h4><p>Transfers a chat to an agent or a group. The following restrictions apply:</p><ul><li>The transferred chat must be active.</li><li>The requester must be present on the list of chat users.<ul><li>You can override it by setting the <code>ignore_requester_presence</code> parameter.</li></ul></li><li>When transferring directly to an agent, the agent must have access to the transferred chat.</li></ul><h5 class="heading"><a id="specifics-9" href="#specifics-9" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-9"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/transfer_chat</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#transfer-chat" class="css-kbi7q3"><code>transfer_chat</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#chat_transferred" class="css-kbi7q3"><code>chat_transferred</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to transfer a chat taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to transfer a chat taking place in groups that the requester (related to the token) is a member of. (The requester groups and the current groups of the chat must overlap - at least one group must be in common.)</p><h5 class="heading"><a id="request-8" href="#request-8" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-8"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td>Yes</td><td><code>string</code></td><td>Chat ID</td></tr><tr><td><code>target</code></td><td>No</td><td><code>object</code></td><td>If missing, the chat will be transferred within the current group.</td></tr><tr><td><code>target.type</code></td><td>Yes</td><td><code>string</code></td><td><code>group</code> or <code>agent</code></td></tr><tr><td><code>target.ids</code></td><td>Yes</td><td><code>array</code></td><td><code>group</code> or <code>agent</code> IDs array</td></tr><tr><td><code>ignore_agents_availability</code></td><td>No</td><td><code>bool</code></td><td>If <code>true</code>, allows the chat to be enqueued after the transfer. Otherwise, fails when unable to immediately assign any agent from the requested groups; default <code>false</code>.</td></tr><tr><td><code>ignore_requester_presence</code></td><td>No</td><td><code>bool</code></td><td>If <code>true</code>, the requester doesn't need to be present on the list of chat users; default <code>false</code>.</td></tr></tbody></table></div><h5 class="heading"><a id="response-6" href="#response-6" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-6"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/transfer_chat <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "id": "PJ0MRSHTDG", "target": { "type": "group", "ids": [ 19 ] } }'</span> </code></pre></div></div></div></div></section><h3 class="heading"><a id="chat-users" href="#chat-users" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#chat-users"><span class="icon icon-link"></span></a>Chat users</a></h3><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="add-user-to-chat" href="#add-user-to-chat" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#add-user-to-chat"><span class="icon icon-link"></span></a>Add User to Chat</a></h4><p>Adds a user to the chat. The following restrictions apply:</p><ul><li>The chat must be active.</li><li>The requester must be present on the list of chat users.<ul><li>You can override it by setting the <code>ignore_requester_presence</code> parameter.</li></ul></li><li>You can't have more than one <code>customer</code> in the chat.</li><li>Additional agents must also have access to the chat.</li><li><code>customer</code> must be added with <code>visibility:all</code>.</li></ul><p>To learn how to add more than one agent to the chat, reach out to us <a href="https://discord.gg/gRzwSaCxg4">on Discord</a> or via email, <a href="mailto:developers@text.com">developers@text.com</a>.</p><p>To add a bot to a chat in a group it’s not part of, use the <code>X-Author-Id</code> header set to the bot’s id. <a href="/docs/messaging/agent-chat-api/v3.4#calling-the-api-as-a-bot">Read more...</a></p><h5 class="heading"><a id="specifics-10" href="#specifics-10" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-10"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/add_user_to_chat</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#add-user-to-chat" class="css-kbi7q3"><code>add_user_to_chat</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#user_added_to_chat" class="css-kbi7q3"><code>user_added_to_chat</code></a></td></tr></tbody></table></div><p><strong>*</strong> <code>chats--all:rw</code> - to add the requester (related to the token) to a chat taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to add a user to a chat taking place in groups that the user is a member of. (The agent groups and the chat groups must overlap - at least one group must be in common.)</p><h5 class="heading"><a id="request-9" href="#request-9" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-9"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr><tr><td><code>user_id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr><tr><td><code>user_type</code></td><td>Yes</td><td><code>string</code></td><td>Possible values: <code>agent</code> or <code>customer</code></td></tr><tr><td><code>visibility</code></td><td>Yes</td><td><code>string</code></td><td>Possible values: <code>all</code> or <code>agents</code></td></tr><tr><td><code>ignore_requester_presence</code></td><td>No</td><td><code>bool</code></td><td>If <code>true</code>, the requester doesn't need to be present on the list of chat users; default <code>false</code>.</td></tr></tbody></table></div><h5 class="heading"><a id="response-7" href="#response-7" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-7"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/add_user_to_chat <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "PW94SJTGW6", "user_id": "smith@example.com", "user_type": "agent", "visibility": "all", "ignore_requester_presence": true }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="remove-user-from-chat" href="#remove-user-from-chat" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#remove-user-from-chat"><span class="icon icon-link"></span></a>Remove User from Chat</a></h4><p>Removes a user from chat. The following restrictions apply:</p><ul><li>You can't remove the <code>customer</code>.</li><li>The requester must be present on the list of chat users.<ul><li>You can override it by setting the <code>ignore_requester_presence</code> parameter.</li></ul></li></ul><h5 class="heading"><a id="specifics-11" href="#specifics-11" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-11"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/remove_user_from_chat</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#remove-user-from-chat" class="css-kbi7q3"><code>remove_user_from_chat</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#user_removed_from_chat" class="css-kbi7q3"><code>user_removed_from_chat</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to remove a user from a chat taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to remove a user from a chat taking place in groups that the requester (related to the token) is a member of. (The agent groups and the chat groups must overlap - at least one group must be in common.)</p><h5 class="heading"><a id="request-10" href="#request-10" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-10"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr><tr><td><code>user_id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr><tr><td><code>user_type</code></td><td>Yes</td><td><code>string</code></td><td>Possible value: <code>agent</code></td></tr><tr><td><code>ignore_requester_presence</code></td><td>No</td><td><code>bool</code></td><td>If <code>true</code>, the requester doesn't need to be present on the list of chat users; default <code>false</code>.</td></tr></tbody></table></div><h5 class="heading"><a id="response-8" href="#response-8" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-8"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/remove_user_from_chat <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "PW94SJTGW6", "user_id": "smith@example.com", "user_type": "agent" }'</span> </code></pre></div></div></div></div></section><h3 class="heading"><a id="events" href="#events" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#events"><span class="icon icon-link"></span></a>Events</a></h3><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="send-event" href="#send-event" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#send-event"><span class="icon icon-link"></span></a>Send Event</a></h4><p>Sends an <a href="/docs/messaging/agent-chat-api/v3.4/data-structures#events">Event</a> object. Use this method to send a message by specifying the <a href="/docs/messaging/agent-chat-api/v3.4/data-structures#message">Message</a> event type in the request.</p><p>The user must be <a href="/docs/messaging/agent-chat-api/rtm-pushes#user_added_to_chat">added to the chat</a> before they can send an event. Events with <code>visibility:agents</code> are sent to agents only, and with <code>visibility:all</code> to all users. Users with <code>visibility:agents</code> cannot send events with <code>visibility:all</code>.</p><p>The method updates the requester's <code>events_seen_up_to</code> as if they've seen all chat events.</p><p>To call the API as a bot, use the <code>X-Author-Id</code> header set to the bot's id. <a href="/docs/messaging/agent-chat-api/v3.4#calling-the-api-as-a-bot">Read more...</a></p><h5 class="heading"><a id="specifics-12" href="#specifics-12" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-12"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/send_event</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#send-event" class="css-kbi7q3"><code>send_event</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#incoming_event" class="css-kbi7q3"><code>incoming_event</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to send an event to a chat taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to send an event to a chat taking place in groups that the requester (related to the token) is a member of. (The agent groups and the chat groups must overlap - at least one group must be in common.)</p><h5 class="heading"><a id="request-11" href="#request-11" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-11"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the chat you want to send a message to.</td></tr><tr><td><code>event</code></td><td>Yes</td><td><code>object</code></td><td><a href="/docs/messaging/agent-chat-api/data-structures#events">Event</a> object. Does not support the <code>form</code> type event in the LiveChat app.</td></tr></tbody></table></div><h5 class="heading"><a id="response-9" href="#response-9" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-9"><span class="icon icon-link"></span></a>Response</a></h5><div class="css-q76ucn"><table><thead><tr><th>Field</th><th>Data type</th></tr></thead><tbody><tr><td><code>event_id</code></td><td><code>string</code></td></tr></tbody></table></div></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/send_event <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "PW94SJTGW6", "event": { "type": "message", "text": "hello world", "visibility": "all" } }'</span> </code></pre></div></div></div><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span> <span class="token property">"event_id"</span><span class="token operator">:</span> <span class="token string">"K600PKZON8"</span> <span class="token punctuation">}</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="upload-file" href="#upload-file" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#upload-file"><span class="icon icon-link"></span></a>Upload File</a></h4><p>Uploads a file to the server as a temporary file. It returns a URL that expires after 24 hours unless the URL is used in <a href="/docs/messaging/agent-chat-api/v3.4#send-event" class="css-kbi7q3"><code>send_event</code></a>.</p><h5 class="heading"><a id="specifics-13" href="#specifics-13" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-13"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/upload_file</code></td></tr><tr><td><strong>Required scopes</strong></td><td>-</td></tr><tr><td><strong>RTM API equivalent</strong></td><td>-</td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#incoming_event" class="css-kbi7q3"><code>incoming_event</code></a> <strong>*</strong></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>incoming_event</code> returns a URL that never expires.</p><h5 class="heading"><a id="request-12" href="#request-12" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-12"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>file</code></td><td>Yes</td><td><code>binary</code></td><td>maximum size: 10MB</td></tr></tbody></table></div></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/upload_file <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: multipart/form-data; boundary=--------------------------210197025774705439685896'</span> <span class="token punctuation">\</span> -H <span class="token string">'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'</span> <span class="token punctuation">\</span> -F <span class="token assign-left variable">file</span><span class="token operator">=</span>@/Users/MyAccount/Desktop/image.png </code></pre></div></div></div><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span> <span class="token property">"url"</span><span class="token operator">:</span> <span class="token string">"https://cdn.livechat-files.com/api/file/lc/att/8948324/45a3581b59a7295145c3825c86ec7ab3/image.png"</span> <span class="token punctuation">}</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="send-rich-message-postback" href="#send-rich-message-postback" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#send-rich-message-postback"><span class="icon icon-link"></span></a>Send Rich Message Postback</a></h4><h5 class="heading"><a id="specifics-14" href="#specifics-14" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-14"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/send_rich_message_postback</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#send-rich-message-postback" class="css-kbi7q3"><code>send_rich_message_postback</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#incoming_rich_message_postback" class="css-kbi7q3"><code>incoming_rich_message_postback</code></a><strong>*<!-- -->*<!-- -->*</strong></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to send a postback to a chat taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to send a postback to a chat taking place in groups that the requester (related to the token) is a member of. (The agent groups and the chat groups must overlap - at least one group must be in common.)</p><p><strong>*<!-- -->*<!-- -->*<!-- -->)</strong> <code>incoming_rich_message_postback</code> - to be sent only for active threads.</p><h5 class="heading"><a id="request-13" href="#request-13" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-13"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr><tr><td><code>event_id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr><tr><td><code>postback</code></td><td>Yes</td><td><code>object</code></td><td></td></tr><tr><td><code>postback.id</code></td><td>Yes</td><td><code>string</code></td><td>Postback name of the button</td></tr><tr><td><code>postback.toggled</code></td><td>Yes</td><td><code>bool</code></td><td>Postback toggled true/false</td></tr><tr><td><code>thread_id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr></tbody></table></div><h5 class="heading"><a id="response-10" href="#response-10" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-10"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/send_rich_message_postback <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "PJ0MRSHTDG", "thread_id": "K600PKZON8", "event_id": "a0c22fdd-fb71-40b5-bfc6-a8a0bc3117f7", "postback": { "id": "Method URL_yes", "toggled": true } }'</span> </code></pre></div></div></div></div></section><h3 class="heading"><a id="properties" href="#properties" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#properties"><span class="icon icon-link"></span></a>Properties</a></h3><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="update-chat-properties" href="#update-chat-properties" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#update-chat-properties"><span class="icon icon-link"></span></a>Update Chat Properties</a></h4><h5 class="heading"><a id="specifics-15" href="#specifics-15" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-15"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/update_chat_properties</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#update-chat-properties" class="css-kbi7q3"><code>update_chat_properties</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#chat_properties_updated" class="css-kbi7q3"><code>chat_properties_updated</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to update properties in a chat taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to update properties in a chat taking place in groups that the requester (related to the token) is a member of. (The agent groups and the chat groups must overlap - at least one group must be in common.)</p><h5 class="heading"><a id="request-14" href="#request-14" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-14"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the chat you to set properties for.</td></tr><tr><td><code>properties</code></td><td>Yes</td><td><code>object</code></td><td>Chat properties to set. You should stick to the <a href="/docs/management/configuration-api#properties">general properties format</a> and include <em>namespace</em>, <em>property name</em> and <em>value</em>.</td></tr></tbody></table></div><h5 class="heading"><a id="response-11" href="#response-11" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-11"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/update_chat_properties <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "id": "Q1VZR7AJCE", "properties": { "0805e283233042b37f460ed8fbf22160": { "string_property": "Chat property value updated by Agent" } } }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="delete-chat-properties" href="#delete-chat-properties" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#delete-chat-properties"><span class="icon icon-link"></span></a>Delete Chat Properties</a></h4><h5 class="heading"><a id="specifics-16" href="#specifics-16" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-16"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/delete_chat_properties</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#delete-chat-properties" class="css-kbi7q3"><code>delete_chat_properties</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#chat_properties_deleted" class="css-kbi7q3"><code>chat_properties_deleted</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to delete properties in a chat taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to delete properties in a chat taking place in groups that the requester (related to the token) is a member of. (The agent groups and the chat groups must overlap - at least one group must be in common.)</p><h5 class="heading"><a id="request-15" href="#request-15" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-15"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the chat you want to delete property of.</td></tr><tr><td><code>properties</code></td><td>Yes</td><td><code>object</code></td><td>Chat properties to delete.</td></tr></tbody></table></div><h5 class="heading"><a id="response-12" href="#response-12" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-12"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"> <span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/delete_chat_properties <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "id": "Q1VZR7AJCE", "properties": { "0805e283233042b37f460ed8fbf22160": [ "string_property" ] } }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="update-thread-properties" href="#update-thread-properties" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#update-thread-properties"><span class="icon icon-link"></span></a>Update Thread Properties</a></h4><h5 class="heading"><a id="specifics-17" href="#specifics-17" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-17"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/update_thread_properties</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#update-thread-properties" class="css-kbi7q3"><code>update_thread_properties</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#thread_properties_updated" class="css-kbi7q3"><code>thread_properties_updated</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to update properties in a thread taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to update properties in a thread taking place in groups that the requester (related to the token) is a member of. (The agent groups and the chat groups must overlap - at least one group must be in common.)</p><h5 class="heading"><a id="request-16" href="#request-16" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-16"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the chat you want to set properties for.</td></tr><tr><td><code>thread_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the thread you want to set properties for.</td></tr><tr><td><code>properties</code></td><td>Yes</td><td><code>object</code></td><td>Chat properties to set. You should stick to the <a href="/docs/management/configuration-api#properties">general properties format</a> and include <em>namespace</em>, <em>property name</em> and <em>value</em>.</td></tr></tbody></table></div><h5 class="heading"><a id="response-13" href="#response-13" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-13"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/update_thread_properties <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "Q1WZ073OA7", "thread_id": "Q1WZ073OB7", "properties": { "0805e283233042b37f460ed8fbf22160": { "string_property": "Chat thread property value updated by Agent" } } }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="delete-thread-properties" href="#delete-thread-properties" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#delete-thread-properties"><span class="icon icon-link"></span></a>Delete Thread Properties</a></h4><h5 class="heading"><a id="specifics-18" href="#specifics-18" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-18"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/delete_thread_properties</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#delete-thread-properties" class="css-kbi7q3"><code>delete_thread_properties</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#thread_properties_deleted" class="css-kbi7q3"><code>thread_properties_deleted</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to delete properties in a thread taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to delete properties in a thread taking place in groups that the requester (related to the token) is a member of. (The agent groups and the chat groups must overlap - at least one group must be in common.)</p><h5 class="heading"><a id="request-17" href="#request-17" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-17"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the chat you want to delete properties of.</td></tr><tr><td><code>thread_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the thread you want to delete properties of.</td></tr><tr><td><code>properties</code></td><td>Yes</td><td><code>object</code></td><td>Thread properties to delete.</td></tr></tbody></table></div><h5 class="heading"><a id="response-14" href="#response-14" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-14"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/delete_thread_properties <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "Q1WZ073OA7", "thread_id": "Q1WZ073OB7", "properties": { "0805e283233042b37f460ed8fbf22160": [ "string_property" ] } }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="update-event-properties" href="#update-event-properties" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#update-event-properties"><span class="icon icon-link"></span></a>Update Event Properties</a></h4><h5 class="heading"><a id="specifics-19" href="#specifics-19" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-19"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/update_event_properties</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#update-event-properties" class="css-kbi7q3"><code>update_event_properties</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#event_properties_updated" class="css-kbi7q3"><code>event_properties_updated</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to update properties in an event taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to update properties in an event taking place in groups that the requester (related to the token) is a member of. (The agent groups and the chat groups must overlap - at least one group must be in common.)</p><h5 class="heading"><a id="request-18" href="#request-18" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-18"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the chat you want to set properties for.</td></tr><tr><td><code>thread_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the thread you want to set properties for.</td></tr><tr><td><code>event_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the event you want to set properties for.</td></tr><tr><td><code>properties</code></td><td>Yes</td><td><code>object</code></td><td>Chat properties to set. You should stick to the <a href="/docs/management/configuration-api#properties">general properties format</a> and include <em>namespace</em>, <em>property name</em> and <em>value</em>.</td></tr></tbody></table></div><h5 class="heading"><a id="response-15" href="#response-15" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-15"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/update_event_properties <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "Q1GZ3FNAT9", "thread_id": "Q1GZ3FNAU9", "event_id": "Q1GZ3FNAU9_1", "properties": { "0805e283233042b37f460ed8fbf22160": { "string_property": "Event property value updated by Agent" } } }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="delete-event-properties" href="#delete-event-properties" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#delete-event-properties"><span class="icon icon-link"></span></a>Delete Event Properties</a></h4><h5 class="heading"><a id="specifics-20" href="#specifics-20" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-20"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/delete_event_properties</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#delete-event-properties" class="css-kbi7q3"><code>delete_event_properties</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#event_properties_deleted" class="css-kbi7q3"><code>event_properties_deleted</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to delete properties in an event taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to delete properties in an event taking place in groups that the requester (related to the token) is a member of. (The agent groups and the chat groups must overlap - at least one group must be in common.)</p><h5 class="heading"><a id="request-19" href="#request-19" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-19"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the chat you want to delete the properties of.</td></tr><tr><td><code>thread_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the thread you want to delete the properties of.</td></tr><tr><td><code>event_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the event you want to delete the properties of.</td></tr><tr><td><code>properties</code></td><td>Yes</td><td><code>object</code></td><td>Event properties to delete.</td></tr></tbody></table></div><h5 class="heading"><a id="response-16" href="#response-16" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-16"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/delete_event_properties <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "Q16ZSBGX3J", "thread_id": "Q16ZSBGX4J", "event_id": "Q16ZSBGX4J_1", "properties": { "0805e283233042b37f460ed8fbf22160": [ "string_property" ] } }'</span> </code></pre></div></div></div></div></section><h3 class="heading"><a id="thread-tags" href="#thread-tags" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#thread-tags"><span class="icon icon-link"></span></a>Thread tags</a></h3><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="tag-thread" href="#tag-thread" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#tag-thread"><span class="icon icon-link"></span></a>Tag Thread</a></h4><p>Tags a given <strong>thread</strong>. </p><p>Read how to <a href="/docs/management/configuration-api/v2.0#list-all-tags">list all available tags</a> and <a href="/docs/management/configuration-api/v2.0#add-a-tag">create a new tag</a>.</p><h5 class="heading"><a id="specifics-21" href="#specifics-21" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-21"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/tag_thread</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#tag-thread" class="css-kbi7q3"><code>tag_thread</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#thread_tagged" class="css-kbi7q3"><code>thread_tagged</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to tag a thread taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to tag a thread taking place in groups that the requester (related to the token) is a member of. (The agent groups and the chat groups must overlap - at least one group must be in common.)</p><h5 class="heading"><a id="request-20" href="#request-20" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-20"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the chat you want to add a tag to.</td></tr><tr><td><code>thread_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the thread you want to add a tag to.</td></tr><tr><td><code>tag</code></td><td>Yes</td><td><code>string</code></td><td>Tag name. It's case sensitive.</td></tr></tbody></table></div><h5 class="heading"><a id="response-17" href="#response-17" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-17"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/tag_thread <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "PW94SJTGW6", "thread_id": "PWS6GIKAKH", "tag": "support" }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="untag-thread" href="#untag-thread" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#untag-thread"><span class="icon icon-link"></span></a>Untag Thread</a></h4><p>Untags a given <strong>thread</strong>.</p><h5 class="heading"><a id="specifics-22" href="#specifics-22" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-22"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/untag_thread</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#untag-thread" class="css-kbi7q3"><code>untag_thread</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#thread_untagged" class="css-kbi7q3"><code>thread_untagged</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to untag a thread taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to untag a thread taking place in groups that the requester (related to the token) is a member of. (The agent groups and the chat groups must overlap - at least one group must be in common.)</p><h5 class="heading"><a id="request-21" href="#request-21" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-21"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the chat you want to remove a tag from.</td></tr><tr><td><code>thread_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the thread you want to remove a tag from.</td></tr><tr><td><code>tag</code></td><td>Yes</td><td><code>string</code></td><td>Tag name. It's case sensitive.</td></tr></tbody></table></div><h5 class="heading"><a id="response-18" href="#response-18" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-18"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/untag_thread <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "PW94SJTGW6", "thread_id": "PWS6GIKAKH", "tag": "support" }'</span> </code></pre></div></div></div></div></section><h3 class="heading"><a id="customers" href="#customers" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#customers"><span class="icon icon-link"></span></a>Customers</a></h3><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="get-customer" href="#get-customer" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#get-customer"><span class="icon icon-link"></span></a>Get Customer</a></h4><p>Returns the info about the Customer with a given <code>id</code>.</p><h5 class="heading"><a id="specifics-23" href="#specifics-23" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-23"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/get_customer</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>customers:ro</code></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#get-customer" class="css-kbi7q3"><code>get_customer</code></a></td></tr><tr><td><strong>Push message</strong></td><td>-</td></tr></tbody></table></div><h5 class="heading"><a id="request-22" href="#request-22" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-22"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td>Yes</td><td>string</td><td></td></tr></tbody></table></div><h5 class="heading"><a id="response-19" href="#response-19" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-19"><span class="icon icon-link"></span></a>Response</a></h5><div class="css-q76ucn"><table><thead><tr><th>Field</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td>string</td><td><a href="/docs/messaging/agent-chat-api/v3.4/data-structures#customer">Customer's</a> ID.</td></tr><tr><td><code>type</code></td><td>string</td><td><code>customer</code></td></tr><tr><td><code>name</code></td><td>string</td><td>Customer's name. Returned only if set.</td></tr><tr><td><code>email</code></td><td>string</td><td>Customer's email. Returned only if set.</td></tr><tr><td><code>avatar</code></td><td>string</td><td>Customer's avatar. Returned only if set.</td></tr><tr><td><code>created_at</code></td><td>string</td><td>Specifies when the customer's identity was created.</td></tr><tr><td><code>session_fields</code></td><td>[]object</td><td>An array of custom object-enclosed <code>key:value</code> pairs. Returned only if set. Available for the session duration.</td></tr><tr><td><code>statistics</code></td><td>object</td><td>Counters for started threads, opened pages, etc.</td></tr><tr><td><code>last_visit</code></td><td>object</td><td>Geolocation and opened pages from the customer's most recent online visit. Returned only if the customer logged in at least once.</td></tr><tr><td><code>chat_ids</code></td><td>[]string</td><td>IDs of a customer's chats. Returned only if the customer had at least one chat.</td></tr></tbody></table></div></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/get_customer <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "id": "b7eff798-f8df-4364-8059-649c35c9ed0c" }'</span> </code></pre></div></div></div><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span> <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"b7eff798-f8df-4364-8059-649c35c9ed0c"</span><span class="token punctuation">,</span> <span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">"customer"</span><span class="token punctuation">,</span> <span class="token property">"created_at"</span><span class="token operator">:</span> <span class="token string">"2017-10-11T15:19:21.010200Z"</span><span class="token punctuation">,</span> <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">"Thomas Anderson"</span><span class="token punctuation">,</span> <span class="token property">"email"</span><span class="token operator">:</span> <span class="token string">"t.anderson@example.com"</span><span class="token punctuation">,</span> <span class="token property">"avatar"</span><span class="token operator">:</span> <span class="token string">"example.com/avatars/1.jpg"</span><span class="token punctuation">,</span> <span class="token property">"session_fields"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span> <span class="token property">"custom_key"</span><span class="token operator">:</span> <span class="token string">"custom_value"</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> <span class="token property">"another_custom_key"</span><span class="token operator">:</span> <span class="token string">"another_custom_value"</span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"last_visit"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"started_at"</span><span class="token operator">:</span> <span class="token string">"2017-10-12T15:19:21.010200Z"</span><span class="token punctuation">,</span> <span class="token property">"ended_at"</span><span class="token operator">:</span> <span class="token string">"2017-10-12T15:20:22.010200Z"</span><span class="token punctuation">,</span> <span class="token property">"referrer"</span><span class="token operator">:</span> <span class="token string">"http://www.google.com/"</span><span class="token punctuation">,</span> <span class="token property">"ip"</span><span class="token operator">:</span> <span class="token string">"<customer_ip>"</span><span class="token punctuation">,</span> <span class="token property">"user_agent"</span><span class="token operator">:</span> <span class="token string">"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36"</span><span class="token punctuation">,</span> <span class="token property">"geolocation"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"latitude"</span><span class="token operator">:</span> <span class="token string">"-14.6973803"</span><span class="token punctuation">,</span> <span class="token property">"longitude"</span><span class="token operator">:</span> <span class="token string">"-75.1266898"</span><span class="token punctuation">,</span> <span class="token property">"country"</span><span class="token operator">:</span> <span class="token string">"Poland"</span><span class="token punctuation">,</span> <span class="token property">"country_code"</span><span class="token operator">:</span> <span class="token string">"PL"</span><span class="token punctuation">,</span> <span class="token property">"region"</span><span class="token operator">:</span> <span class="token string">"Dolnoslaskie"</span><span class="token punctuation">,</span> <span class="token property">"city"</span><span class="token operator">:</span> <span class="token string">"Wroclaw"</span><span class="token punctuation">,</span> <span class="token property">"timezone"</span><span class="token operator">:</span> <span class="token string">"Europe/Warsaw"</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"last_pages"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span> <span class="token property">"opened_at"</span><span class="token operator">:</span> <span class="token string">"2017-10-12T15:19:21.010200Z"</span><span class="token punctuation">,</span> <span class="token property">"url"</span><span class="token operator">:</span> <span class="token string">"https://www.livechat.com/"</span><span class="token punctuation">,</span> <span class="token property">"title"</span><span class="token operator">:</span> <span class="token string">"LiveChat - Homepage"</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> <span class="token property">"opened_at"</span><span class="token operator">:</span> <span class="token string">"2017-10-12T15:19:21.010200Z"</span><span class="token punctuation">,</span> <span class="token property">"url"</span><span class="token operator">:</span> <span class="token string">"https://www.livechat.com/tour"</span><span class="token punctuation">,</span> <span class="token property">"title"</span><span class="token operator">:</span> <span class="token string">"LiveChat - Tour"</span> <span class="token punctuation">}</span><span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"statistics"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"chats_count"</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token property">"threads_count"</span><span class="token operator">:</span> <span class="token number">9</span><span class="token punctuation">,</span> <span class="token property">"visits_count"</span><span class="token operator">:</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token property">"page_views_count"</span><span class="token operator">:</span> <span class="token number">1337</span><span class="token punctuation">,</span> <span class="token property">"greetings_shown_count"</span><span class="token operator">:</span> <span class="token number">69</span><span class="token punctuation">,</span> <span class="token property">"greetings_accepted_count"</span><span class="token operator">:</span> <span class="token number">42</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">"__priv_lc2_customer_id"</span><span class="token operator">:</span> <span class="token string">"test_771305.dafea66e5c"</span><span class="token punctuation">,</span> <span class="token comment">// old customer_id</span> <span class="token property">"agent_last_event_created_at"</span><span class="token operator">:</span> <span class="token string">"2017-10-12T15:19:21.010200Z"</span><span class="token punctuation">,</span> <span class="token property">"customer_last_event_created_at"</span><span class="token operator">:</span> <span class="token string">"2017-10-12T15:19:21.010200Z"</span><span class="token punctuation">,</span> <span class="token property">"chat_ids"</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">"PWJ8Y4THAV"</span> <span class="token punctuation">]</span> <span class="token punctuation">}</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="list-customers" href="#list-customers" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#list-customers"><span class="icon icon-link"></span></a>List Customers</a></h4><p>It returns the list of Customers.</p><h5 class="heading"><a id="specifics-24" href="#specifics-24" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-24"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/list_customers</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>customers:ro</code></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#list_customers" class="css-kbi7q3"><code>list_customers</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><h5 class="heading"><a id="request-23" href="#request-23" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-23"><span class="icon icon-link"></span></a>Request</a></h5><p>All parameters are optional.</p><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>page_id</code></td><td><code>string</code></td><td></td></tr><tr><td><code>limit</code></td><td><code>number</code></td><td>Default: 10, maximum: 100</td></tr><tr><td><code>sort_order</code> <strong>*</strong></td><td><code>string</code></td><td>Default: <code>desc</code></td></tr><tr><td><code>sort_by</code> <strong>*<!-- -->*</strong></td><td><code>string</code></td><td>Default: <code>created_at</code></td></tr><tr><td><code>filters</code></td><td><code>object</code></td><td></td></tr><tr><td><code>filters.country.<string_filter_type></code> <strong>*<!-- -->*<!-- -->*</strong></td><td><code>object</code></td><td></td></tr><tr><td><code>filters.email.<string_filter_type></code> <strong>*<!-- -->*<!-- -->*</strong></td><td><code>object</code></td><td></td></tr><tr><td><code>filters.name.<string_filter_type></code> <strong>*<!-- -->*<!-- -->*</strong></td><td><code>object</code></td><td></td></tr><tr><td><code>filters.customer_id.<string_filter_type></code> <strong>*<!-- -->*<!-- -->*</strong></td><td><code>object</code></td><td></td></tr><tr><td><code>filters.chats_count.<range_filter_type></code> <strong>*<!-- -->*<!-- -->*<!-- -->*</strong></td><td><code>object</code></td><td></td></tr><tr><td><code>filters.threads_count.<range_filter_type></code> <strong>*<!-- -->*<!-- -->*<!-- -->*</strong></td><td><code>object</code></td><td></td></tr><tr><td><code>filters.visits_count.<range_filter_type></code> <strong>*<!-- -->*<!-- -->*<!-- -->*</strong></td><td><code>object</code></td><td></td></tr><tr><td><code>filters.created_at.<date_range_filter_type></code><strong>*<!-- -->*<!-- -->*<!-- -->*<!-- -->*</strong></td><td><code>object</code></td><td></td></tr><tr><td><code>filters.agent_last_event_created_at.<date_range_filter_type></code> <strong>*<!-- -->*<!-- -->*<!-- -->*<!-- -->*</strong></td><td><code>object</code></td><td></td></tr><tr><td><code>filters.customer_last_event_created_at.<date_range_filter_type></code> <strong>*<!-- -->*<!-- -->*<!-- -->*<!-- -->*</strong></td><td><code>object</code></td><td></td></tr><tr><td><code>filters.chat_group_ids.<integer_filter_type></code> <strong>*<!-- -->*<!-- -->*</strong></td><td><code>object</code></td><td>Maximum 40 group ids at once</td></tr><tr><td><code>filters.include_customers_without_chats</code></td><td><code>bool</code></td><td></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong></p><p><code>sort_order</code> can take the following values:</p><ul><li><code>asc</code></li><li><code>desc</code></li></ul><p><strong>*<!-- -->*<!-- -->)</strong></p><p><code>sort_by</code> can take the following values:</p><ul><li><code>created_at</code></li><li><code>threads_count</code></li><li><code>visits_count</code></li><li><code>agent_last_event</code></li><li><code>customer_last_event</code></li></ul><p>When sorting by fields other than <code>created_at</code>, the entries with identical values will be additionally sorted by their creation time.</p><p><strong>*<!-- -->*<!-- -->*<!-- -->)</strong></p><p><code><string_filter_type></code> can take the following values :</p><ul><li><code>values</code> (<code>string[]</code> - an array of strings)</li><li><code>exclude_values</code> (<code>string[]</code> - an array of strings)</li></ul><p><code><integer_filter_type></code> can take the following values:</p><ul><li><code>values</code> (<code>int[]</code> - an array of integers)</li><li><code>exclude_values</code> (<code>int[]</code> - an array of integers)</li></ul><p>There's only one value allowed for a single filter.</p><p><strong>*<!-- -->*<!-- -->*<!-- -->*<!-- -->)</strong></p><p><code><range_filter_type></code> can take the following values:</p><ul><li><code>lte</code> (<code>int</code> - less than or equal to given value)</li><li><code>lt</code> (<code>int</code> - less than given value)</li><li><code>gte</code> (<code>int</code> - greater than or equal to given value)</li><li><code>gt</code> (<code>int</code> - greater than given value)</li><li><code>eq</code> (<code>int</code> - equal to given value)</li></ul><p><strong>*<!-- -->*<!-- -->*<!-- -->*<!-- -->*<!-- -->)</strong></p><p><code><date_range_filter_type></code> can take the following values:</p><ul><li><code>lte</code> ( <code>string</code> - less than or equal to given value)</li><li><code>lt</code> (<code>string</code> - less than given value)</li><li><code>gte</code> (<code>string</code> - greater than or equal to given value)</li><li><code>gt</code> (<code>string</code> - greater than given value)</li><li><code>eq</code> (<code>string</code> - equal to given value)</li></ul><p>Dates are represented in ISO 8601 format with microseconds resolution, e.g. <code>2017-10-12T15:19:21.010200+01:00</code> in specific timezone or <code>2017-10-12T14:19:21.010200Z</code> in UTC.</p><h5 class="heading"><a id="response-20" href="#response-20" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-20"><span class="icon icon-link"></span></a>Response</a></h5><div class="css-q76ucn"><table><thead><tr><th>Field</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>next_page_id</code></td><td><code>string</code></td><td>In relation to <code>page_id</code> specified in the request.</td></tr><tr><td><code>previous_page_id</code></td><td><code>string</code></td><td>In relation to <code>page_id</code> specified in the request.</td></tr></tbody></table></div></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/list_customers <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{}'</span> </code></pre></div></div></div><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span> <span class="token property">"customers"</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token comment">// array of "User > Customer" objects</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">"total_customers"</span><span class="token operator">:</span> <span class="token number">2340</span><span class="token punctuation">,</span> <span class="token property">"limited_customers"</span><span class="token operator">:</span> <span class="token number">120</span><span class="token punctuation">,</span> <span class="token comment">// optional</span> <span class="token property">"next_page_id"</span><span class="token operator">:</span> <span class="token string">"MTUxNzM5ODEzMTQ5Ng=="</span><span class="token punctuation">,</span> <span class="token comment">// optional</span> <span class="token property">"previous_page_id"</span><span class="token operator">:</span> <span class="token string">"MTUxNzM5ODEzMTQ5Ng=="</span> <span class="token comment">// optional</span> <span class="token punctuation">}</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="create-customer" href="#create-customer" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#create-customer"><span class="icon icon-link"></span></a>Create Customer</a></h4><p>Creates a new <a href="/docs/messaging/agent-chat-api/v3.4/data-structures#customer">Customer</a> user type.</p><h5 class="heading"><a id="specifics-25" href="#specifics-25" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-25"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/create_customer</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>customers:rw</code></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#create-customer" class="css-kbi7q3"><code>create_customer</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#incoming_customer" class="css-kbi7q3"><code>incoming_customer</code></a></td></tr></tbody></table></div><h5 class="heading"><a id="request-24" href="#request-24" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-24"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>name</code></td><td>No</td><td><code>string</code></td><td></td></tr><tr><td><code>email</code></td><td>No</td><td><code>string</code></td><td></td></tr><tr><td><code>avatar</code></td><td>No</td><td><code>string</code></td><td>URL of the Customer's avatar</td></tr><tr><td><code>session_fields</code></td><td>No</td><td><code>[]object</code></td><td>An array of custom object-enclosed <code>key:value</code> pairs. Respects the order of items.</td></tr></tbody></table></div></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/create_customer <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "name": "Thomas Anderson", "email": "t.anderson@example.com", "avatar": "https://example.com/avatars/1.png", "session_fields": [{ "custom_key": "custom_value" }, { "another_custom_key": "another_custom_value" }] }'</span> </code></pre></div></div></div><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span> <span class="token property">"customer_id"</span><span class="token operator">:</span> <span class="token string">"b7eff798-f8df-4364-8059-649c35c9ed0c"</span> <span class="token punctuation">}</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="update-customer" href="#update-customer" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#update-customer"><span class="icon icon-link"></span></a>Update Customer</a></h4><p>Updates Customer's properties.</p><h5 class="heading"><a id="specifics-26" href="#specifics-26" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-26"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/update_customer</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>customers:rw</code></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#update-customer" class="css-kbi7q3"><code>update_customer</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#customer_session_fields_updated" class="css-kbi7q3"><code>customer_session_fields_updated</code></a> <strong>*</strong></td></tr></tbody></table></div><p><strong>*</strong> The webhook will be sent only if the customer has active chats.</p><h5 class="heading"><a id="request-25" href="#request-25" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-25"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td>Yes</td><td><code>string</code></td><td>UUID v4 format is required</td></tr><tr><td><code>name</code></td><td>No</td><td><code>string</code></td><td></td></tr><tr><td><code>email</code></td><td>No</td><td><code>string</code></td><td></td></tr><tr><td><code>avatar</code></td><td>No</td><td><code>string</code></td><td>URL of the Customer's avatar</td></tr><tr><td><code>session_fields</code></td><td>No</td><td><code>[]object</code></td><td>An array of custom object-enclosed <code>key:value</code> pairs. Respects the order of items.</td></tr></tbody></table></div><p>Apart from <code>id</code>, which is a required parameter, you also need to include <strong>one of the optional</strong> parameters.</p><p>When updating customer data while the customer has an active chat, the update will take effect after the chat has ended.</p><h5 class="heading"><a id="response-21" href="#response-21" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-21"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/update_customer <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "id": "b7eff798-f8df-4364-8059-649c35c9ed0c", "name": "Thomas Anderson", "email": "t.anderson@example.com", "avatar": "https://example.com/avatars/1.png", "session_fields": [{ "custom_key": "custom_value" }, { "another_custom_key": "another_custom_value" }] }'</span> </code></pre></div></div></div><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span><span class="token punctuation">}</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="ban-customer" href="#ban-customer" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#ban-customer"><span class="icon icon-link"></span></a>Ban Customer</a></h4><p>Bans the customer for a specific period of time. It immediately disconnects all active sessions of this customer and does not accept new ones during the ban lifespan.</p><h5 class="heading"><a id="specifics-27" href="#specifics-27" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-27"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/ban_customer</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>customers.ban:rw</code></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#ban-customer" class="css-kbi7q3"><code>ban_customer</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><h5 class="heading"><a id="request-26" href="#request-26" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-26"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th></th></tr></thead><tbody><tr><td><code>id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr><tr><td><code>ban</code></td><td>Yes</td><td><code>object</code></td><td></td></tr><tr><td><code>ban.days</code></td><td>Yes</td><td><code>number</code></td><td></td></tr></tbody></table></div><h5 class="heading"><a id="response-22" href="#response-22" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-22"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/ban_customer <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "id": "b7eff798-f8df-4364-8059-649c35c9ed0c", "ban": { "days": 3 } }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="follow-customer" href="#follow-customer" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#follow-customer"><span class="icon icon-link"></span></a>Follow Customer</a></h4><p>Marks a customer as followed. As a result, the requester (an agent) will receive the info about all the changes related to that customer via pushes. Once the customer leaves the website or is <a href="/docs/messaging/agent-chat-api/v3.4#unfollow-customer">unfollowed</a>, the agent will no longer receive that information.</p><p>Following a customer causes the agent to receive customer-related pushes as long as the followed customer is available. The followed customer may be transferred to a group the agent doesn't have access to, which makes the customer unavailable to the agent. At that moment, the agent stops receiving pushes related to that customer. When the customer is transferred back and becomes available again, the pushes resume.</p><p>Agents don't need to follow the customers they're chatting with in order to receive related pushes. Agents will be receiving pushes related to those customers as long as the chats last.</p><h5 class="heading"><a id="specifics-28" href="#specifics-28" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-28"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/follow_customer</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>customers:ro</code></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#follow-customer" class="css-kbi7q3"><code>follow_customer</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><h5 class="heading"><a id="request-27" href="#request-27" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-27"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th></th></tr></thead><tbody><tr><td><code>id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr></tbody></table></div><h5 class="heading"><a id="response-23" href="#response-23" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-23"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/follow_customer <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "id": "b7eff798-f8df-4364-8059-649c35c9ed0c" }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="unfollow-customer" href="#unfollow-customer" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#unfollow-customer"><span class="icon icon-link"></span></a>Unfollow Customer</a></h4><p>Removes the agent from the list of customer's followers. Calling this method on a customer the agent's chatting with will result in success, however, the agent will still receive pushes about the customer's data updates. The unfollowing will take effect once the chat ends.</p><h5 class="heading"><a id="specifics-29" href="#specifics-29" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-29"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/unfollow_customer</code></td></tr><tr><td><strong>Required scopes</strong></td><td>-</td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#unfollow-customer" class="css-kbi7q3"><code>unfollow_customer</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><h5 class="heading"><a id="request-28" href="#request-28" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-28"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th></th></tr></thead><tbody><tr><td><code>id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr></tbody></table></div><h5 class="heading"><a id="response-24" href="#response-24" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-24"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/unfollow_customer <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "id": "b7eff798-f8df-4364-8059-649c35c9ed0c" }'</span> </code></pre></div></div></div></div></section><h3 class="heading"><a id="status" href="#status" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#status"><span class="icon icon-link"></span></a>Status</a></h3><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="set-routing-status" href="#set-routing-status" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#set-routing-status"><span class="icon icon-link"></span></a>Set Routing Status</a></h4><p>Changes the status of an Agent or a Bot Agent.</p><h5 class="heading"><a id="specifics-30" href="#specifics-30" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-30"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/set_routing_status</code></td></tr><tr><td><strong>Required scopes</strong></td><td>for Agents: <code>agents--my:rw</code> <strong>*</strong> or <code>agents--all:rw</code> <strong>*<!-- -->*</strong>; for Bot Agents: <code>agents-bot--my:rw</code> <strong>*<!-- -->*<!-- -->*</strong> or <code>agents-bot--all:rw</code> <strong>*<!-- -->*<!-- -->*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#set-routing-status" class="css-kbi7q3"><code>set_routing_status</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#routing_status_set" class="css-kbi7q3"><code>routing_status_set</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>agents--my:rw</code> - to set my routing status.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>agents--all:rw</code> - to set the routing status of any agent within a license.</p><p><strong>*<!-- -->*<!-- -->*<!-- -->)</strong> <code>agents-bot--my:rw</code> - to set the routing status of bots that belong to the <code>client_id</code> related to the token (within a license).</p><p><strong>*<!-- -->*<!-- -->*<!-- -->*<!-- -->)</strong> <code>agents-bot--all:rw</code> - to set the routing status of any bots within a license.</p><h5 class="heading"><a id="request-29" href="#request-29" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-29"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>status</code></td><td>Yes</td><td><code>string</code></td><td>For Agents: <code>accepting_chats</code> or <code>not_accepting_chats</code>; for Bot Agents: <code>accepting_chats</code>, <code>not_accepting_chats</code>, or <code>offline</code></td></tr><tr><td><code>agent_id</code></td><td>No</td><td><code>string</code></td><td>If not specified, the requester's status will be updated.</td></tr></tbody></table></div><h5 class="heading"><a id="response-25" href="#response-25" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-25"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/set_routing_status <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "status": "accepting_chats", "agent_id": "smith@example.com" }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="list-routing-statuses" href="#list-routing-statuses" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#list-routing-statuses"><span class="icon icon-link"></span></a>List Routing Statuses</a></h4><p>Returns the current routing status of each agent selected by the provided filters.</p><h5 class="heading"><a id="specifics-31" href="#specifics-31" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-31"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/list_routing_statuses</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>agents--all:ro</code> <strong>*</strong> and <code>agents-bot--all:ro</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#list-routing-statuses" class="css-kbi7q3"><code>list_routing_statuses</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>agents--all:ro</code> - to list statuses of agents.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>agents-bot--all:ro</code> - to list statuses of bots.</p><h5 class="heading"><a id="request-30" href="#request-30" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-30"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>filters</code></td><td>No</td><td><code>object</code></td><td></td></tr><tr><td><code>filters.group_ids</code></td><td>No</td><td><code>array</code></td><td></td></tr></tbody></table></div></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/list_routing_statuses <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "filters": { "group_ids": [ 0 ] } }'</span> </code></pre></div></div></div><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token punctuation">[</span><span class="token punctuation">{</span> <span class="token string">"agent_id"</span><span class="token builtin class-name">:</span> <span class="token string">"smith@example.com"</span>, <span class="token string">"status"</span><span class="token builtin class-name">:</span> <span class="token string">"accepting_chats"</span> <span class="token punctuation">}</span>, <span class="token punctuation">{</span> <span class="token string">"agent_id"</span><span class="token builtin class-name">:</span> <span class="token string">"agent@example.com"</span>, <span class="token string">"status"</span><span class="token builtin class-name">:</span> <span class="token string">"not_accepting_chats"</span> <span class="token punctuation">}</span><span class="token punctuation">]</span> </code></pre></div></div></div></div></section><h3 class="heading"><a id="other" href="#other" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#other"><span class="icon icon-link"></span></a>Other</a></h3><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="mark-events-as-seen" href="#mark-events-as-seen" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#mark-events-as-seen"><span class="icon icon-link"></span></a>Mark Events as Seen</a></h4><p>It marks an agent’s events up to a specific time as read in a customer’s chat window.</p><h5 class="heading"><a id="specifics-32" href="#specifics-32" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-32"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/mark_events_as_seen</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:ro</code> <strong>*</strong> or <code>chats--access:ro</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#mark-events-as-seen" class="css-kbi7q3"><code>mark_events_as_seen</code></a></td></tr><tr><td><strong>Webhook</strong></td><td><a href="/docs/management/webhooks/v3.4#events_marked_as_seen" class="css-kbi7q3"><code>events_marked_as_seen</code></a></td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:ro</code> - to mark events as seen in a chat taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:ro</code> - to mark events as seen in a chat taking place in groups that the requester (related to the token) is a member of (the agent groups and the chat groups must intersect - at least one group must be common).</p><h5 class="heading"><a id="request-31" href="#request-31" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-31"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td></td></tr><tr><td><code>seen_up_to</code></td><td>Yes</td><td><code>string</code></td><td>RFC 3339 date-time format</td></tr></tbody></table></div><h5 class="heading"><a id="response-26" href="#response-26" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-26"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/mark_events_as_seen <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "PJ0MRSHTDG", "seen_up_to": "2017-10-12T15:19:21.010200Z" }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="send-typing-indicator" href="#send-typing-indicator" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#send-typing-indicator"><span class="icon icon-link"></span></a>Send Typing Indicator</a></h4><h5 class="heading"><a id="specifics-33" href="#specifics-33" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-33"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/send_typing_indicator</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>chats--all:rw</code> <strong>*</strong> or <code>chats--access:rw</code> <strong>*<!-- -->*</strong></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#send-typing-indicator" class="css-kbi7q3"><code>send_typing_indicator</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>chats--all:rw</code> - to send the typing indicator to a chat taking place in any group.</p><p><strong>*<!-- -->*<!-- -->)</strong> <code>chats--access:rw</code> - to send the typing indicator to a chat taking place in groups that the requester (related to the token) is a member of (the agent groups and the chat groups must intersect - at least one group must be common).</p><h5 class="heading"><a id="request-32" href="#request-32" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-32"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td>Id of the chat that to send the typing indicator to.</td></tr><tr><td><code>visibility</code></td><td>No</td><td><code>string</code></td><td>Default: <code>all</code>; <code>agents</code></td></tr><tr><td><code>is_typing</code></td><td>Yes</td><td><code>bool</code></td><td></td></tr></tbody></table></div><h5 class="heading"><a id="response-27" href="#response-27" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#response-27"><span class="icon icon-link"></span></a>Response</a></h5><p>No response payload (<code>200 OK</code>).</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/send_typing_indicator <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "PJ0MRSHTDG", "is_typing": true }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="multicast" href="#multicast" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#multicast"><span class="icon icon-link"></span></a>Multicast</a></h4><p>This method serves for the <strong>chat-unrelated communication</strong>. Messages sent using <code>multicast</code> are not being saved.</p><p>For example, it could be used in an app that sends notifications to Agents or Customers, when a certain condition is met (e.g. an important Customer started the chat).</p><h5 class="heading"><a id="specifics-34" href="#specifics-34" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-34"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/multicast</code></td></tr><tr><td><strong>Required scopes</strong></td><td><code>multicast:rw</code></td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#multicast" class="css-kbi7q3"><code>multicast</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><h5 class="heading"><a id="request-33" href="#request-33" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-33"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>recipients</code></td><td>Yes</td><td><code>object</code></td><td><strong>*</strong></td></tr><tr><td><code>content</code></td><td>Yes</td><td><code>any</code></td><td>A JSON message to be sent</td></tr><tr><td><code>type</code></td><td>No</td><td><code>string</code></td><td>Multicast message type</td></tr></tbody></table></div><p><strong>*<!-- -->)</strong> <code>recipients</code> can take the following values:</p><ul><li><p><code>agents</code>:</p><ul><li><code>all</code> (<code>bool</code> - includes all agents)</li><li><code>ids</code> (<code>[]string</code> - an array of agents' IDs)</li><li><code>groups</code> (<code>[]string</code> - an array of groups' IDs)</li></ul></li><li><p><code>customers</code>:</p><ul><li><code>ids</code> (<code>[]string</code> - an array of customer's IDs)</li></ul></li></ul><p>At least one <code>recipients</code> type (<code>agents.all</code>, <code>agents.ids</code>, <code>agents.groups</code>, <code>customers.ids</code>) is required.</p></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/multicast <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "recipients": { "agents": { "all": true, "ids": [ "smith@example.com", "agent@example.com" ], "groups": [ 1, 2 ] }, "customers": { "ids": [ "b7eff798-f8df-4364-8059-649c35c9ed0c" ] } }, "content": { "example": { "nested": "json" } } }'</span> </code></pre></div></div></div></div></section><section class="css-v24v0q"><div class="css-11ycufd"><h4 class="heading"><a id="list-agents-for-transfer" href="#list-agents-for-transfer" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#list-agents-for-transfer"><span class="icon icon-link"></span></a>List Agents For Transfer</a></h4><p>It returns the Agents you can transfer a chat to. Agents are sorted ascendingly by the total number of active chats they have. Note that:</p><ul><li>The method only returns Agents with statuses <strong>online</strong> and <strong>not accepting chats</strong>. Offline Agents aren't returned.</li><li>Only chats <strong>with Customers</strong> are taken into account in <code>total_active_chats</code>.</li></ul><h5 class="heading"><a id="specifics-35" href="#specifics-35" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#specifics-35"><span class="icon icon-link"></span></a>Specifics</a></h5><div class="css-q76ucn"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Method URL</strong></td><td><code>https://api.livechatinc.com/v3.4/agent/action/list_agents_for_transfer</code></td></tr><tr><td><strong>Required scopes</strong></td><td>-</td></tr><tr><td><strong>RTM API equivalent</strong></td><td><a href="/docs/messaging/agent-chat-api/v3.4/rtm-reference#list-agents-for-transfer" class="css-kbi7q3"><code>list_agents_for_transfer</code></a></td></tr><tr><td><strong>Webhook</strong></td><td>-</td></tr></tbody></table></div><h5 class="heading"><a id="request-34" href="#request-34" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#request-34"><span class="icon icon-link"></span></a>Request</a></h5><div class="css-q76ucn"><table><thead><tr><th>Parameter</th><th>Required</th><th>Data type</th><th>Notes</th></tr></thead><tbody><tr><td><code>chat_id</code></td><td>Yes</td><td><code>string</code></td><td>The ID of the chat you want to transfer</td></tr></tbody></table></div></div><div class="css-17buymi"><div class="css-16prjg8"><div class="css-13hnul0"><code class="code-sample-header">REQUEST</code><div class="css-1sg2lsz"><div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token function">curl</span> -X POST <span class="token punctuation">\</span> https://api.livechatinc.com/v3.4/agent/action/list_agents_for_transfer <span class="token punctuation">\</span> -H <span class="token string">'Authorization: Bearer <your_access_token>'</span> <span class="token punctuation">\</span> -H <span class="token string">'Content-Type: application/json'</span> <span class="token punctuation">\</span> -d <span class="token string">'{ "chat_id": "PJ0MRSHTDG" }'</span> </code></pre></div></div></div><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Response</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-shell"><code class="language-shell"><span class="token punctuation">[</span><span class="token punctuation">{</span> <span class="token string">"agent_id"</span><span class="token builtin class-name">:</span> <span class="token string">"smith@example.com"</span>, <span class="token string">"total_active_chats"</span><span class="token builtin class-name">:</span> <span class="token number">2</span> <span class="token punctuation">}</span>, <span class="token punctuation">{</span> <span class="token string">"agent_id"</span><span class="token builtin class-name">:</span> <span class="token string">"agent@example.com"</span>, <span class="token string">"total_active_chats"</span><span class="token builtin class-name">:</span> <span class="token number">5</span> <span class="token punctuation">}</span><span class="token punctuation">]</span> </code></pre></div></div></div></div></section><h2 class="heading css-1679d3t"><a id="webhooks" href="#webhooks" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#webhooks"><span class="icon icon-link"></span></a>Webhooks</a></h2><p>Here's what you need to know about <strong>webhooks</strong>:</p><ul><li>Webhooks notify you when specific events are triggered.</li><li>They can be generated by both Web and RTM API actions.</li><li>When using RTM API, you can be also notified about events with <a href="/docs/messaging/agent-chat-api/rtm-pushes">pushes</a>.</li><li>Webhooks and pushes have similar payloads.</li><li>There's a limit of three weebhoks for every action a Client ID can register.</li></ul><p>You can create and manage webhooks via the <a href="/docs/management/configuration-api#webhooks">Configuration API</a>.</p><style data-emotion-css="9mlxei">.css-9mlxei{font-weight:600;cursor:pointer;}.css-9mlxei:after{content:"";width:16px;height:16px;display:inline-block;vertical-align:middle;margin-bottom:1px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z' fill='%232200ff'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");}</style><a class="css-9mlxei">See webhook methods</a><a class="css-9mlxei">See webhook payloads</a><h2 class="heading css-1679d3t"><a id="errors" href="#errors" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#errors"><span class="icon icon-link"></span></a>Errors</a></h2><div class="css-1vuwrgc"><div class="css-iwgofq"><span class="css-w6gvpm">Format of error payload</span> <div class="css-1wp1vo7"><div class="css-xnt8k0"><div class="css-6oazep"><div class="css-11ycufd">Copied!</div></div><div class="css-139ndot"><svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z" fill="currentColor"></path></svg></div></div></div></div><div class="css-ju12u0"><div class="remark-highlight"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span> <span class="token property">"error"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">"misdirected_request"</span><span class="token punctuation">,</span> <span class="token property">"message"</span><span class="token operator">:</span> <span class="token string">"Wrong region"</span><span class="token punctuation">,</span> <span class="token property">"data"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token comment">// optional</span> <span class="token property">"region"</span><span class="token operator">:</span> <span class="token string">"dal"</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span> </code></pre></div></div></div><h3 class="heading"><a id="possible-errors" href="#possible-errors" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#possible-errors"><span class="icon icon-link"></span></a>Possible errors</a></h3><div class="css-q76ucn"><table><thead><tr><th>Error type</th><th>Default message</th><th>Description</th></tr></thead><tbody><tr><td><code class="language-text">agent_offline</code></td><td>Agent offline</td><td>The server couldn't process the request because the agent was offline.</td></tr><tr><td><code class="language-text">authentication</code></td><td>Authentication error</td><td>An invalid or expired access token.</td></tr><tr><td><code class="language-text">authorization</code></td><td>Authorization error</td><td>User is not allowed to perform the action.</td></tr><tr><td><code class="language-text">chat_inactive</code></td><td>Chat is inactive</td><td>An action that requires an active thread performed on a chat with no active threads.</td></tr><tr><td><code class="language-text">entity_too_large</code></td><td>Upload limit exceeded (10MB).</td><td>Client's request is too large.</td></tr><tr><td><code class="language-text">internal</code></td><td>Internal server error</td><td></td></tr><tr><td><code class="language-text">license_expired</code></td><td>License expired</td><td>The end of license trial or subcription.</td></tr><tr><td><code class="language-text">license_not_found</code></td><td>License not found</td><td>License with the specified ID doesn't exist.</td></tr><tr><td><code class="language-text">limit_reached</code></td><td>Limit reached</td><td>Resource cannot be created/modified because the change would exceed the limit</td></tr><tr><td><code class="language-text">misdirected_request</code></td><td>Wrong region</td><td>Client's request should be performed to another region. The correct region is returned in the optional data object – this is where the client should be connected.</td></tr><tr><td><code class="language-text">missing_access</code></td><td>Missing access</td><td>The requester doesn't have access to a given resource.</td></tr><tr><td><code class="language-text">not_found</code></td><td>Not found</td><td>The requested resource wasn't found.</td></tr><tr><td><code class="language-text">request_timeout</code></td><td>Request timed out</td><td>Timeout threshold is 15 seconds.</td></tr><tr><td><code class="language-text">service_unavailable</code></td><td>Service unavailable</td><td>New requests are temporarily not being accepted.</td></tr><tr><td><code class="language-text">too_many_requests</code></td><td>Too many requests</td><td>The request's rate limit was exceeded. It'll be unblocked automatically after some time.</td></tr><tr><td><code class="language-text">unsupported_version</code></td><td>Cannot call unsupported API versions.</td><td>Unsupported protocol version.</td></tr><tr><td><code class="language-text">validation</code></td><td>Wrong format of request</td><td></td></tr><tr><td><code class="language-text">wrong_product_version</code></td><td>Wrong product version</td><td>License is not LiveChat 3 (probably still LiveChat 2).</td></tr></tbody></table></div><h2 class="heading css-1679d3t"><a id="contact-us" href="#contact-us" class="reference css-180507a"><a href="/docs/messaging/agent-chat-api/v3.4#contact-us"><span class="icon icon-link"></span></a>Contact us</a></h2><p>If you found a bug or a typo, you can let us know directly on GitHub. In case of any questions or feedback, don't hesitate to contact us at <a href="mailto:developers@text.com">developers@text.com</a>. We'll be happy to hear from you!</p><style data-emotion-css="1fsewzh">.css-1fsewzh{margin-top:50px;}.css-1fsewzh > label{margin:0 0 5px 0;}.css-1fsewzh label + div{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}</style></article></div><p>...</p></div><style data-emotion-css="1mpu5jj">.css-1mpu5jj{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:space-evenly;-webkit-justify-content:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly;-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;background-color:#f6f6f7;color:#424d57;min-height:248px;margin-bottom:45px;}@media (min-width:768px){.css-1mpu5jj{margin-bottom:0px;}}</style><div class="css-1mpu5jj"><style data-emotion-css="dtzkur">.css-dtzkur{width:100%;padding:20px;}@media (min-width:768px){.css-dtzkur{margin-top:75px;padding:0;width:160px;}}</style><div class="css-dtzkur"><style data-emotion-css="r8rj3w">.css-r8rj3w{font-weight:600;font-size:16px;line-height:24px;color:#424d57;}</style><div class="css-r8rj3w">Join the community</div><style data-emotion-css="1ws0nkq">.css-1ws0nkq{font-weight:400;font-size:12px;line-height:20px;color:#424d57;}</style><div class="css-1ws0nkq">Get in direct contact with us through Discord.</div><style data-emotion-css="652pjx">.css-652pjx:hover{-webkit-text-decoration:none;text-decoration:none;}</style><a href="https://discord.gg/MGFyhbdFxt" target="_blank" rel="noopener noreferrer" class="css-652pjx"><style data-emotion-css="y77wuh">.css-y77wuh{margin-top:5px;}</style><button class="lc-btn lc-btn--secondary lc-btn--compact css-y77wuh" type="button"><i class="lc-btn__icon lc-btn__icon-left"><svg width="20" height="16" viewBox="0 0 20 16" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_613_10386)"><path d="M16.9308 1.63294C15.6561 1.04804 14.2892 0.617109 12.8599 0.370298C12.8339 0.365535 12.8079 0.377439 12.7945 0.401247C12.6187 0.713926 12.4239 1.12184 12.2876 1.44246C10.7503 1.21232 9.22099 1.21232 7.71527 1.44246C7.57887 1.11471 7.37707 0.713926 7.20048 0.401247C7.18707 0.378233 7.16107 0.366329 7.13504 0.370298C5.70659 0.616321 4.33963 1.04725 3.06411 1.63294C3.05307 1.6377 3.04361 1.64564 3.03732 1.65595C0.444493 5.52959 -0.265792 9.30801 0.0826501 13.0396C0.0842267 13.0578 0.0944749 13.0753 0.108665 13.0864C1.81934 14.3427 3.47642 15.1054 5.10273 15.6109C5.12876 15.6188 5.15634 15.6093 5.1729 15.5879C5.55761 15.0625 5.90054 14.5086 6.19456 13.926C6.21192 13.8919 6.19535 13.8514 6.15989 13.838C5.61594 13.6316 5.098 13.38 4.59977 13.0943C4.56037 13.0713 4.55721 13.015 4.59347 12.988C4.69831 12.9094 4.80318 12.8277 4.9033 12.7451C4.92141 12.7301 4.94665 12.7269 4.96794 12.7364C8.24107 14.2308 11.7846 14.2308 15.0191 12.7364C15.0404 12.7261 15.0657 12.7293 15.0846 12.7443C15.1847 12.8269 15.2895 12.9094 15.3952 12.988C15.4314 13.015 15.4291 13.0713 15.3897 13.0943C14.8914 13.3856 14.3735 13.6316 13.8288 13.8372C13.7933 13.8507 13.7775 13.8919 13.7949 13.926C14.0952 14.5078 14.4381 15.0617 14.8157 15.5871C14.8315 15.6093 14.8599 15.6188 14.8859 15.6109C16.5201 15.1054 18.1772 14.3427 19.8879 13.0864C19.9028 13.0753 19.9123 13.0586 19.9139 13.0404C20.3309 8.72626 19.2154 4.97883 16.9568 1.65674C16.9513 1.64564 16.9419 1.6377 16.9308 1.63294ZM6.68335 10.7674C5.69792 10.7674 4.88594 9.86274 4.88594 8.75167C4.88594 7.6406 5.68217 6.7359 6.68335 6.7359C7.69239 6.7359 8.49651 7.64855 8.48073 8.75167C8.48073 9.86274 7.68451 10.7674 6.68335 10.7674ZM13.329 10.7674C12.3435 10.7674 11.5316 9.86274 11.5316 8.75167C11.5316 7.6406 12.3278 6.7359 13.329 6.7359C14.338 6.7359 15.1421 7.64855 15.1264 8.75167C15.1264 9.86274 14.338 10.7674 13.329 10.7674Z" fill="#424D57"></path></g><defs><clipPath id="clip0_613_10386"><rect width="20" height="15.493" fill="white" transform="translate(0 0.25354)"></rect></clipPath></defs></svg></i><div>Discord</div></button></a></div><div class="css-dtzkur"><div class="css-r8rj3w">Follow us</div><div class="css-1ws0nkq">Follow our insightful tweets and interact with our content.</div><a href="https://twitter.com/TextPlatform" target="_blank" rel="noopener noreferrer" class="css-652pjx"><button class="lc-btn lc-btn--secondary lc-btn--compact css-y77wuh" type="button"><i class="lc-btn__icon lc-btn__icon-left"><svg width="24" height="24" class="rmi rmi-twitter undefined" viewBox="0 0 24 24"><path d="M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z"></path></svg></i><div>Twitter</div></button></a></div><div class="css-dtzkur"><div class="css-r8rj3w">Contribute</div><div class="css-1ws0nkq">See something that's wrong or unclear? Submit a pull request.</div><a href="https://github.com/livechat/livechat-public-docs" target="_blank" rel="noopener noreferrer" class="css-652pjx"><button class="lc-btn lc-btn--secondary lc-btn--compact css-y77wuh" type="button"><i class="lc-btn__icon lc-btn__icon-left"><svg width="24" height="24" class="rmi rmi-github undefined" viewBox="0 0 24 24"><path d="M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34-.46-1.16-1.11-1.47-1.11-1.47-.91-.62.07-.6.07-.6 1 .07 1.53 1.03 1.53 1.03.87 1.52 2.34 1.07 2.91.83.09-.65.35-1.09.63-1.34-2.22-.25-4.55-1.11-4.55-4.92 0-1.11.38-2 1.03-2.71-.1-.25-.45-1.29.1-2.64 0 0 .84-.27 2.75 1.02.79-.22 1.65-.33 2.5-.33.85 0 1.71.11 2.5.33 1.91-1.29 2.75-1.02 2.75-1.02.55 1.35.2 2.39.1 2.64.65.71 1.03 1.6 1.03 2.71 0 3.82-2.34 4.66-4.57 4.91.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2z"></path></svg></i><div>GitHub</div></button></a></div><div class="css-dtzkur"><div class="css-r8rj3w">Contact us</div><div class="css-1ws0nkq">Want to share feedback? Reach us at:<!-- --> <a href="mailto:developers@text.com">developers@text.com</a></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/messaging/agent-chat-api/v3.4","query":{},"buildId":"ZDoVZU63IjQ721nQeq0p6","assetPrefix":"/docs","runtimeConfig":{},"nextExport":true,"autoExport":true,"isFallback":false}</script><script nomodule="" src="/docs/_next/static/chunks/polyfills-c2dc1d9251306528e50c.js"></script><script src="/docs/_next/static/chunks/webpack-af19fbe32e13fc779465.js" async=""></script><script src="/docs/_next/static/chunks/framework.57a22ac5870571c2eff5.js" async=""></script><script src="/docs/_next/static/chunks/commons.0889bf71124535c6c4cd.js" async=""></script><script src="/docs/_next/static/chunks/main-7bb61c4f8d40f1e634e9.js" async=""></script><script src="/docs/_next/static/chunks/pages/_app-cdbe91fdfdbd305577ef.js" async=""></script><script src="/docs/_next/static/chunks/f66b9295.f9eceaafe4216b86326e.js" async=""></script><script src="/docs/_next/static/chunks/b31dc3a52fd33fe1943f491eae223576a0413e10.a959722d54aa3f55ce3f.js" async=""></script><script src="/docs/_next/static/chunks/067aff065064306958fa97cea949633bebf95d70.dede6f8249fbb82aff52.js" async=""></script><script src="/docs/_next/static/chunks/pages/messaging/agent-chat-api/v3.4-1174c12e7e192cd09d5c.js" async=""></script><script src="/docs/_next/static/ZDoVZU63IjQ721nQeq0p6/_buildManifest.js" async=""></script><script src="/docs/_next/static/ZDoVZU63IjQ721nQeq0p6/_ssgManifest.js" async=""></script></body></html>