{"info":{"_postman_id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","name":"LiveChat REST API","description":"<html><head></head><body><h2 id=\"introduction\">Introduction</h2>\n<p>Welcome to the LiveChat API documentation!</p>\n<p>Our API provides a set of flexible tools which you can use to create new outstanding projects. We smile a bit more each time we see skilled developers unleash their creativity!</p>\n<p>Please note that this documentation refers to the latest API version: 2.0. If you are looking for the previous version, check out the deprecated API 1.0 documentation.</p>\n<h2 id=\"basic-api-usage\">Basic API usage</h2>\n<p>All LiveChat API requests start with  <code>https://api.livechatinc.com/</code>.</p>\n<p>Please note that all LiveChat API requests must use `HTTPS` protocol.</p>\n<p>The next segment of the URL path depends on the type of your request. For example, use:  <code>https://api.livechatinc.com/agents</code>  to get or modify the agents data.</p>\n<p>All requests must have `X-API-VERSION` header set to the number of the version that you'd like to use. The most recent version is 2.</p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Two common authentication methods are supported:  <strong>OAuth 2.0</strong>  and  <strong>API key</strong>.</p>\n<h3 id=\"oauth-20\">OAuth 2.0</h3>\n<p>OAuth 2.0 authentication is the recommended way of authenticating to LiveChat API.</p>\n<p>It is the most secure way of making API calls. With this flow, you will get access only to some parts of LiveChat account, such as reading agents list. This is more secure than  <a href=\"https://docs.livechatinc.com/rest-api/#api-key\">API key flow</a>  which has always access to all LiveChat account data.</p>\n<p>To start using OAuth 2.0, please read a dedicated  <a href=\"https://docs.livechatinc.com/authorization\">Authorization</a>  guide.</p>\n<h3 id=\"api-key\">API key</h3>\n<p>If you want to build a private app that will run on your own server, you can skip the OAuth 2.0 flow and use the API key. Please note this flow of making API calls is less secure because the API key gives access to all LiveChat account data.</p>\n<p>With this authorization method, you will need to include your LiveChat login and  <code>API_KEY</code>  for each method call. You’ll find the API key in  <a href=\"https://my.livechatinc.com/agents/api-key\">your LiveChat profile</a>.</p>\n<p>Authentication to the API occurs via  <a href=\"http://en.wikipedia.org/wiki/Basic_access_authentication\">HTTP Basic Auth</a>. Provide your  <code>login</code>  as the basic auth username and the  <code>API_KEY</code>  as the password. You must authenticate for all requests.</p>\n<p>All API requests must be made over HTTPS.</p>\n<h2 id=\"data-format\">Data format</h2>\n<p>The LiveChat API returns the data in the  <a href=\"http://en.wikipedia.org/wiki/JSON\">JSON</a>  format. Check out the following example.</p>\n<h2 id=\"jsonp\">JSONP</h2>\n<p>All requests made with HTTP GET are  <a href=\"http://en.wikipedia.org/wiki/JSONP\">JSONP</a>-enabled. To use JSONP, append  <code>callback=</code>  and the name of your callback function to the request.</p>\n<h2 id=\"error-handling\">Error handling</h2>\n<p>The errors are returned using the standard HTTP error code syntax. In general, the codes in the 2xx range indicate success, the codes in the 4xx range indicate an error (incorrect or missing parameters, not authenticated etc.), and the codes in the 5xx range indicate an error with the LiveChat servers. Any additional info is included in the body of the return call, JSON-formatted.</p>\n<h3 id=\"http-status-codes-summary\">HTTP status codes summary</h3>\n<ul>\n<li><code>400</code>  – The request is incorrect, please make sure that the passed arguments are matching the format in the method’s documentation.</li>\n<li><code>401</code>  – Unauthorized. You attempt to authenticate with an invalid username or API key.</li>\n<li><code>404</code>  – Not Found. You attempt to request a resource which doesn’t exist.</li>\n<li><code>500</code>  – Internal Server Error. Something unexpected happened on our end. Please try again or contact our support.</li>\n</ul>\n<h2 id=\"cross-domain\">Cross-domain</h2>\n<p>All cross-domain API requests made by a web browser are denied for security reasons. It means that the browser-based requests are not allowed from 3rd party domains (including  <code>localhost</code>).</p>\n<h2 id=\"livechat-api-libraries\">LiveChat API libraries</h2>\n<p>All API calls include an API key that can be easily stolen when making a request using a web browser. It means you should use backend languages for API requests. Here is a list of the ready-to-use libraries:</p>\n<ul>\n<li><a href=\"https://github.com/livechat/api-client-php\">PHP library for LiveChat API</a>, hosted on Github.</li>\n<li><a href=\"https://github.com/livechat/api-client-nodejs\">node.js library for LiveChat API</a>, hosted on Github.</li>\n<li><a href=\"https://github.com/cxz/livechat_client\">Ruby library for LiveChat API</a>, hosted on Github.</li>\n<li><a href=\"https://github.com/livechat/api-client-csharp\">C# library for LiveChat API</a>, hosted on Github.</li>\n</ul>\n<h3 id=\"external-livechat-api-libraries\">External LiveChat API libraries</h3>\n<ul>\n<li><a href=\"https://github.com/lawwu/livechatR\">R library for LiveChat API</a>, hosted on Github.</li>\n</ul>\n<p>Did you write your own library and want it listed here? Let us know!</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"758169","collectionId":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","publishedId":"RVnPL46o","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-04-13T11:54:47.000Z"},"item":[{"name":"Agents","item":[{"name":"List all agents","id":"8ffccb5e-6546-cfb1-cc2d-bdc3617a8977","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/agents","description":"<p>Returns all LiveChat agents list</p>\n","urlObject":{"protocol":"https","path":["agents"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"8ffccb5e-6546-cfb1-cc2d-bdc3617a8977"},{"name":"Create a new agent","id":"f46c0ffe-67c5-bf53-9ca5-d4917542e51e","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"POST","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"login","value":"john@public.com","type":"text"},{"key":"name","value":"John Public","type":"text"}]},"url":"https://api.livechatinc.com/agents","description":"<p>Creates a new agent in your license.</p>\n","urlObject":{"protocol":"https","path":["agents"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"f46c0ffe-67c5-bf53-9ca5-d4917542e51e"},{"name":"Get a single agent details","id":"7b96b767-891a-763a-408c-6f40e8229b9f","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/agents/john@public.com","description":"<p>Returns complete details of the agent for the given LOGIN.</p>\n","urlObject":{"protocol":"https","path":["agents","john@public.com"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"7b96b767-891a-763a-408c-6f40e8229b9f"},{"name":"Get a single agent details","id":"0887a88b-f034-1ac5-00a3-40a581bed1e4","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"PUT","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"job_title","value":"Super Support Agent","type":"text"}]},"url":"https://api.livechatinc.com/agents/john@public.com","description":"<p>Returns complete details of the agent for the given LOGIN.</p>\n","urlObject":{"protocol":"https","path":["agents","john@public.com"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"0887a88b-f034-1ac5-00a3-40a581bed1e4"},{"name":"Remove an agent","id":"f2febdea-61a8-f575-4c06-fe77bd488957","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"DELETE","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/agents/john@public.com","description":"<p>Removes an agent.</p>\n","urlObject":{"protocol":"https","path":["agents","john@public.com"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"f2febdea-61a8-f575-4c06-fe77bd488957"}],"id":"b729bcba-d4b8-c5d1-0e57-ab9ff36fce10","description":"<h1 id=\"agents\">Agents</h1>\n<p>Use this API method to <strong>manage</strong> your <a href=\"https://www.livechatinc.com/kb/livechat-roles-owner-administrators-and-agents/\">Agents</a> and to <strong>get information</strong> about their activities.</p>\n<h2 id=\"available-paths-agents-available-paths\">Available paths {#agents-available-paths}</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Methods</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>GET</code>, <code>POST</code></td>\n<td><code>/agents</code></td>\n</tr>\n<tr>\n<td><code>GET</code>, <code>PUT</code>, <code>DELETE</code></td>\n<td><code>/agents/&lt;LOGIN&gt;</code></td>\n</tr>\n<tr>\n<td><code>POST</code></td>\n<td><code>/agents/&lt;LOGIN&gt;/reset_api_key</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"list-all-agents\">List all agents</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/agents\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/agents\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  {\n    \"name\": \"John Doe\",\n    \"permission\": \"owner\",\n    \"avatar\": \"livechat.s3.amazonaws.com/1011121/all/avatars/bdd8924fcbcdbddbeaf60c19b238b0b0.jpg\",\n    \"login\": \"john.doe@mycompany.com\",\n    \"status\": \"accepting chats\"\n  },\n  ...\n]\n</code></pre>\n<p>Returns all LiveChat agents list. Optional parameters:</p>\n<ul>\n<li><code>status</code> - returns the agents with one of the following statuses: <code>accepting chats</code>, <code>not accepting chats</code> or <code>offline</code>.</li>\n</ul>\n<p>Additional info:</p>\n<p><code>status</code> can be: <code>accepting chats</code>, <code>not accepting chats</code> or <code>offline</code>.<br /><code>permission</code> can take the following values: <code>owner</code>, <code>administrator</code>, <code>normal</code>.</p>\n<h2 id=\"get-a-single-agent-details\">Get a single agent details</h2>\n<p>Returns complete details of the agent for the given <code>LOGIN</code>.</p>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">GET https://api.livechatinc.com/agents/&lt;LOGIN&gt;\n</code></pre>\n<blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/agents/john.doe@mycompany.com\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"login\": \"john.doe@mycompany.com\",\n  \"name\": \"John Doe\",\n  \"login_status\": \"accepting chats\",\n  \"permission\": \"owner\",\n  \"daily_summary\": 1,\n  \"job_title\": \"Support Agent\",\n  \"avatar\": \"livechat.s3.amazonaws.com/1011121/all/avatars/bdd8924fcbcdbddbeaf60c19b238b0b0.jpg\",\n  \"notifications\": {\n    \"new_visitor\": 1,\n    \"returning_visitor\": 1,\n    \"queued_visitor\": 1,\n    \"visitor_is_typing\": 0,\n    \"new_goal\": 1\n  },\n  \"max_chats_count\": 6,\n  \"groups\": [\n    {\n      \"id\": 1,\n      \"name\": \"Sales\"\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Technical Support\"\n    }\n  ],\n  \"status\": \"accepting chats\",\n  \"last_logout\": 1358427204,\n  \"api_key\": \"6ed8580f2cc160ce98d16389a0ede2c0\"\n}\n</code></pre>\n<h4 id=\"properties\">Properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>login</code></td>\n<td>the agent's e-mail address</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>the agent's name</td>\n</tr>\n<tr>\n<td><code>login_status</code></td>\n<td>possible values: <code>accepting chats</code>, <code>not accepting chats</code>; defines the default status for an agent right after the login</td>\n</tr>\n<tr>\n<td><code>permission</code></td>\n<td>possible values: <code>owner</code>, <code>administrator</code>, <code>normal</code></td>\n</tr>\n<tr>\n<td><code>daily_summary</code></td>\n<td>whether or not the agent receives a daily summary</td>\n</tr>\n<tr>\n<td><code>job_title</code></td>\n<td>defaults to: <code>Support Agent</code></td>\n</tr>\n<tr>\n<td><code>avatar</code></td>\n<td>path to the image on Amazon s3</td>\n</tr>\n<tr>\n<td><code>notifications</code></td>\n<td>whether or not the specific notification is enabled</td>\n</tr>\n<tr>\n<td><code>max_chats_count</code></td>\n<td>limit of the concurrent chats</td>\n</tr>\n<tr>\n<td><code>groups[]</code></td>\n<td>list of groups the agent is a member of</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>possible values: <code>accepting chats</code>, <code>not accepting chats</code>, <code>offline</code>; current status of an agent</td>\n</tr>\n<tr>\n<td><code>last_logout</code></td>\n<td>timestamp of the agent's last logout</td>\n</tr>\n<tr>\n<td><code>api_key</code></td>\n<td>the agent's API key (note: agents can access their own API keys only)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"create-a-new-agent\">Create a new agent</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://api.livechatinc.com/agents\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/agents\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -d \"login=jenny.doe@mycompany.com&amp;\\\nname=Jenny+Doe&amp;\\\npermission=administrator&amp;\\\ngroups[]=1&amp;\\\ngroups[]=2&amp;\\\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/agents\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n        \"login\":\"jenny.doe@mycompany.com\",\n        \"name\":\"Jenny Doe\",\n        \"permission\":\"administrator\",\n        \"groups\":[1,2]\n     }'\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"login\": \"jenny.doe@mycompany.com\",\n  \"name\": \"Jenny Doe\",\n  \"login_status\": \"accepting chats\",\n  \"permission\": \"administrator\",\n  \"daily_summary\": 1,\n  \"job_title\": \"Support Agent\",\n  \"avatar\": \"livechat.s3.amazonaws.com/default/avatars/45bcb5f592dbf5aac8f88dcfd6bc937c.png\",\n  \"notifications\": {\n    \"new_visitor\": 1,\n    \"returning_visitor\": 1,\n    \"queued_visitor\": 1,\n    \"visitor_is_typing\": 0,\n    \"new_goal\": 1\n  },\n  \"max_chats_count\": 6,\n  \"groups\": [\n    {\n      \"id\": 1,\n      \"name\": \"Sales\"\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Technical Support\"\n    }\n  ],\n  \"status\": \"offline\",\n  \"last_logout\": 0,\n  \"api_key\": \"441e519f755db8a51a4e232a31fe6249\"\n}\n</code></pre>\n<p>Creates a new agent in your license.</p>\n<h4 id=\"required-properties\">Required properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>login</code></td>\n<td>must be a correct e-mail address</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"optional-properties\">Optional properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>job_title</code></td>\n<td>defaults to: <code>Support Agent</code></td>\n</tr>\n<tr>\n<td><code>login_status</code></td>\n<td>possible values: <code>accepting chats</code>, <code>not accepting chats</code>; defines the default status for an agent right after the login</td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td>the minimum length is 5 (if not provided, an email with the activation link will be sent)</td>\n</tr>\n<tr>\n<td><code>permission</code></td>\n<td><code>administrator</code>, <code>normal</code> (default)</td>\n</tr>\n<tr>\n<td><code>groups[]</code></td>\n<td>list of group IDs</td>\n</tr>\n<tr>\n<td><code>notifications</code></td>\n<td>object (required keys: <code>new_visitor</code>, <code>incoming_chat</code>, <code>returning_visitor</code>, <code>queued_visitor</code>, <code>visitor_is_typing</code>, <code>new_goal</code>, accepted values: <code>0</code> or <code>1</code>)</td>\n</tr>\n<tr>\n<td><code>daily_summary</code></td>\n<td><code>0</code> or <code>1</code> (default)</td>\n</tr>\n<tr>\n<td><code>max_chats_count</code></td>\n<td>defaults to <code>6</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"update-an-agent\">Update an agent</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT https://api.livechatinc.com/agents/&lt;LOGIN&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/agents/jenny.doe@mycompany.com\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X PUT \\\n  -d \"status=not+accepting+chats&amp;\\\nmax_chats_count=2\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/agents/jenny.doe@mycompany.com\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -X PUT \\\n  -d '{\n        \"status\":\"not accepting chats\",\n        \"max_chats_count\":2\n     }'\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"login\": \"jenny.doe@mycompany.com\",\n  \"name\": \"Jenny Doe\",\n  \"login_status\": \"not accepting chats\",\n  \"permission\": \"administrator\",\n  \"daily_summary\": 1,\n  \"job_title\": \"Support Agent\",\n  \"avatar\": \"livechat.s3.amazonaws.com/default/avatars/45bcb5f592dbf5aac8f88dcfd6bc937c.png\",\n  \"notifications\": {\n    \"new_visitor\": 1,\n    \"returning_visitor\": 1,\n    \"queued_visitor\": 1,\n    \"visitor_is_typing\": 0,\n    \"new_goal\": 1\n  },\n  \"max_chats_count\": 2,\n  \"work_scheduler\":{\n    \"sunday\":{\n      \"enabled\":0,\n      \"start\":\"11:00\",\n      \"end\":\"17:00\"\n    },\n    \"monday\":{\n      \"enabled\":1,\n      \"start\":\"09:00\",\n      \"end\":\"17:00\"\n    },\n    ...\n    \"saturday\":{\n      \"enabled\":0,\n      \"start\":\"09:00\",\n      \"end\":\"17:00\"\n    }\n  },\n  \"groups\": [\n    {\n      \"id\": 1,\n      \"name\": \"Sales\"\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Technical Support\"\n    }\n  ],\n  \"status\": \"not accepting chats\",\n  \"last_logout\": 0,\n  \"api_key\": \"441e519f755db8a51a4e232a31fe6249\",\n}\n</code></pre>\n<p>Updates the specified agent by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>\n<h4 id=\"optional-properties-1\">Optional properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>job_title</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>login_status</code></td>\n<td>possible values: <code>accepting chats</code>, <code>not accepting chats</code>; defines the default status for agent right after login</td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td>the password you want to change</td>\n</tr>\n<tr>\n<td><code>current_password</code></td>\n<td>when changing the password for yourself or for another agent, you need to provide your current password</td>\n</tr>\n<tr>\n<td><code>permission</code></td>\n<td><code>administrator</code>, <code>normal</code> (default)</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td><code>accepting chats</code>, <code>not accepting chats</code>, <code>offline</code></td>\n</tr>\n<tr>\n<td><code>groups[]</code></td>\n<td>list of group IDs</td>\n</tr>\n<tr>\n<td><code>notifications</code></td>\n<td>object (allowed keys: <code>new_visitor</code>, <code>returning_visitor</code>, <code>queued_visitor</code>, <code>visitor_is_typing</code>, allowed values: <code>0</code> or <code>1</code>)</td>\n</tr>\n<tr>\n<td><code>daily_summary</code></td>\n<td><code>0</code> or <code>1</code></td>\n</tr>\n<tr>\n<td><code>max_chats_count</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>work_scheduler</code></td>\n<td>available only for enterprise plan</td>\n</tr>\n</tbody>\n</table>\n</div><p>The properties which an agent can edit in their own profile, without being an administrator:</p>\n<ul>\n<li><code>password</code></li>\n<li><code>name</code></li>\n<li><code>job_title</code></li>\n<li><code>daily_summary</code></li>\n<li><code>notifications</code></li>\n<li><code>login_status</code></li>\n<li><code>status</code></li>\n</ul>\n<h2 id=\"reset-an-api-key\">Reset an API key</h2>\n<p>Resets the API key for an agent with a given <code>LOGIN</code>.</p>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://api.livechatinc.com/agents/&lt;LOGIN&gt;/reset_api_key\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/agents/jenny.doe@mycompany.com/reset_api_key\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X POST\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<blockquote>\n<p><em>The return format is the same as in the <a href=\"#update-an-agent\">update an agent</a> method.</em></p>\n</blockquote>\n<h2 id=\"remove-an-agent\">Remove an agent</h2>\n<p>Removes an agent. Archived chats will not be removed, but all statistics will be lost. The agent will be notified by e-mail that the account has been deleted.</p>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>DELETE https://api.livechatinc.com/agents/&lt;LOGIN&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/agents/jenny.doe@mycompany.com\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X DELETE\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"result\": \"jenny.doe@mycompany.com removed successfully\"\n}\n</code></pre>\n","event":[{"listen":"prerequest","script":{"id":"70da0d11-93bd-4bfc-aebf-27a9663aca51","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e3e4d94c-2985-4208-981a-9bec6a8f1dda","type":"text/javascript","exec":[""]}}],"_postman_id":"b729bcba-d4b8-c5d1-0e57-ab9ff36fce10","auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":true,"source":{"_postman_id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","name":"LiveChat REST API","type":"collection"}}},{"name":"Archives","item":[{"name":"Get list of chats","id":"c3c1aa7b-f2e2-b4b7-c1e1-1d3b2b357363","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/chats","description":"<p>Returns all ended chats.</p>\n","urlObject":{"protocol":"https","path":["chats"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"c3c1aa7b-f2e2-b4b7-c1e1-1d3b2b357363"},{"name":"Get single chat","id":"645736f5-6dfb-2a40-2356-3829063b0b27","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/chats/ABC123","description":"<p>Returns a single chat item for the given CHAT_ID.</p>\n","urlObject":{"protocol":"https","path":["chats","ABC123"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"645736f5-6dfb-2a40-2356-3829063b0b27"},{"name":"Send chat transcript to e-mail","id":"3ff20f94-71d6-089e-ebbc-19b5fd4bd558","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"POST","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/chats/ABC123/send_transcript","urlObject":{"protocol":"https","path":["chats","ABC123","send_transcript"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"3ff20f94-71d6-089e-ebbc-19b5fd4bd558"},{"name":"Update chat tags","id":"a804f3fa-69df-3119-fcfe-f54eee05ba1f","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"PUT","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"tag[0]","value":"support","type":"text"},{"key":"tag[1]","value":"feedback","type":"text"}]},"url":"https://api.livechatinc.com/chats/ABC123/tags","description":"<p>This method updates the tags assigned to a chat.</p>\n","urlObject":{"protocol":"https","path":["chats","ABC123","tags"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a804f3fa-69df-3119-fcfe-f54eee05ba1f"}],"id":"4fe4578b-9386-3f31-7dd7-19887d49bb37","description":"<h1 id=\"archives\">Archives</h1>\n<p>This method allows you to look up the <strong>past chats</strong> and <a href=\"https://www.livechatinc.com/features/engaging-customers/#After-hours-form\">after-hours messages</a>. It also allows you to send <a href=\"https://www.livechatinc.com/kb/how-to-get-chat-transcripts/\">chat transcripts</a> via email.</p>\n<h2 id=\"available-paths\">Available paths</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Methods</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>GET</code></td>\n<td><code>/chats</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/chats/&lt;CHAT_ID&gt;</code></td>\n</tr>\n<tr>\n<td><code>POST</code></td>\n<td><code>/chats/&lt;CHAT_ID&gt;/send_transcript</code></td>\n</tr>\n<tr>\n<td><code>PUT</code></td>\n<td><code>/chats/&lt;CHAT_ID&gt;/tags</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"get-list-of-chats\">Get list of chats</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/chats\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/chats?\\\n      date_from=2013-01-23&amp;\\\n      has_goal=1\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n   \"chats\":[\n      {\n         \"type\":\"chat\",\n         \"id\":\"MH022RD0K5\",\n         \"visitor\":{\n            \"id\":\"S1355415390.49b8940793\",\n            \"name\":\"Mary Brown\",\n            \"ip\":\"85.10.5.156\",\n            \"city\": \"Central District\",\n            \"country\": \"Hong Kong\",\n            \"country_code\": \"HK\",\n            \"timezone\": \"Asia/Hong_Kong\",\n            \"region\": \"\"\n         },\n         \"agents\":[\n            {\n               \"display_name\":\"John Doe\",\n               \"email\":\"john.doe@mycompany.com\"\n            }\n         ],\n         \"supervisors\":[\n            {\n               \"display_name\":\"Jane Doe\",\n               \"email\":\"jane.doe@mycompany.com\"\n            }\n         ],\n         \"rate\":\"not_rated\",\n         \"duration\":1456,\n         \"chat_start_url\":\"https://livechatinc.com\",\n         \"referrer\":\"https://domain.com\",\n         \"group\":[\n            0\n         ],\n         \"started\":\"Wed, 01/23/13 11:40:53 am\",\n         \"prechat_survey\":[\n            {\n               \"key\":\"Name:\",\n               \"value\":\"\",\n               \"id\":\"13589376348060238\"\n            },\n            {\n               \"key\":\"E-mail:\",\n               \"value\":\"\",\n               \"id\":\"135893763480606511\"\n            }\n         ],\n         \"postchat_survey\":[\n            {\n               \"key\":\"How would you rate the quality of support?\",\n               \"value\":\"Good\",\n               \"id\":\"137164167769201638\"\n            }\n         ],\n         \"custom_variables\":[\n            {\n               \"key\":\"customer_login\",\n               \"value\":\"mary_brown\"\n            }\n         ],\n         \"integration_variables\":[\n            {\n               \"key\":\"facebook.id\",\n               \"value\":\"123456789\"\n            },\n            // ...\n            {\n               \"key\":\"facebook.email\",\n               \"value\":\"mary.brown@email.com\"\n            }\n         ],\n         \"goals\":[\n            {\n               \"id\":71,\n               \"name\":\"sales_tracker_name\",\n               \"type\":\"sales_tracker\",\n               \"date\":\"Wed, 01/23/13 11:40:53 am\",\n               \"timestamp\":1358937653,\n               \"order\":{\n                  \"id\":\"ABC\",\n                  \"description\":\"product one\",\n                  \"price\":\"199\",\n                  \"currency\":\"CZK\"\n               }\n            },\n            {\n               \"id\":72,\n               \"name\":\"goal_name\",\n               \"date\":\"Wed, 01/23/13 11:40:53 am\",\n               \"timestamp\":1358937653,\n               \"order\":{\n                  \"id\":\"\",\n                  \"description\":\"\",\n                  \"price\":\"0\",\n                  \"currency\":\"\"\n               }\n         ],\n         \"queue\":{\n            \"duration\":20\n         },\n         \"tags\":[\n            \"sales\",\n            \"support\",\n            \"feedback\"\n         ],\n         \"timezone\": \"Europe/Berlin\",\n         \"messages\":[\n            {\n               \"author_name\":\"John Doe\",\n               \"text\":\"Hello\",\n               \"date\":\"Wed, 01/23/13 11:40:53 am\",\n               \"timestamp\":1358937653,\n               \"user_type\":\"agent\",\n               \"agent_id\":\"john.doe@mycompany.com\"\n            },\n            // ...\n         ],\n         \"events\":[\n            {\n               \"author_name\":\"John Doe\",\n               \"text\":\"Hello\",\n               \"date\":\"Wed, 01/23/13 11:40:53 am\",\n               \"timestamp\":1358937653,\n               \"user_type\":\"agent\",\n               \"agent_id\":\"john.doe@mycompany.com\",\n               \"type\":\"message\"\n            },\n            {\n               \"text\":\"Mary Brown uploaded the attachment.\",\n               \"date\":\"Wed, 01/23/13 11:41:02 am\",\n               \"timestamp\":1358937662,\n               \"type\":\"attachment\",\n               \"user_type\":\"visitor\",\n               \"files\":[\n                  \"https://static.livechatinc.com/.../hello.JPG\"\n               ],\n               \"author_name\":\"Mary Brown\"\n            },\n            {\n               \"author_name\":\"John Doe\",\n               \"text\":\"Thanks, fine :)\",\n               \"date\":\"Wed, 01/23/13 11:41:05 am\",\n               \"timestamp\":1358937665,\n               \"user_type\":\"agent\",\n               \"agent_id\":\"john.doe@mycompany.com\",\n               \"type\":\"message\"\n            },\n            {\n               \"author_name\":\"Jane Doe\",\n               \"text\":\"Message from supervisor.\",\n               \"date\":\"Wed, 01/23/13 11:57:13 am\",\n               \"timestamp\":1358938633,\n               \"user_type\":\"supervisor\",\n               \"agent_id\":\"jane.doe@mycompany.com\",\n               \"type\":\"message\"\n            },\n            {\n               \"text\":\"Mary Brown closed the chat.\",\n               \"date\":\"Wed, 01/23/13 11:57:14 am\",\n               \"timestamp\":1358937663,\n               \"type\":\"event\",\n               \"user_type\":\"visitor\"\n            },\n         ],\n         \"engagement\":immediate_start,\n         \"started_timestamp\":1358937653,\n         \"ended_timestamp\":1358939109,\n         \"ended\":\"Wed, 01/23/13 12:05:09 pm\"\n      },\n      {\n         \"...\":\"...\"\n      }\n   ],\n   \"total\":2,\n   \"pages\":1\n}\n</code></pre>\n<p>Returns all ended chats.</p>\n<h4 id=\"optional-parameters\">Optional parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code> Defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code> Defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>page</code></td>\n<td>page number, defaults to 1</td>\n</tr>\n<tr>\n<td><code>visitor_id</code></td>\n<td>return chats with specified visitor_id</td>\n</tr>\n<tr>\n<td><code>query</code></td>\n<td>return chats containing the query</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>return chats for given agent login</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>return chats for given group id</td>\n</tr>\n<tr>\n<td><code>goal</code></td>\n<td>return chats for given goal id</td>\n</tr>\n<tr>\n<td><code>has_goal</code></td>\n<td><code>1/0</code>. If 1 is passed, returns chats having any goal</td>\n</tr>\n<tr>\n<td><code>sale</code></td>\n<td>return chats for given sales tracker id</td>\n</tr>\n<tr>\n<td><code>has_sale</code></td>\n<td><code>1/0</code>. If 1 is passed, returns chats having any tracked sale</td>\n</tr>\n<tr>\n<td><code>queued</code></td>\n<td><code>1/0</code>. If 1 is passed, returns chats started from queue</td>\n</tr>\n<tr>\n<td><code>rate</code></td>\n<td>filter chats considering its rating status. Available values: <code>rated</code>, <code>not_rated</code>, <code>rated_good</code>, <code>rated_bad</code></td>\n</tr>\n<tr>\n<td><code>include_pending</code></td>\n<td><code>1/0</code>. Whether to include chats that haven't yet ended. Pending chats can be recognized by <code>pending: true</code> attribute</td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>filter chats by a specified tag</td>\n</tr>\n<tr>\n<td><code>tagged</code></td>\n<td><code>1/0</code>. If 1 is passed, chats with any tag are returned. If 0 is passed, only chats without a tag are returned</td>\n</tr>\n<tr>\n<td><code>comment</code></td>\n<td><code>1/0</code>. If 1 is passed, chats with rating comments are returned</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>filters by city, values should be entered and are returned in the local language</td>\n</tr>\n<tr>\n<td><code>region</code></td>\n<td>filters by region. This could be a state, voivodeship, canton, county etc. Values should be entered and are returned in the local language</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>filters by country name. All values are in english</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"additional-info\">Additional info</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>goal</code></td>\n<td>parameter will appear only if a goal has been reached or there was tracked sale for a particular chat</td>\n</tr>\n<tr>\n<td><code>referrer</code></td>\n<td>parameter will appear only if referrer url exists</td>\n</tr>\n<tr>\n<td><code>custom_variables</code></td>\n<td>parameter will be available only if the custom variables are defined in the tracking code</td>\n</tr>\n<tr>\n<td><code>integration_variables</code></td>\n<td>parameter will appear only if a visitor logs in with Facebook</td>\n</tr>\n<tr>\n<td><code>queue</code></td>\n<td>parameter will appear only if chat started from queue</td>\n</tr>\n<tr>\n<td><code>engagement</code></td>\n<td>– possible values: <code>auto_invite</code> (chat from automatic invitation), <code>manual_invite</code> (chat from manual invitation), <code>immediate_start</code> (visitor started chats themselves)</td>\n</tr>\n<tr>\n<td><code>duration</code></td>\n<td>is counted in seconds</td>\n</tr>\n<tr>\n<td><code>total</code></td>\n<td>tells you the total number of chats</td>\n</tr>\n<tr>\n<td><code>pages</code></td>\n<td>tells you the total number of pages</td>\n</tr>\n<tr>\n<td><code>city</code>, <code>region</code>, <code>country</code></td>\n<td>geolocation filters have been working for chats since May 11, 2015</td>\n</tr>\n</tbody>\n</table>\n</div><p>The results are divided into pages, each containing 25 chats. To access next pages of the results, use <code>?page=&lt;PAGE&gt;</code> parameter. Please note that first page's number is <code>1</code>, not <code>0</code>.</p>\n<p>Note that <strong>the results are limited</strong> to the latest 100000 records on your LiveChat license, which gives you exactly 4000 pages with 25 chats per page. If you have more than 100000 chats on your license and you want to get them all, you will have to call our API several times.</p>\n<p>In the first call, use the data range that covers the first 100000 chats. When making other calls, use the data range that includes the rest of your conversations.</p>\n<h2 id=\"get-single-chat\">Get single chat</h2>\n<p>Returns a single chat item for the given <code>CHAT_ID</code>.</p>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/chats/&lt;CHAT_ID&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/chats/MH022RD0K5\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<blockquote>\n<p><em>The return format is the same as the single chat item in <a href=\"#get-list-of-chats\">get list of chats</a>.</em></p>\n</blockquote>\n<h2 id=\"send-chat-transcript-to-e-mail\">Send chat transcript to e-mail</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://api.livechatinc.com/chats/&lt;CHAT_ID&gt;/send_transcript\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/chats/MH022RD0K5/send_transcript\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -d \"to=john.doe@mycompany.com\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/chats/MH022RD0K5/send_transcript\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\  \n  -d '{\n       \"to\":\"john.doe@mycompany.com\"\n      }'\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"result\": \"E-mail has been sent to john.doe@mycompany.com.\"\n}\n</code></pre>\n<h4 id=\"required-parameter\">Required parameter</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>to</code></td>\n<td>receiver's email address.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"update-chat-tags\">Update chat tags</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT https://api.livechatinc.com/chats/&lt;CHAT_ID&gt;/tags\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/chats/MH022RD0K5/tags\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -X PUT \\\n  -H X-API-Version:2 \\\n  -d \"tag[]=sales&amp;\\\ntag[]=support&amp;\\\ntag[]=feedback\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/chats/MH022RD0K5/tags\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -X PUT \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\ \n  -d '{\n        \"tag[]\":\"sales\",\n        \"tag[]\":\"support\",\n        \"tag[]\":\"feedback\"\n      }'\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n   \"chats\":[\n      {\n         \"type\":\"chat\",\n         \"id\":\"MH022RD0K5\",\n         \"visitor\":{\n            \"id\":\"S1355415390.49b8940793\",\n            \"name\":\"Mary Brown\",\n            \"ip\":\"85.10.5.156\",\n            \"city\": \"Central District\",\n            \"country\": \"Hong Kong\",\n            \"country_code\": \"HK\",\n            \"timezone\": \"Asia/Hong_Kong\",\n            \"region\": \"\"\n         },\n         \"agents\":[\n            {\n               \"display_name\":\"John Doe\",\n               \"email\":\"john.doe@mycompany.com\"\n            }\n         ],\n         \"supervisors\":[\n            {\n               \"display_name\":\"Jane Doe\",\n               \"email\":\"jane.doe@mycompany.com\"\n            }\n         ],\n         \"rate\":\"not_rated\",\n         \"duration\":1456,\n         \"chat_start_url\":\"https://livechatinc.com\",\n         \"referrer\":\"https://domain.com\",\n         \"group\":[\n            0\n         ],\n         \"started\":\"Wed, 01/23/13 11:40:53 am\",\n         \"prechat_survey\":[\n            {\n               \"key\":\"Name:\",\n               \"value\":\"\",\n               \"id\":\"13589376348060238\"\n            },\n            {\n               \"key\":\"E-mail:\",\n               \"value\":\"\",\n               \"id\":\"135893763480606511\"\n            }\n         ],\n         \"postchat_survey\":[\n            {\n               \"key\":\"How would you rate the quality of support?\",\n               \"value\":\"Good\",\n               \"id\":\"137164167769201638\"\n            }\n         ],\n         \"custom_variables\":[\n            {\n               \"key\":\"customer_login\",\n               \"value\":\"mary_brown\"\n            }\n         ],\n         \"integration_variables\":[\n            {\n               \"key\":\"facebook.id\",\n               \"value\":\"123456789\"\n            },\n            {\n               \"...\":\"...\"\n            }\n         ],\n         \"goals\":[\n            {\n               \"id\":71,\n               \"name\":\"goal_name\",\n               \"order\":{\n                  \"id\":\"ABC\",\n                  \"description\":\"product one\",\n                  \"price\":\"199\",\n                  \"currency\":\"CZK\"\n               }\n            },\n            {\n               \"id\":72,\n               \"name\":\"goal_name\",\n               \"order\":{\n               }\n            }\n         ],\n         \"queue\":{\n            \"duration\":20\n         },\n         \"tags\":[\n            \"tag1\",\n            \"tag2\",\n            \"tag3\"\n         ],\n         \"timezone\": \"Europe/Berlin\",\n         \"messages\":[\n            {\n               \"author_name\":\"John Doe\",\n               \"text\":\"Hello\",\n               \"date\":\"Wed, 01/23/13 11:40:53 am\",\n               \"timestamp\":1358937653,\n               \"user_type\":\"agent\",\n               \"agent_id\":\"john.doe@mycompany.com\"\n            },\n            {\n               \"...\":\"...\"\n            }\n         ],\n         \"events\":[\n            {\n               \"author_name\":\"John Doe\",\n               \"text\":\"Hello\",\n               \"date\":\"Wed, 01/23/13 11:40:53 am\",\n               \"timestamp\":1358937653,\n               \"user_type\":\"agent\",\n               \"agent_id\":\"john.doe@mycompany.com\",\n               \"type\":\"message\"\n            },\n            {\n               \"...\":\"...\"\n            },\n         ],\n         \"engagement\":immediate_start,\n         \"started_timestamp\":1358937653,\n         \"ended_timestamp\":1358939109,\n         \"ended\":\"Wed, 01/23/13 12:05:09 pm\"\n      },\n      {\n         \"...\":\"...\"\n      }\n   ],\n   \"total\":2,\n   \"pages\":1\n}\n</code></pre>\n<p>This method updates the tags assigned to a chat.</p>\n<h4 id=\"required-parameter-1\">Required parameter</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>tag</code></td>\n<td>array of used tags</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"3f69f362-1336-48d9-ab38-ac9d0aa5a89d","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"66377397-7005-4dc4-862d-e57cfe0a83c6","type":"text/javascript","exec":[""]}}],"_postman_id":"4fe4578b-9386-3f31-7dd7-19887d49bb37","auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":true,"source":{"_postman_id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","name":"LiveChat REST API","type":"collection"}}},{"name":"Canned responses","item":[{"name":"List all canned responses","id":"5aa6f2f0-a58b-fa2d-3d4b-88607405a646","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/canned_responses","description":"<p>Returns the list of all currently set canned responses.</p>\n","urlObject":{"protocol":"https","path":["canned_responses"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"5aa6f2f0-a58b-fa2d-3d4b-88607405a646"},{"name":"List all canned responses","id":"ef4543ad-ca5d-aa67-de4b-14d74045d84f","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/canned_responses/ABC123","description":"<p>Returns the list of all currently set canned responses.</p>\n","urlObject":{"protocol":"https","path":["canned_responses","ABC123"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"ef4543ad-ca5d-aa67-de4b-14d74045d84f"},{"name":"Create a new canned response","id":"a3a48c1d-5fd0-de70-b75b-690aeb57e574","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"POST","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"text","value":"Have a great day, goodbye.","type":"text"},{"key":"tags[0]","value":"bye","type":"text"},{"key":"tags[1]","value":"cu","type":"text"}]},"url":"https://api.livechatinc.com/canned_responses","description":"<p>Creates a new canned response.</p>\n","urlObject":{"protocol":"https","path":["canned_responses"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a3a48c1d-5fd0-de70-b75b-690aeb57e574"},{"name":"Update a canned response","id":"ec49a93a-17cc-4af6-0272-d943238a9309","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"PUT","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"tags[0]","value":"bye","type":"text"}]},"url":"https://api.livechatinc.com/canned_responses/ABC123","description":"<p>Updates the specified canned response by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>\n","urlObject":{"protocol":"https","path":["canned_responses","ABC123"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"ec49a93a-17cc-4af6-0272-d943238a9309"},{"name":"Remove a canned response","id":"b6f793d2-51ae-b45d-2a76-796c3b9ec7b5","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"DELETE","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/canned_responses/ABC123","description":"<p>Removes a canned response with the given CANNED_RESPONSE_ID.</p>\n","urlObject":{"protocol":"https","path":["canned_responses","ABC123"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"b6f793d2-51ae-b45d-2a76-796c3b9ec7b5"}],"id":"dae92d5d-47aa-2b83-caa6-ddad1402fed5","description":"<h1 id=\"canned-responses\">Canned responses</h1>\n<p>Use this method to <strong>get a full list</strong> of your <a href=\"https://www.livechatinc.com/kb/canned-responses/\">Canned responses</a> and to <strong>modify them</strong>.</p>\n<h2 id=\"available-paths-canned-responses-available-paths\">Available paths {#canned-responses-available-paths}</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Methods</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>GET</code>, <code>POST</code></td>\n<td><code>/canned_responses</code></td>\n</tr>\n<tr>\n<td><code>GET</code>, <code>PUT</code>, <code>POST</code></td>\n<td><code>/canned_responses/&lt;CANNED_RESPONSE_ID&gt;</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"list-all-canned-responses\">List all canned responses</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/canned_responses\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/canned_responses?group=1\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  {\n    \"id\": 3151,\n    \"group\": 1,\n    \"text\": \"Can I help you with anything else?\",\n    \"creation_date\": 1358257181,\n    \"created_by\": \"john.doe@mycompany.com\",\n    \"tags\": [\n      \"help\",\n      \"else\"\n    ]\n  },\n  {\n    \"id\": 3161,\n    \"group\": 1,\n    \"text\": \"What product are you interested in?\",\n    \"creation_date\": 1358257229,\n    \"created_by\": \"john.doe@mycompany.com\",\n    \"modification_date\": 1358864338,\n    \"modified_by\": \"jenny.doe@mycompany.com\",\n    \"tags\": [\n      \"product\",\n      \"interest\"\n    ]\n  },\n  {\n      \"...\": \"...\"\n  }\n]\n</code></pre>\n<p>Returns the list of all currently set canned responses.</p>\n<h4 id=\"optional-parameters\">Optional parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>group</code></td>\n<td>defaults to <code>0</code></td>\n</tr>\n<tr>\n<td><code>modification_date</code>, <code>modification_by</code></td>\n<td>appear if the canned response has been modified</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"get-a-single-canned-response\">Get a single canned response</h2>\n<p><code>CANNED_RESPONSE_ID</code> is obtained from the <a href=\"#list-all-canned-responses\">list of all canned responses</a>.</p>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/canned_responses/&lt;CANNED_RESPONSE_ID&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/canned_responses/3151\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 3151,\n  \"group\": 1,\n  \"text\": \"Can I help you with anything else?\",\n  \"creation_date\": 1358257181,\n  \"created_by\": \"john.doe@mycompany.com\",\n  \"tags\": [\n    \"help\",\n    \"else\"\n  ]\n}\n</code></pre>\n<h4 id=\"attributes\">Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>id</code></td>\n<td>id of the canned response</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group that canned response is assigned to</td>\n</tr>\n<tr>\n<td><code>text</code></td>\n<td>canned response text</td>\n</tr>\n<tr>\n<td><code>creation_date</code></td>\n<td>creation date timestamp</td>\n</tr>\n<tr>\n<td><code>created_by</code></td>\n<td>login of the canned response's author</td>\n</tr>\n<tr>\n<td><code>tags</code></td>\n<td>an array of canned response's tags</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"create-a-new-canned-response\">Create a new canned response</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://api.livechatinc.com/canned_responses\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/canned_responses\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -d \"text=Have+a+great+day,+goodbye.&amp;\\\ntags[]=bye&amp;\\\ntags[]=cu\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/canned_responses\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n        \"text\":\"Have a great day, goodbye.\",\n        \"tags\": [\"bye\", \"cu\"]\n     }'\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 3181,\n  \"group\": 0,\n  \"text\": \"Have a great day, goodbye.\",\n  \"creation_date\": 1358866421,\n  \"created_by\": \"john.doe@mycompany.com\",\n  \"tags\": [\n    \"cu\",\n    \"bye\"\n  ]\n}\n</code></pre>\n<p>Creates a new canned response.</p>\n<h4 id=\"required-properties\">Required properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>text</code></td>\n<td>response text</td>\n</tr>\n<tr>\n<td><code>tags</code></td>\n<td>array of strings (tags)</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"optional-properties\">Optional properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>group</code></td>\n<td>defaults to 0</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"update-a-canned-response\">Update a canned response</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT https://api.livechatinc.com/canned_responses/&lt;CANNED_RESPONSE_ID&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/canned_responses/3181\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X PUT -d \"tags[]=bye\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl \"https://api.livechatinc.com/canned_responses\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -X PUT \\\n  -d '{\n        \"tags\": [\"bye\"]\n     }'\n</code></pre><blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 3181,\n  \"group\": 0,\n  \"text\": \"Have a great day, goodbye.\",\n  \"creation_date\": 1358866421,\n  \"created_by\": \"john.doe@mycompany.com\",\n  \"modification_date\": 1358866813,\n  \"modified_by\": \"john.doe@mycompany.com\",\n  \"tags\": [\n    \"bye\"\n  ]\n}\n</code></pre>\n<p>Updates the specified canned response by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>\n<h4 id=\"optional-properties-1\">Optional properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>text</code></td>\n<td>response text</td>\n</tr>\n<tr>\n<td><code>tags</code></td>\n<td>array of strings (tags)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"remove-a-canned-response\">Remove a canned response</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>DELETE https://api.livechatinc.com/canned_responses/&lt;CANNED_RESPONSE_ID&gt;\n</code></pre><blockquote>\n<p>Example request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/canned_responses/3181\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X DELETE\n</code></pre>\n<blockquote>\n<p>Example response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"result\": \"Canned response removed successfully\"\n}\n</code></pre>\n<p>Removes a canned response with the given <code>CANNED_RESPONSE_ID</code>.</p>\n","event":[{"listen":"prerequest","script":{"id":"202f0c28-737a-4bc4-8ac7-4d6669770192","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"9ac436b6-ac2b-45fd-b813-586e209faa62","type":"text/javascript","exec":[""]}}],"_postman_id":"dae92d5d-47aa-2b83-caa6-ddad1402fed5","auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":true,"source":{"_postman_id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","name":"LiveChat REST API","type":"collection"}}},{"name":"Goals","item":[{"name":"List all goals","id":"32f368ab-3679-88f6-65f1-7ebdfe8bba6a","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/goals","description":"<p>Returns all currently set goals. The active parameter indicates whether a goal is enabled or not.</p>\n","urlObject":{"protocol":"https","path":["goals"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"32f368ab-3679-88f6-65f1-7ebdfe8bba6a"},{"name":"Get a single goal details","id":"972d435b-4e6e-e539-44ab-1790a4760033","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/goals/ABC123","description":"<p>Returns the goal details for the given GOAL_ID.</p>\n","urlObject":{"protocol":"https","path":["goals","ABC123"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"972d435b-4e6e-e539-44ab-1790a4760033"},{"name":"Mark a goal as successful","id":"dba8bc5f-ea34-2df9-dd85-c1ee2113647d","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"POST","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"visitor_id","value":"ABC123","type":"text"}]},"url":"https://api.livechatinc.com/goals/ABC123/mark_as_successful","description":"<p>The GOAL_ID is obtained from the goals list.</p>\n","urlObject":{"protocol":"https","path":["goals","ABC123","mark_as_successful"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"dba8bc5f-ea34-2df9-dd85-c1ee2113647d"},{"name":"Add a new goal","id":"b98ef115-2f7f-e0aa-2c2e-b22637f884cf","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"POST","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"new_goal","type":"text"},{"key":"type","value":"url","type":"text"},{"key":"url","value":"http://www.mystore.com/checkout/thank_you","type":"text"},{"key":"match_type","value":"exact","type":"text"}]},"url":"https://api.livechatinc.com/goals","description":"<p>Creates a new goal.</p>\n","urlObject":{"protocol":"https","path":["goals"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"b98ef115-2f7f-e0aa-2c2e-b22637f884cf"},{"name":"Update a goal","id":"4788a21a-ae2b-fea2-f34f-57f1905a4bc3","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"PUT","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"new_goal","type":"text"},{"key":"active","value":"0","type":"text"}]},"url":"https://api.livechatinc.com/goals/ABC123","description":"<p>Updates the specified goal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>\n<p>The GOAL_ID is obtained from the goals list.</p>\n","urlObject":{"protocol":"https","path":["goals","ABC123"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"4788a21a-ae2b-fea2-f34f-57f1905a4bc3"},{"name":"Remove a goal","id":"ea3f3313-1b0a-c5c3-7f13-7fd7b65d1fd6","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"DELETE","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/goals/ABC123","description":"<p>Removes a goal with the given GOAL_ID.</p>\n","urlObject":{"protocol":"https","path":["goals","ABC123"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"ea3f3313-1b0a-c5c3-7f13-7fd7b65d1fd6"},{"name":"Remove a group","id":"b8197ddd-ebdf-2d0b-2ba4-f54cd599ee05","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"DELETE","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/groups/ABC123","description":"<p>Removes a group with the given GROUP_ID.</p>\n","urlObject":{"protocol":"https","path":["groups","ABC123"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"b8197ddd-ebdf-2d0b-2ba4-f54cd599ee05"}],"id":"12f9b67a-c8a4-0fda-094f-85a57f9ee8a1","description":"<h1 id=\"goals\">Goals</h1>\n<p>This method allows you to <strong>get information</strong> about your <a href=\"https://www.livechatinc.com/kb/goals-set-up-and-use/\">Goals</a> and to <strong>modify</strong> them.</p>\n<h2 id=\"available-paths-goals-available-paths\">Available paths {#goals-available-paths}</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Methods</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>GET</code>, <code>POST</code></td>\n<td><code>/goals</code></td>\n</tr>\n<tr>\n<td><code>GET</code>, <code>PUT</code>, <code>DELETE</code></td>\n<td><code>/goals/&lt;GOAL_ID&gt;</code></td>\n</tr>\n<tr>\n<td><code>POST</code></td>\n<td><code>/goals/&lt;GOAL_ID&gt;/mark_as_successful</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"list-all-goals\">List all goals</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/goals\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/goals\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  {\n    \"id\": 1041,\n    \"name\": \"purchase\",\n    \"active\": 1\n  },\n  {\n    \"id\": 1181,\n    \"name\": \"nike shoes variable\",\n    \"active\": 1\n  }\n]\n</code></pre>\n<p>Returns all currently set goals. The <code>active</code> parameter indicates whether a goal is enabled or not.</p>\n<h2 id=\"get-a-single-goal-details\">Get a single goal details</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/goals/&lt;GOAL_ID&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/goals/1181\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 1181,\n  \"name\": \"nike shoes variable\",\n  \"active\": 1,\n  \"type\": \"custom_variable\",\n  \"custom_variable_name\": \"nike_shoes\",\n  \"custom_variable_value\": \"true\"\n}\n</code></pre>\n<p>Returns the goal details for the given <code>GOAL_ID</code>.</p>\n<h4 id=\"attributes\">Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>id</code></td>\n<td>id of the goal</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>goal name</td>\n</tr>\n<tr>\n<td><code>active</code></td>\n<td>whether or not the goal is enabled</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>type of the goal</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"additional-info\">Additional info</h4>\n<p>The <code>type</code> attribute can take the following values:</p>\n<ul>\n<li><code>custom_variable</code> – with two additional parameters: <code>custom_variable_name</code>, <code>custom_variable_value</code>.</li>\n<li><code>url</code> – with two additional parameters: <code>url</code> and <code>match_type</code> with possible values: <code>substring</code> (default), <code>exact</code>.</li>\n<li><code>api</code> – with no additional parameters.</li>\n</ul>\n<h2 id=\"mark-a-goal-as-successful\">Mark a goal as successful</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://api.livechatinc.com/goals/&lt;GOAL_ID&gt;/mark_as_successful\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/goals/1181/mark_as_successful\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -d \"visitor_id=S1281361958.2238ee3bd3\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/goals/1181/mark_as_successful\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n        \"visitor_id\":\"S1281361958.2238ee3bd3\",\n     }'\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"result\": \"goal marked as successful\"\n}\n</code></pre>\n<p>The <code>GOAL_ID</code> is obtained from the <a href=\"#list-all-goals\">goals list</a>.</p>\n<h4 id=\"required-parameters\">Required parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>visitor_id</code></td>\n<td>obtained using the JavaScript API: <a href=\"//developers.livechatinc.com/javascript-api#get-visitor-id\">LC_API.get_visitor_id()</a></td>\n</tr>\n</tbody>\n</table>\n</div><p>Optionally you can store additional information about the goal. They can be only retrieved using the API.</p>\n<h4 id=\"optional-parameters\">Optional parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>order_id</code></td>\n<td><code>AP723HVCA721</code></td>\n</tr>\n<tr>\n<td><code>order_description</code></td>\n<td><code>Nike shoes</code></td>\n</tr>\n<tr>\n<td><code>order_price</code></td>\n<td><code>199.00</code>, only the period is allowed as a separation character</td>\n</tr>\n<tr>\n<td><code>order_currency</code></td>\n<td><code>USD</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"add-a-new-goal\">Add a new goal</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://api.livechatinc.com/goals\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/goals\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-VERSION:2 \\\n  -d \"name=new%20goal&amp;\\\n  type=url&amp;\\\n  url=http://www.mystore.com/checkout/thank_you&amp;\\\n  match_type=exact\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/goals\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n        \"name\":\"new goal\",\n        \"type\":\"url\",\n        \"url\":\"http://www.mystore.com/checkout/thank_you\",\n        \"match_type\":\"exact\"\n     }'\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 2231,\n  \"name\": \"new goal\",\n  \"active\": 1,\n  \"type\": \"url\",\n  \"match_type\": \"exact\",\n  \"url\": \"http://www.mystore.com/checkout/thank_you\"\n}\n</code></pre>\n<p>Creates a new goal.</p>\n<h4 id=\"required-parameters-1\">Required parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"additional-info-1\">Additional info</h4>\n<p>The <code>type</code> can take the following values:</p>\n<ul>\n<li><code>custom_variable</code> – with two additional parameters: <code>custom_variable_name</code>, <code>custom_variable_value</code>. Both are required.</li>\n<li><code>url</code> – with two additional parameters: <code>url</code> (required) and <code>match_type</code> (optional) with possible values: <code>substring</code> (default), <code>exact</code>.</li>\n<li><code>api</code> – with no additional parameters.</li>\n</ul>\n<p>The <code>active</code> parameter indicates whether the goal is active or not.</p>\n<h2 id=\"update-a-goal\">Update a goal</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT https://api.livechatinc.com/goals/&lt;GOAL_ID&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/goals/2231\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X PUT -d \"name=new%20goal%20paused&amp;\\\n  active=0\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/goals/2231\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n        \"name\":\"new goal paused\",\n        \"active\":0\n     }'\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 2231,\n  \"name\": \"new goal paused\",\n  \"active\": 0,\n  \"type\": \"url\",\n  \"match_type\": \"exact\",\n  \"url\": \"http://www.mystore.com/checkout/thank_you\"\n}\n</code></pre>\n<p>Updates the specified goal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>\n<p>The <code>GOAL_ID</code> is obtained from the <a href=\"#list-all-goals\">goals list</a>.</p>\n<h4 id=\"optional-parameters-1\">Optional parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"additional-info-2\">Additional info</h4>\n<p>The <code>type</code> can take the following values:</p>\n<ul>\n<li><code>custom_variable</code> – with two additional parameters: <code>custom_variable_name</code>, <code>custom_variable_value</code>. Both are required.</li>\n<li><code>url</code> – with two additional parameters: <code>url</code> (required) and <code>match_type</code> (optional) with possible values: <code>substring</code> (default), <code>exact</code>.</li>\n<li><code>api</code> – with no additional parameters.</li>\n</ul>\n<p>The <code>active</code> parameter indicates whether the goal is active or not.</p>\n<h2 id=\"remove-a-goal\">Remove a goal</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>DELETE https://api.livechatinc.com/goals/&lt;GOAL_ID&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/goals/2231\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X DELETE\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"result\": \"goal removed successfully\"\n}\n</code></pre>\n<p>Removes a goal with the given <code>GOAL_ID</code>.</p>\n","event":[{"listen":"prerequest","script":{"id":"dbb3df06-9cd9-4b2c-a811-654a4b73a9a5","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"af4ffb99-df0e-442c-86d6-23d818eb4282","type":"text/javascript","exec":[""]}}],"_postman_id":"12f9b67a-c8a4-0fda-094f-85a57f9ee8a1","auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":true,"source":{"_postman_id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","name":"LiveChat REST API","type":"collection"}}},{"name":"Greetings","item":[{"name":"List all greetings","id":"6839632d-528f-9324-e93d-7d00f9b7854d","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/greetings?groups=ABC123","description":"<p>Returns the list of all greetings.</p>\n","urlObject":{"protocol":"https","path":["greetings"],"host":["api","livechatinc","com"],"query":[{"key":"groups","value":"ABC123"}],"variable":[]}},"response":[],"_postman_id":"6839632d-528f-9324-e93d-7d00f9b7854d"},{"name":"Get a single greeting","id":"073a5a2a-db11-3a19-ba24-206d4df61a18","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/greetings/ABC123","description":"<p>Returns the specified greeting.</p>\n","urlObject":{"protocol":"https","path":["greetings","ABC123"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"073a5a2a-db11-3a19-ba24-206d4df61a18"},{"name":"Create a new greeting","id":"8a012b3e-8ca7-f2d1-120a-8bc110fe1777","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"POST","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"my custom invitation","type":"text"},{"key":"rules[0][type]","value":"visit_time_page","type":"text"},{"key":"rules[0][value]","value":"15","type":"text"},{"key":"rules[0][operator]","value":"greater_than","type":"text"},{"key":"rules[1][type]","value":"visits_number","type":"text"},{"key":"rules[1][value]","value":"2","type":"text"},{"key":"rules[1][operator]","value":"greater_or_equal","type":"text"}]},"url":"https://api.livechatinc.com/greetings","description":"<p>Use this function to create a new greeting.</p>\n","urlObject":{"protocol":"https","path":["greetings"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"8a012b3e-8ca7-f2d1-120a-8bc110fe1777"},{"name":"Update greeting","id":"9a294828-9c45-cf70-6e39-6ea0bd26f193","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"PUT","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"athletic shoes","type":"text"},{"key":"properties[greeting-message_text]","value":"Hello","type":"text"}]},"url":"https://api.livechatinc.com/greetings/2491","description":"<p>Use this request to change the name or message of a greeting.</p>\n","urlObject":{"protocol":"https","path":["greetings","2491"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"9a294828-9c45-cf70-6e39-6ea0bd26f193"},{"name":"Remove a greeting","id":"97df5b12-555f-d1e5-dda2-8f8f94e4ed0b","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"DELETE","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/greetings/ABC123","description":"<p>Removes a greeting.</p>\n","urlObject":{"protocol":"https","path":["greetings","ABC123"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"97df5b12-555f-d1e5-dda2-8f8f94e4ed0b"}],"id":"712b3ffe-2e16-1c2e-ad35-d9e6301c8052","description":"<h1 id=\"greetings\">Greetings</h1>\n<p>You can use this method to create new and modify the existing <a href=\"https://www.livechatinc.com/kb/why-should-i-set-up-chat-greetings/\">Greetings</a>. It can be also used to <strong>look up Greetings data</strong>.</p>\n<h2 id=\"available-paths-greetings-available-paths\">Available paths {#greetings-available-paths}</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Methods</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>GET</code>, <code>POST</code></td>\n<td><code>/greetings</code></td>\n</tr>\n<tr>\n<td><code>GET</code>, <code>POST</code>, <code>DELETE</code></td>\n<td><code>/greetings/&lt;GREETING_ID&gt;</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"list-all-greetings\">List all greetings</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET -H X-API-Version:2 https://api.livechatinc.com/greetings\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/greetings\\\n  ?group=1\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  {\n    \"id\": 2291,\n    \"active\": true,\n    \"name\": \"Time on site: 5 sec\",\n    \"rules\": [\n      {\n        \"id\": 8201,\n        \"value\": \"5\",\n        \"type\": \"visit_time_site\",\n        \"operator\": \"equals\",\n        \"condition\": \"and\"\n      }\n    ],\n    \"properties\": {\n      \"active\": \"1\",\n      \"greeting-message_text\": \"Hello, how may I help you?\"\n    }\n  },\n  {\n    \"id\": 2411,\n    \"active\": true,\n    \"name\": \"Returning visitor\",\n    \"rules\": [\n      {\n        \"id\": 8191,\n        \"value\": \"2\",\n        \"type\": \"visits_number\",\n        \"operator\": \"greater_or_equal\",\n        \"condition\": \"and\"\n      }\n    ],\n    \"properties\": {\n      \"active\": \"1\",\n      \"greeting-message_text\": \"Hello again!\"\n    }\n  }\n]\n</code></pre>\n<p>Returns the list of all greetings.</p>\n<h4 id=\"optional-properties\">Optional properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>group</code></td>\n<td>Group number can be specified to get greetings from a given group. If not specified, all greetings will be returned</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"get-a-single-greeting\">Get a single greeting</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET -H X-API-Version:2 https://api.livechatinc.com/greetings/&lt;GREETING_ID&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/greetings/2411\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample result</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 2411,\n  \"active\": true,\n  \"name\": \"Returning visitor\",\n  \"rules\": [\n    {\n      \"id\": 8191,\n      \"value\": \"2\",\n      \"type\": \"visits_number\",\n      \"operator\": \"greater_or_equal\",\n      \"condition\": \"and\"\n    }\n  ],\n  \"properties\": {\n    \"active\": \"1\",\n    \"greeting-message_text\": \"Hello again!\"\n  }\n}\n</code></pre>\n<p>Returns the specified greeting.</p>\n<h4 id=\"additional-info\">Additional info:</h4>\n<ul>\n<li><code>active</code> – Indicates whether the greeting is enabled or not</li>\n<li><code>rules</code> – Returns an array with all the rules for the specified greeting</li>\n</ul>\n<h2 id=\"create-a-new-greeting\">Create a new greeting</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>[POST] /greetings\n</code></pre><p>Use this function to create a new greeting.</p>\n<h4 id=\"required-properties\">Required properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td>greeting name displayed in the LiveChat settings (not visible to your website's visitors)</td>\n</tr>\n<tr>\n<td><code>rules</code></td>\n<td>an array of conditions that must be met for the greeting to be displayed. Greeting rules are <a href=\"#greeting-rules\">documented below</a></td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"optional-properties-1\">Optional properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>group</code></td>\n<td>creates a greeting displayed in a particular group only. Defaults to <code>0</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"greeting-rules\">Greeting rules</h2>\n<blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/greetings\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -d \"name=my+custom+invitation&amp;\\\nrules[0][type]=visit_time_page&amp;\\\nrules[0][value]=15&amp;\\\nrules[0][operator]=greater_than&amp;\\\nrules[1][type]=visits_number&amp;\\\nrules[1][value]=2&amp;\\\nrules[1][operator]=greater_or_equal\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/greetings\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n        \"name\":\"my custom invitation\",\n        \"rules\":[\n          {\n            \"type\":\"visit_time_page\",\n            \"value\":15,\n            \"operator\":\"greater_than\"\n          },\n          {\n            \"type\":\"visits_number\",\n            \"value\":2,\n            \"operator\":\"greater_or_equal\"\n          }\n        ]\n      }'\n</code></pre>\n<blockquote>\n<p>Sample result</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 2451,\n  \"active\": true,\n  \"name\": \"my custom invitation\",\n  \"rules\": [\n    {\n      \"id\": 8241,\n      \"value\": \"2\",\n      \"type\": \"visits_number\",\n      \"operator\": \"greater_or_equal\",\n      \"condition\": \"and\"\n    },\n    {\n      \"id\": 8251,\n      \"value\": \"15\",\n      \"type\": \"visit_time_page\",\n      \"operator\": \"greater_than\",\n      \"condition\": \"and\"\n    }\n  ],\n  \"properties\": {\n    \"active\": \"1\",\n    \"greeting-message_text\": \"Hello, would you like to talk about our products?\"\n  }\n}\n</code></pre>\n<p>Greeting rules are the conditions that must be met for a greeting to be displayed.</p>\n<p>Each greeting rule can contain an <code>operator</code>. Here's a list of possible operators:</p>\n<ul>\n<li><code>equals</code>, </li>\n<li><code>doesnt_equal</code>, </li>\n<li><code>lower_than</code>, </li>\n<li><code>lower_or_equal</code>, </li>\n<li><code>greater_than</code>, </li>\n<li><code>greater_or_equal</code>, </li>\n<li><code>contains</code>, </li>\n<li><code>doesnt_contain</code>.</li>\n</ul>\n<p>The default value for <code>operator</code> is <code>equals</code>.</p>\n<p>And here's a list of the greeting rules that you can use:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Rule</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>visit_time_site</code></td>\n<td>After a visitor has spent a certain amount of time on the site</td>\n</tr>\n<tr>\n<td><code>visit_time_page</code></td>\n<td>After a visitor has spent a certain amount of time on a page</td>\n</tr>\n<tr>\n<td><code>url_current</code></td>\n<td>For the visitors on specific pages</td>\n</tr>\n<tr>\n<td><code>url_visited</code></td>\n<td>When a visitor has visited specific pages</td>\n</tr>\n<tr>\n<td><code>pages_view_number</code></td>\n<td>For the visitors who have seen a page for a number of times</td>\n</tr>\n<tr>\n<td><code>url_referrer</code></td>\n<td>When the visitor has arrived from a referring page</td>\n</tr>\n<tr>\n<td><code>geolocation</code></td>\n<td>For the visitors from specific countries or cities</td>\n</tr>\n<tr>\n<td><code>visits_number</code></td>\n<td>For the returning visitors</td>\n</tr>\n<tr>\n<td><code>search_keyword</code></td>\n<td>When a visitor has searched for a specific keyword</td>\n</tr>\n<tr>\n<td><code>custom_variable</code></td>\n<td>The greeting will be sent when the specified variable is met <a href=\"#custom-variable\">documented below</a></td>\n</tr>\n<tr>\n<td><code>url_funnel</code></td>\n<td>The visitors who visit the specified sequence of websites will receive the greeting <a href=\"#url-funnel\">documented below</a></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"custom-variable\">Custom variable</h3>\n<blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/greetings\\\n  ?group=1\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -d \"name=custom+variable+type+greeting&amp;\\\nrules[0][type]=custom_variable&amp;\\\nrules[0][variable_name]=my_custom_var&amp;\\\nrules[0][variable_value]=var_value&amp;\\\nrules[0][operator]=contains\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl \"https://api.livechatinc.com/greetings\\\n  ?group=1\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n        \"name\":\"custom variable type greeting\",\n        \"rules\":[\n          {\n            \"type\":\"custom_variable\",\n            \"variable_name\":\"my_custom_var\",\n            \"variable_value\":\"var_value\"\n            \"operator\":\"contains\"\n          }\n        ]\n      }'\n</code></pre><blockquote>\n<p>Sample result</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 2431,\n  \"active\": true,\n  \"name\": \"custom variable type greeting\",\n  \"rules\": [\n    {\n      \"id\": 8221,\n      \"type\": \"custom_variable\",\n      \"operator\": \"contains\",\n      \"condition\": \"and\",\n      \"variable_name\": \"my_custom_var\",\n      \"variable_value\": \"var_value\"\n    }\n  ],\n  \"properties\": {\n    \"active\": \"1\",\n    \"greeting-message_text\": \"Hello, would you like to talk about our products?\"\n  }\n}\n</code></pre>\n<p>The greeting will be sent when the specified variable is met.</p>\n<aside>When using the `custom_variable` greeting rule, you also need to provide `variable_name` and `variable_value`. You also can add the optional `operator` parameter (defaults to `equals`).</aside>\n\n\n\n<h3 id=\"url-funnel\">URL Funnel</h3>\n<blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/greetings\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -d \"name=url+funnel+type+greeting&amp;\\\nrules[0][type]=url_funnel&amp;\\\nrules[0][urls][0][url]=mystore.com/shoes&amp;\\\nrules[0][urls][0][operator]=equals&amp;\\\nrules[0][urls][1][url]=cart&amp;\\\nrules[0][urls][1][operator]=contains\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/greetings\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n        \"name\":\"url funnel type greeting\",\n        \"rules\":[\n          {\n            \"type\":\"url_funnel\",\n            \"urls\":[\n              {\n                \"url\":\"mystore.com/shoes\",\n                \"operator\":\"equals\"\n              },\n              {\n                \"url\":\"cart\",\n                \"operator\":\"contains\"\n              }\n            ]\n          }\n        ]\n      }'\n</code></pre>\n<blockquote>\n<p>Sample result</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 2441,\n  \"active\": true,\n  \"name\": \"url funnel type greeting\",\n  \"rules\": [\n    {\n      \"id\": 8231,\n      \"type\": \"url_funnel\",\n      \"condition\": \"and\",\n      \"urls\": [\n        {\n          \"url\": \"mystore.com/shoes\",\n          \"operator\": \"equals\"\n        },\n        {\n          \"url\": \"cart\",\n          \"operator\": \"contains\"\n        }\n      ]\n    }\n  ],\n  \"properties\": {\n    \"active\": \"1\",\n    \"greeting-message_text\": \"Hello, would you like to talk about our products?\"\n  }\n}\n</code></pre>\n<p>The visitors who have visited the specified sequence of pages will receive the greeting.</p>\n<aside>When using the `url_funnel` greeting rule, you need to provide the `urls` variable. It is an array of objects with the required `url` parameter and the optional `operator` parameter (defaults to: `equals`).</aside>\n\n<h2 id=\"greetings-with-multiple-rules\">Greetings with multiple rules</h2>\n<blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/greetings\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -d \"name=my+custom+invitation&amp;\\\nrules[0][type]=visit_time_site&amp;\\\nrules[0][value]=15&amp;\\\nrules[1][type]=custom_variable&amp;\\\nrules[1][variable_name]=empty_cart&amp;\\\nrules[1][variable_value]=true&amp;\\\nrules[2][type]=url_current&amp;\\\nrules[2][value]=shoes&amp;\\\nrules[2][operator]=contains\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/greetings\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n        \"name\":\"my custom invitation\",\n        \"rules\":[\n          {\n            \"type\":\"visit_time_site\",\n            \"value\":15\n          },\n          {\n            \"type\":\"custom\",\n            \"variable_name\":\"empty_cart\",\n            \"variable_value\":true\n          },\n          {\n            \"type\":\"url_current\",\n            \"value\":\"shoes\",\n            \"operator\":\"contains\"\n          }\n        ]\n      }'\n</code></pre>\n<blockquote>\n<p>Sample result</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 2471,\n  \"active\": true,\n  \"name\": \"my custom invitation\",\n  \"rules\": [\n    {\n      \"id\": 8261,\n      \"type\": \"custom_variable\",\n      \"operator\": \"equals\",\n      \"condition\": \"and\",\n      \"variable_name\": \"empty_cart\",\n      \"variable_value\": \"true\"\n    },\n    {\n      \"id\": 8271,\n      \"value\": \"15\",\n      \"type\": \"visit_time_site\",\n      \"operator\": \"equals\",\n      \"condition\": \"and\"\n    },\n    {\n      \"id\": 8281,\n      \"value\": \"shoes\",\n      \"type\": \"url_current\",\n      \"operator\": \"contains\",\n      \"condition\": \"and\"\n    }\n  ],\n  \"properties\": {\n    \"active\": \"1\",\n    \"greeting-message_text\": \"Hello, would you like to talk about our products?\"\n  }\n}\n</code></pre>\n<p>You can create a greeting that will have more than one rule.</p>\n<h2 id=\"update-a-greeting\">Update a greeting</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">PUT -H X-API-Version:2 -d \"...\" \"https://api.livechatinc.com/greetings/&lt;GREETING_ID&gt;\"\n</code></pre>\n<p>You can change the previously created greetings using this request. The <code>GREETING_ID</code> is obtained from the list of <a href=\"#get-greetings\">all greetings</a>.</p>\n<h3 id=\"update-greeting-name-or-message\">Update greeting name or message</h3>\n<blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/greetings/2491\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X PUT -d \"name=athletic+shoes&amp;\\\nproperties[greeting-message_text]=Hello\"\n</code></pre>\n<p>Use this request to change the name or message of a greeting.</p>\n<h3 id=\"activate-and-deactivate-greetings\">Activate and deactivate greetings</h3>\n<blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/greetings/2491\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X PUT -d \"active=0\"\n</code></pre>\n<p>Activate or deactivate a greeting using this request.</p>\n<h3 id=\"change-greetings-rules\">Change greetings rules</h3>\n<blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/greetings/2491\"\\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X PUT -d \"rules[0][type]=custom_variable&amp;\\\nrules[0][variable_name]=athletic_shoes&amp;\\\nrules[0][variable_value]=true\" \n</code></pre>\n<blockquote>\n<p>Sample result</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 2491,\n  \"active\": false,\n  \"name\": \"athletic shoes\",\n  \"rules\": [\n    {\n      \"id\": 8371,\n      \"type\": \"custom_variable\",\n      \"operator\": \"equals\",\n      \"condition\": \"and\",\n      \"variable_name\": \"athletic_shoes\",\n      \"variable_value\": \"true\"\n    }\n  ],\n  \"properties\": {\n    \"active\": \"0\",\n    \"greeting-message_text\": \"Hi, are you looking for some athletic shoes\"\n  }\n}\n</code></pre>\n<p>Change the rules of your greetings with this request.</p>\n<h2 id=\"remove-a-greeting\">Remove a greeting</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>DELETE https://api.livechatinc.com/greetings/&lt;GREETING_ID&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/greetings/2491\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X DELETE\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"ok\": true\n}\n</code></pre>\n<p>Removes a greeting.</p>\n","event":[{"listen":"prerequest","script":{"id":"5f3fc636-6f72-40c1-a559-5aa472b12c27","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"d248288d-75de-4acb-bac2-d7aacf20a254","type":"text/javascript","exec":[""]}}],"_postman_id":"712b3ffe-2e16-1c2e-ad35-d9e6301c8052","auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":true,"source":{"_postman_id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","name":"LiveChat REST API","type":"collection"}}},{"name":"Groups","item":[{"name":"List all groups","id":"d9762536-29d1-dfac-bb23-8498761c55e8","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/groups","description":"<p>Returns all created groups.</p>\n","urlObject":{"protocol":"https","path":["groups"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"d9762536-29d1-dfac-bb23-8498761c55e8"},{"name":"Get a single group details","id":"8ce98ef0-c0cc-ac52-723c-e2021f67024d","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/groups/{{group_id}}","description":"<p>Returns group details for the given GROUP_ID.</p>\n","urlObject":{"protocol":"https","path":["groups","{{group_id}}"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"8ce98ef0-c0cc-ac52-723c-e2021f67024d"},{"name":"Create a new group","id":"d284b657-be36-be02-6262-4ad5c94338ec","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"POST","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Human Resources","type":"text"},{"key":"agents[0]","value":"jenny.doe@mycompany.com","type":"text"},{"key":"agents[1]","value":"john.doe@mycompany.com","type":"text"}]},"url":"https://api.livechatinc.com/groups","description":"<p>Creates a new group in your license.</p>\n","urlObject":{"protocol":"https","path":["groups"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"d284b657-be36-be02-6262-4ad5c94338ec"},{"name":"Update a group","id":"f28c7e69-b861-ce90-6dec-5459ea8cbbcb","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"PUT","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Quality+Assurance","type":"text"},{"key":"agents[0]","value":"john.doe@mycompany.com","type":"text"},{"key":"agents[1]","value":"jane.doe@mycompany.com","type":"text"}]},"url":"https://api.livechatinc.com/groups/ABC123","description":"<p>Updates the specified group by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>\n","urlObject":{"protocol":"https","path":["groups","ABC123"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"f28c7e69-b861-ce90-6dec-5459ea8cbbcb"},{"name":"Remove a group","id":"983187af-c701-ef34-7672-0c56775c02fd","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"DELETE","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/groups/ABC123","description":"<p>Removes a group with the given GROUP_ID.</p>\n","urlObject":{"protocol":"https","path":["groups","ABC123"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"983187af-c701-ef34-7672-0c56775c02fd"}],"id":"1d4192aa-9511-4c02-8d28-26503498a69b","description":"<h1 id=\"groups\">Groups</h1>\n<p>Use this method to get <a href=\"https://www.livechatinc.com/features/team-management/#Groups\">Agent Groups</a> data and also to <strong>create new</strong> and <strong>modify the existing</strong> Groups.</p>\n<h2 id=\"available-paths-groups-available-paths\">Available paths {#groups-available-paths}</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Methods</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>GET</code>, <code>POST</code></td>\n<td><code>/groups</code></td>\n</tr>\n<tr>\n<td><code>GET</code>, <code>PUT</code>, <code>DELETE</code></td>\n<td><code>/groups/&lt;GROUP_ID&gt;</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"list-all-groups\">List all groups</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/groups\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/groups\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  {\n    \"id\": 0,\n    \"name\": \"All operators\",\n    \"language\": \"en\",\n    \"status\": \"accepting chats\"\n  },\n  {\n    \"id\": 1,\n    \"name\": \"Invoicing\",\n    \"language\": \"en\",\n    \"agents\": [\n      \"jane.doe@mycompany.com\"\n    ],\n    \"status\": \"offline\"\n  },\n  {\n    \"id\": 2,\n    \"name\": \"Sales\",\n    \"language\": \"en\",\n    \"agents\": [\n      \"john.doe@mycompany.com\",\n      \"jenny.doe@mycompany.com\"\n    ],\n    \"status\": \"not accepting chats\"\n  },\n  {\n    \"id\": 3,\n    \"name\": \"Technical Support\",\n    \"language\": \"en\",\n    \"agents\": [\n      \"john.doe@mycompany.com\"\n    ],\n    \"status\": \"accepting chats\"\n  }\n]\n</code></pre>\n<p>Returns all created groups.</p>\n<h4 id=\"additional-info\">Additional info:</h4>\n<ul>\n<li><code>language</code> specifies the chat window language for the particular group.  </li>\n<li><code>agents</code> list contains all members of the particular group. The group with id <em>0</em> doesn't return the agents list because it always contains all agents from the license and it cannot be modified.</li>\n</ul>\n<h2 id=\"get-a-single-group-details\">Get a single group details</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/groups/&lt;GROUP_ID&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl \"https://api.livechatinc.com/groups/2\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre><blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 2,\n  \"name\": \"Sales\",\n  \"language\": \"en\",\n  \"agents\": [\n    \"john.doe@mycompany.com\",\n    \"jenny.doe@mycompany.com\"\n  ],\n  \"status\": \"accepting chats\"\n}\n   \n</code></pre>\n<p>Returns group details for the given <code>GROUP_ID</code>.</p>\n<h4 id=\"attributes\">Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>id</code></td>\n<td>id of the group</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>group name</td>\n</tr>\n<tr>\n<td><code>language</code></td>\n<td>group language (defaults to English). See the <a href=\"http://www.livechatinc.com/kb/how-to-modify-chat-window-language/#supported-languages\">list of supported languages</a></td>\n</tr>\n<tr>\n<td><code>agents</code></td>\n<td>an array of group members' logins</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>current status of the group</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"additional-info-1\">Additional info:</h4>\n<p>The <code>status</code> can take the following values:</p>\n<ul>\n<li><code>accepting chats</code> – when at least one agent from the group is logged in and has the <code>accepting chats</code> status.</li>\n<li><code>not accepting chats</code> – when at least one agent from the group is logged in but has the <code>not accepting chats</code> status.</li>\n<li><code>offline</code> – when all agents from the group are offline.</li>\n</ul>\n<h2 id=\"create-a-new-group\">Create a new group</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://api.livechatinc.com/groups\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/groups\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -d \"name=Human+Resources&amp;\\\nagents[0]=jenny.doe@mycompany.com&amp;\\\nagents[1]=john.doe@mycompany.com\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/groups\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n       \"name\":\"Human Resources\",\n       \"agents[0]\":\"jenny.doe@mycompany.com\",\n       \"agents[1]\":\"john.doe@mycompany.com\" \n      }'  \n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 4,\n  \"name\": \"Human Resources\",\n  \"language\": \"en\",\n  \"agents\": [\n    \"jenny.doe@mycompany.com\",\n    \"john.doe@mycompany.com\"\n  ],\n  \"status\": \"offline\"\n}\n   \n</code></pre>\n<p>Creates a new group in your license.</p>\n<h4 id=\"required-properties\">Required properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td>group name</td>\n</tr>\n<tr>\n<td><code>agents</code></td>\n<td>an array of LiveChat users' logins (e-mails)</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"optional-properties\">Optional properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>language</code></td>\n<td>group language (defaults to English). See the <a href=\"http://www.livechatinc.com/kb/how-to-modify-chat-window-language/#supported-languages\">list of supported languages</a></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"update-a-group\">Update a group</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT https://api.livechatinc.com/groups/&lt;GROUP_ID&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/groups/3\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X PUT \\\n  -d \"name=Quality+Assurance&amp;\\\nagents[0]=john.doe@mycompany.com&amp;\\\nagents[1]=jane.doe@mycompany.com\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/groups/3\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 -X PUT \\   \n  -H Content-type:application/json \\\n  -d '{\n        \"name\"=\"Quality Assurance\",\n        \"agents[0]\":\"john.doe@mycompany.com\",\n        \"agents[1]\":\"jane.doe@mycompany.com\"\n      }'\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 3,\n  \"name\": \"Quality Assurance\",\n  \"language\": \"en\",\n  \"agents\": [\n    \"john.doe@mycompany.com\",\n    \"jane.doe@mycompany.com\"\n  ],\n  \"status\": \"offline\"\n }\n   \n</code></pre>\n<p>Updates the specified group by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>\n<h4 id=\"optional-properties-1\">Optional properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td>group name</td>\n</tr>\n<tr>\n<td><code>language</code></td>\n<td>see the <a href=\"http://www.livechatinc.com/kb/how-to-modify-chat-window-language/#supported-languages\">list of supported languages</a></td>\n</tr>\n<tr>\n<td><code>agents</code></td>\n<td>an array of LiveChat users' logins (e-mails)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"remove-a-group\">Remove a group</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>DELETE https://api.livechatinc.com/groups/&lt;GROUP_ID&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/groups/4\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X DELETE\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"result\": \"group removed successfully\"\n}\n   \n</code></pre>\n<p>Removes a group with the given <code>GROUP_ID</code>.</p>\n","event":[{"listen":"prerequest","script":{"id":"05c0e34d-fa58-4f11-b378-9355165934bb","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"897a62e2-eee5-41d9-b623-9e09bb44e1fe","type":"text/javascript","exec":[""]}}],"_postman_id":"1d4192aa-9511-4c02-8d28-26503498a69b","auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":true,"source":{"_postman_id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","name":"LiveChat REST API","type":"collection"}}},{"name":"Reports","item":[{"name":"Chat engagement","id":"6d6a1178-439f-3ee3-1bb5-61dc17259b4b","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/chats/engagement?date_from=2013-01-29&date_to=2013-01-29&agent=john.doe@mycompany.com&group_by=hour","description":"<p>This report shows you where you get your chats from. They can come from i.e. automatic invitations, manual invitations or the visitors can start the chats by themselves.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","engagement"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"2013-01-29"},{"key":"date_to","value":"2013-01-29"},{"key":"agent","value":"john.doe@mycompany.com"},{"key":"group_by","value":"hour"}],"variable":[]}},"response":[],"_postman_id":"6d6a1178-439f-3ee3-1bb5-61dc17259b4b"},{"name":"Total chats","id":"a626222b-f75d-47dc-cda9-ec8f8e8969b5","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/chats/total_chats?date_from=2013-01-29&date_to=2013-01-29&agent=john.doe@mycompany.com&group_by=hour","description":"<p>Shows how many chats occurred during the specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","total_chats"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"2013-01-29"},{"key":"date_to","value":"2013-01-29"},{"key":"agent","value":"john.doe@mycompany.com"},{"key":"group_by","value":"hour"}],"variable":[]}},"response":[],"_postman_id":"a626222b-f75d-47dc-cda9-ec8f8e8969b5"},{"name":"Chat ratings report","id":"66a1fca0-f266-16af-395c-a301c64ecbbe","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/chats/ratings?group=2&date_from=2012-01-29&date_to=2013-01-29&group_by=month","description":"<p>Shows how many chats have been rated and how they have been rated during a specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","ratings"],"host":["api","livechatinc","com"],"query":[{"key":"group","value":"2"},{"key":"date_from","value":"2012-01-29"},{"key":"date_to","value":"2013-01-29"},{"key":"group_by","value":"month"}],"variable":[]}},"response":[],"_postman_id":"66a1fca0-f266-16af-395c-a301c64ecbbe"},{"name":"Chat Ranking","id":"3589e755-3ec5-6dda-6016-de82b9a92821","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/chats/ratings/ranking","description":"<p>Shows the ratio of good to bad ratings for each operator.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","ratings","ranking"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"3589e755-3ec5-6dda-6016-de82b9a92821"},{"name":"Queued visitors","id":"c8bd3c4d-e238-a00d-9182-8fa07f9ddaf7","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/chats/queued_visitors?date_from=2013-01-29&group=2","description":"<p>Shows how many visitors waited in the queue and how many abandoned the queue or proceeded to chats</p>\n","urlObject":{"protocol":"https","path":["reports","chats","queued_visitors"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"2013-01-29"},{"key":"group","value":"2"}],"variable":[]}},"response":[],"_postman_id":"c8bd3c4d-e238-a00d-9182-8fa07f9ddaf7"},{"name":"Queue waiting times","id":"f9c28fbc-f7ff-e065-2a61-8776a7504ff2","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/chats/queued_visitors/waiting_times?date_from=2013-01-29&group=2","description":"<p>Shows the Minimum, Average and Maximum waiting time.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","queued_visitors","waiting_times"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"2013-01-29"},{"key":"group","value":"2"}],"variable":[]}},"response":[],"_postman_id":"f9c28fbc-f7ff-e065-2a61-8776a7504ff2"},{"name":"Availability","id":"bb2cda46-3d8e-da49-7875-69a337069422","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/availability","description":"<p>Shows how long an agent (or a group or the whole account) was available for chatting during a specified period. When querying for one day, the results are shown in minutes per every hour, otherwise in hours for each day.</p>\n","urlObject":{"protocol":"https","path":["reports","availability"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"bb2cda46-3d8e-da49-7875-69a337069422"},{"name":"Chatting time","id":"bc0c95cb-d3bc-c70f-c65c-ee06670e19f3","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/chats/chatting_time","description":"<p>Shows how much time an agent (or a group) spent on chatting during a specified period. When querying for one day, the results are shown in minutes per every hour, otherwise in hours for each day.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","chatting_time"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"bc0c95cb-d3bc-c70f-c65c-ee06670e19f3"},{"name":"Chats first response time","id":"222cb87c-f1e1-bab2-4960-aa4476f3e50f","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/chats/first_response_time","description":"<p>The average amount of time it takes the agents to respond to a new chat over a specified period of time.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","first_response_time"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"222cb87c-f1e1-bab2-4960-aa4476f3e50f"},{"name":"Chats response time","id":"6383811f-ee1c-e277-25cf-39ce2f9d5e91","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/chats/response_time","description":"<p>The average amount of time it takes the agents to respond to a new message in a chat during a specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","response_time"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"6383811f-ee1c-e277-25cf-39ce2f9d5e91"},{"name":"Number of simultaneous chats","id":"6de49fb6-98ea-a56a-3b2f-c225e838ffd4","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/chats/agents_occupancy?weekday=mon","description":"<p>This request shows the maximum number of concurrent chats that happened at the same hour on a particular day.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","agents_occupancy"],"host":["api","livechatinc","com"],"query":[{"key":"weekday","value":"mon"}],"variable":[]}},"response":[],"_postman_id":"6de49fb6-98ea-a56a-3b2f-c225e838ffd4"},{"name":"Goals","id":"26e4bcad-dc13-b1fb-6f5b-83c39789f8c1","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/chats/goals?date_from=2013-01-01&goal=71&group_by=month","description":"<p>Shows the number of reached goals.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","goals"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"2013-01-01"},{"key":"goal","value":"71"},{"key":"group_by","value":"month"}],"variable":[]}},"response":[],"_postman_id":"26e4bcad-dc13-b1fb-6f5b-83c39789f8c1"},{"name":"Greetings","id":"fd0ac7a0-6a31-8fc4-5575-e243e55f0e89","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/chats/greetings?date_from=2014-01-13&date_to=2014-02-14&group_by=month","description":"<p>Returns the “greetings to chats to goals” conversion rates report.</p>\n<p>displayed is the number of displayed greetings. accepted tells you how many chats resulted from these greetings. goals tells you how many goals resulted from these greetings.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","greetings"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"2014-01-13"},{"key":"date_to","value":"2014-02-14"},{"key":"group_by","value":"month"}],"variable":[]}},"response":[],"_postman_id":"fd0ac7a0-6a31-8fc4-5575-e243e55f0e89"},{"name":"New tickets","id":"c6d4c562-17ed-ab05-72c7-5e561c58edca","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/tickets/new_tickets?date_from=2013-01-29&date_to=2013-01-29&group_by=hour","description":"<p>Shows the number of the tickets created during the specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","new_tickets"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"2013-01-29"},{"key":"date_to","value":"2013-01-29"},{"key":"group_by","value":"hour"}],"variable":[]}},"response":[],"_postman_id":"c6d4c562-17ed-ab05-72c7-5e561c58edca"},{"name":"Tickets first response time","id":"cd10bdb8-9153-5277-ce6b-8706a5b82524","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/tickets/first_response_time?date_from=2014-01-10&date_to=2014-01-20&agent=john.doe@mycompany.com","description":"<p>Shows the time of the first response to the tickets that were responded to for the first time during the specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","first_response_time"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"2014-01-10"},{"key":"date_to","value":"2014-01-20"},{"key":"agent","value":"john.doe@mycompany.com"}],"variable":[]}},"response":[],"_postman_id":"cd10bdb8-9153-5277-ce6b-8706a5b82524"},{"name":"Solved tickets","id":"119255c0-1bbb-6b2a-1cba-89753edace85","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/tickets/solved_tickets?date_from=2014-01-10&date_to=2014-01-20","description":"<p>Shows the number of the tickets solved during the specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","solved_tickets"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"2014-01-10"},{"key":"date_to","value":"2014-01-20"}],"variable":[]}},"response":[],"_postman_id":"119255c0-1bbb-6b2a-1cba-89753edace85"},{"name":"Tickets resolution time","id":"7235920e-f5a4-f8b1-443b-d0fd2f6b9f0e","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/tickets/resolution_time?date_from=2014-01-10&date_to=2014-01-20","description":"<p>Shows the resolution time of the tickets that were solved during the specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","resolution_time"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"2014-01-10"},{"key":"date_to","value":"2014-01-20"}],"variable":[]}},"response":[],"_postman_id":"7235920e-f5a4-f8b1-443b-d0fd2f6b9f0e"},{"name":"Ticket sources","id":"fc7ba8cd-aa75-0cfe-e1fa-be43e75c45d9","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/tickets/ticket_sources?date_from=2014-01-10&date_to=2014-01-20","description":"<p>Shows the distribution of the tickets between various channels.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","ticket_sources"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"2014-01-10"},{"key":"date_to","value":"2014-01-20"}],"variable":[]}},"response":[],"_postman_id":"fc7ba8cd-aa75-0cfe-e1fa-be43e75c45d9"},{"name":"Ticket ratings report","id":"f36af221-2ccf-1db1-46f7-f1b93b4de1bc","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/tickets/ratings?group=2&date_from=2012-01-29&date_to=2013-01-29&group_by=month","description":"<p>Shows the tickets that were rated during the specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","ratings"],"host":["api","livechatinc","com"],"query":[{"key":"group","value":"2"},{"key":"date_from","value":"2012-01-29"},{"key":"date_to","value":"2013-01-29"},{"key":"group_by","value":"month"}],"variable":[]}},"response":[],"_postman_id":"f36af221-2ccf-1db1-46f7-f1b93b4de1bc"},{"name":"Ticket Ranking","id":"46532c7c-0e67-0705-7190-6f2c870844aa","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/reports/tickets/ratings/ranking","description":"<p>Shows the ratio of good to bad ratings for each operator.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","ratings","ranking"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"46532c7c-0e67-0705-7190-6f2c870844aa"}],"id":"8e6a7cdb-4af1-4715-762d-b14ea757896d","description":"<h1 id=\"reports\">Reports</h1>\n<p>This method allows you to <strong>access</strong> and <strong>extract</strong> all the <a href=\"https://www.livechatinc.com/kb/reporting-options-available-in-livechat/\">Reports</a> data available in LiveChat.</p>\n<h2 id=\"available-paths-reports-available-paths\">Available paths {#reports-available-paths}</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Methods</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/total_chats</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/engagement</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/ratings</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/ratings/ranking</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/queued_visitors</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/queued_visitors/waiting_times</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/availability</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/chatting_time</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/first_response_time</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/response_time</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/goals</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/greetings</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/new_tickets</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/first_response_time</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/solved_tickets</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/resolution_time</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/ticket_sources</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/ratings</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/ratings/ranking</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"total-chats\">Total chats</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/total_chats\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/total_chats?\\\ndate_from=2013-01-29&amp;\\\ndate_to=2013-01-29&amp;\\\nagent=john.doe@mycompany.com&amp;\\\ngroup_by=hour\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"00:00\": {\n    \"chats\": 18\n  },\n  \"01:00\": {\n    \"chats\": 19\n  },\n    \"02:00\": {\n    \"chats\": 6\n  },\n    \"03:00\": {\n      \"chats\": 15\n  },\n  \"04:00\": {\n    \"chats\": 10\n  },\n  \"05:00\": {\n    \"chats\": 14\n  },\n  \"06:00\": {\n    \"chats\": 11\n  },\n  //(...)\n  \"21:00\": {\n    \"chats\": 0\n  },\n  \"22:00\": {\n    \"chats\": 0\n  },\n  \"23:00\": {\n    \"chats\": 2\n  }\n}\n</code></pre>\n<p>Shows how many chats occurred during the specified period.</p>\n<h4 id=\"optional-arguments\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"chat-engagement\">Chat engagement</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/engagement\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/engagement?\\\ndate_from=2013-01-28&amp;\\\ndate_to=2013-01-29&amp;\\\nagent=john.doe@mycompany.com&amp;\\\ntag[]=sales&amp;\\\ngroup_by=hour\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2013-01-28\":{\n    \"chats_from_auto_invite\":1,\n    \"chats_from_immediate_start\":0,\n    \"chats_from_manual_invite\":3\n  },\n  \"2013-01-29\":{\n    \"chats_from_auto_invite\":0,\n    \"chats_from_immediate_start\":2,\n    \"chats_from_manual_invite\":0\n  }\n}\n</code></pre>\n<p>This report shows you where you get your chats from. They can come from i.e. automatic invitations, manual invitations or the visitors can start the chats by themselves.</p>\n<h4 id=\"optional-arguments-1\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"chat-ratings-report\">Chat ratings report</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/ratings\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/ratings?\\\ngroup=2&amp;\\\ndate_from=2012-01-29&amp;\\\ndate_to=2013-01-29&amp;\\\ngroup_by=month\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2012-01\": {\n    \"begin\": \"2012-01-29\",\n    \"end\": \"2012-01-31\",\n    \"bad\": 0,\n    \"good\": 6,\n    \"chats\": 37\n  },\n  \"2012-02\": {\n    \"begin\": \"2012-02-01\",\n    \"end\": \"2012-02-29\",\n    \"bad\": 4,\n    \"good\": 38,\n    \"chats\": 320\n  },\n  \"2012-03\": {\n    \"begin\": \"2012-03-01\",\n    \"end\": \"2012-03-31\",\n    \"bad\": 0,\n    \"good\": 16,\n    \"chats\": 186\n  },\n  //(...) \n  \"2012-11\": {\n    \"begin\": \"2012-11-01\",\n    \"end\": \"2012-11-30\",\n    \"bad\": 20,\n    \"good\": 49,\n    \"chats\": 389\n  }\n}\n</code></pre>\n<p>Shows how many chats have been rated and how they have been rated during a specified period.</p>\n<h4 id=\"optional-arguments-2\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"chat-ranking\">Chat Ranking</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/ratings/ranking\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/ratings/ranking\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"ranking\": [\n    {\n      \"good\": 2502,\n      \"bad\": 426,\n      \"total\": 2928,\n      \"score\": 0.8361489669658251,\n      \"name\": \"john.doe@mycompany.com\"\n    },\n    {\n      \"good\": 2164,\n      \"bad\": 443,\n      \"total\": 2607,\n      \"score\": 0.8094273999034496,\n      \"name\": \"jane.doe@mycompany.com\"\n    },\n    {\n      \"good\": 1070,\n      \"bad\": 215,\n      \"total\": 1285,\n      \"score\": 0.8029689181922964,\n      \"name\": \"jenny.doe@mycompany.com\"\n    }\n}\n</code></pre>\n<p>Shows the ratio of good to bad ratings for each operator.</p>\n<h4 id=\"optional-arguments-3\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"queued-visitors\">Queued visitors</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/queued_visitors\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/queued_visitors?\\\ndate_from=2013-01-29&amp;\\\ngroup=2\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2013-01-29\": {\n    \"queued\": {\n      \"count\": 6,\n    },\n    \"left_queue\": {\n      \"count\": 3,\n    },\n    \"entered_chat\": {\n      \"count\": 3,\n    }\n  },\n  \"2013-01-30\": {\n    \"queued\": {\n      \"count\": 2,\n    },\n    \"left_queue\": {\n      \"count\": 0\n    },\n    \"entered_chat\": {\n      \"count\": 2,\n    }\n  }\n}\n</code></pre>\n<p>Shows how many visitors waited in the queue and how many abandoned the queue or proceeded to chats.</p>\n<h4 id=\"optional-arguments-4\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"queue-waiting-times\">Queue waiting times</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/queued_visitors/waiting_times\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/queued_visitors/waiting_times?\\\ndate_from=2013-01-29&amp;\\\ngroup=2\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2013-01-29\":{\n    \"queued\":{\n      \"count\": 1,\n      \"min\":{\n        \"seconds\":0\n      },\n      \"max\":{\n        \"seconds\":112\n      },\n      \"average\":{\n        \"seconds\":24\n      }\n    },\n    \"left_queue\":{\n      \"count\": 3,\n      \"min\":{\n        \"seconds\":33\n      },\n      \"max\":{\n        \"seconds\":56\n      },\n      \"average\":{\n        \"seconds\":44\n      }\n    },\n    \"entered_chat\":{\n      \"count\": 2,\n      \"min\":{\n        \"seconds\":10\n      },\n      \"max\":{\n        \"seconds\":112\n      },\n      \"average\":{\n        \"seconds\":23\n      }\n    }\n  }\n}\n</code></pre>\n<p>Shows the Minimum, Average and Maximum waiting time.</p>\n<h4 id=\"optional-arguments-5\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"availability\">Availability</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/availability\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/availability?\\\ndate_from=2013-01-25&amp;\\\ndate_to=2013-01-30&amp;\\\nagent=john.doe@mycompany.com&amp;\\\ngroup_by=day\"\\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2013-01-25\": {\n    \"hours\": 0\n  },\n  \"2013-01-26\": {\n    \"hours\": 0\n  },\n  \"2013-01-27\": {\n    \"hours\": 0.01\n  },\n  \"2013-01-28\": {\n    \"hours\": 7.85\n  },\n  \"2013-01-29\": {\n    \"hours\": 7.99\n  },\n  \"2013-01-30\": {\n    \"hours\": 2.28\n  }\n}\n</code></pre>\n<p>Shows how long an agent (or a group or the whole account) was available for chatting during a specified period. When querying for one day, the results are shown in minutes per every hour, otherwise in hours for each day.</p>\n<h4 id=\"optional-arguments-6\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"chatting-time\">Chatting time</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/chatting_time\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/chatting_time?\\\ndate_from=2013-01-25&amp;\\\ndate_to=2013-01-30&amp;\\\ngroup=1\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2013-01-25\": {\n    \"hours\": 8.17\n  },\n  \"2013-01-26\": {\n    \"hours\": 9.2\n  },\n  \"2013-01-27\": {\n    \"hours\": 5.3\n  },\n  \"2013-01-28\": {\n    \"hours\": 7.16\n  },\n  \"2013-01-29\": {\n    \"hours\": 10.71\n  },\n  \"2013-01-30\": {\n    \"hours\": 6.51\n  }\n}\n</code></pre>\n<p>Shows how much time an agent (or a group) spent on chatting during a specified period. When querying for one day, the results are shown in minutes per every hour, otherwise in hours for each day.</p>\n<h4 id=\"optional-arguments-7\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, returns statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"chats-first-response-time\">Chats first response time</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/first_response_time\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/first_response_time?\\\ndate_from=2014-01-10&amp;\\\ndate_to=2014-01-20&amp;\\\nagent=john.doe@mycompany.com\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01-10\": {\n    \"first_response_time\": {\n      \"count\": 5,\n      \"seconds\": 0.83\n    }\n  },\n  \"2014-01-11\": {\n    \"first_response_time\": {\n      \"count\": 1,\n      \"seconds\": 1.3\n    }\n  },\n  //(...)\n  \"2014-01-20\": {\n    \"first_response_time\":{\n      \"count\": 0,\n      \"seconds\": null\n    }\n  }\n}\n</code></pre>\n<p>The average amount of time it takes the agents to respond to a new chat over a specified period of time.</p>\n<h4 id=\"optional-arguments-8\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><p>The following parameters are returned for each date:</p>\n<ul>\n<li><code>count</code> – the number of chat first responses during the specified period.</li>\n<li><code>seconds</code> – the average first response time.</li>\n</ul>\n<h2 id=\"chats-response-time\">Chats response time</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/response_time\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/response_time?\\\ndate_from=2014-01-10&amp;\\\ndate_to=2014-01-20&amp;\\\nagent=john.doe@mycompany.com\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01-10\": {\n    \"avg_response_time\": {\n      \"count\": 5,\n      \"seconds\": 0.83\n    }\n  },\n  \"2014-01-11\": {\n    \"avg_response_time\": {\n      \"count\": 1,\n      \"seconds\": 1.3\n    }\n  },\n  //(...)\n  \"2014-01-20\": {\n    \"avg_response_time\":{\n      \"count\": 0,\n      \"seconds\": null\n    }\n  }\n}\n</code></pre>\n<p>The average amount of time it takes the agents to respond to a new message in a chat during a specified period.</p>\n<h4 id=\"optional-arguments-9\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><p>The following parameters are returned for each date:</p>\n<ul>\n<li><code>count</code> – the number of chat responses during the specified period.</li>\n<li><code>seconds</code> – the average response time</li>\n</ul>\n<h2 id=\"number-of-simultaneous-chats\">Number of simultaneous chats</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/agents_occupancy\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/agents_occupancy?\\\nweekday=mon\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"2015-03-16 00:00\": 0,\n    \"2015-03-16 01:00\": 0,\n    \"2015-03-16 02:00\": 0,\n    \"2015-03-16 03:00\": 0,\n    \"2015-03-16 04:00\": 0,\n    \"2015-03-16 05:00\": 0,\n    \"2015-03-16 06:00\": 0,\n    \"2015-03-16 07:00\": 0,\n    \"2015-03-16 08:00\": 0,\n    \"2015-03-16 09:00\": 13,\n    \"2015-03-16 10:00\": 17,\n    \"2015-03-16 11:00\": 20,\n    \"2015-03-16 12:00\": 20,\n    \"2015-03-16 13:00\": 16,\n    \"2015-03-16 14:00\": 16,\n    \"...\": \"...\",\n    \"2015-03-23 00:00\": 0,\n    \"2015-03-23 01:00\": 0,\n    \"2015-03-23 02:00\": 0,\n    \"2015-03-23 03:00\": 0,\n    \"2015-03-23 04:00\": 0,\n    ...\n    \"2015-04-06 23:00\": 0\n}\n</code></pre>\n<p>This request shows the maximum number of concurrent chats that happened at the same hour on a particular day.</p>\n<h4 id=\"required-arguments\">Required arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>weekday</code></td>\n<td>you can select the day by changing the weekday parameter to one of the following values: <code>mon</code> for Monday, <code>tue</code> for Tuesday, <code>wed</code> for Wednesday, <code>thu</code> for Thursday, <code>fri</code> for Friday, <code>sat</code> for saturday and <code>sun</code> for Sunday</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"goals-reports-goals\">Goals {#reports-goals}</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/goals\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/goals?\\\ndate_from=2013-01-01&amp;\\\ngoal=71&amp;group_by=month\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2013-01\": {\n    \"begin\": \"2013-01-01\",\n    \"end\": \"2013-01-30\",\n    \"goals\": 4\n  }\n}\n</code></pre>\n<p>Shows the number of reached goals.</p>\n<h4 id=\"optional-arguments-10\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>goal</code></td>\n<td>id of the goal, not set by default</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"greetings-reports-greetings\">Greetings {#reports-greetings}</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/greetings\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/greetings?\\\ndate_from=2014-01-13&amp;\\\ndate_to=2014-02-14&amp;\\\ngroup_by=month\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01\": {\n    \"begin\": \"2014-01-13\",\n    \"end\": \"2014-01-31\",\n    \"displayed\": 274,\n    \"accepted\": 190,\n    \"goals\": 40\n  },\n  \"2014-02\": {\n  \"begin\": \"2014-02-01\",\n    \"end\": \"2014-02-14\",\n    \"displayed\": 146,\n    \"accepted\": 88,\n    \"goals\": 22\n  }\n}\n</code></pre>\n<p>Returns the “greetings to chats to goals” conversion rates report.</p>\n<p><code>displayed</code> is the number of displayed greetings. <code>accepted</code> tells you how many chats resulted from these greetings. <code>goals</code> tells you how many goals resulted from these greetings.</p>\n<h4 id=\"optional-arguments-11\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>goal</code></td>\n<td>id of the goal, not set by default</td>\n</tr>\n<tr>\n<td><code>greeting</code></td>\n<td><code>id</code> of the greeting, not set by default, returns statistics for the specified greeting</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"new-tickets\">New tickets</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/new_tickets\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/new_tickets?\\\ndate_from=2013-01-29&amp;\\\ndate_to=2013-01-29&amp;\\\ngroup_by=hour\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"00:00\": {\n    \"new_tickets\": 5\n  },\n  \"01:00\": {\n    \"new_tickets\": 1\n  },\n  //(...)\n  \"23:00\": {\n    \"new_tickets\": 21\n  }\n}\n</code></pre>\n<p>Shows the number of the tickets created during the specified period.</p>\n<h4 id=\"optional-arguments-12\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"tickets-first-response-time\">Tickets first response time</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/first_response_time\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/first_response_time?\\\ndate_from=2014-01-10&amp;\\\ndate_to=2014-01-20&amp;\\\nagent=john.doe@mycompany.com\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01-10\": {\n    \"count\": 5,\n    \"hours\": 0.83\n  },\n  \"2014-01-11\": {\n    \"count\": 1,\n    \"hours\": 1.3\n  },\n  //(...)\n  \"2014-01-20\": {\n    \"count\": 0,\n    \"hours\": null\n  }\n}\n</code></pre>\n<p>Shows the time of the first response to the tickets that were responded to for the first time during the specified period.</p>\n<h4 id=\"optional-arguments-13\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><p>The following parameters are returned for each date:</p>\n<ul>\n<li><code>count</code> – the number of tickets that were responded to for the first time that day.</li>\n<li><code>hours</code> – average first response time of the tickets. For example, <code>\"hours\": 0.83</code> means an average first response time of 49mins 48sec.</li>\n</ul>\n<h2 id=\"solved-tickets\">Solved tickets</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/solved_tickets\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/solved_tickets?\\\ndate_from=2014-01-10&amp;\\\ndate_to=2014-01-20\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01-10\": {\n    \"solved_tickets\": 4\n  },\n  \"2014-01-11\": {\n    \"solved_tickets\": 12\n  },\n  //(...)\n  \"2014-01-20\": {\n    \"solved_tickets\": 4\n  }\n}\n</code></pre>\n<p>Shows the number of the tickets solved during the specified period.</p>\n<h4 id=\"optional-arguments-14\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"tickets-resolution-time\">Tickets resolution time</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/resolution_time\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/resolution_time?\\\ndate_from=2014-01-10&amp;\\\ndate_to=2014-01-20\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01-10\": {\n    \"count\": 3,\n    \"hours\": 16.27\n  },\n  \"2014-01-11\": {\n    \"count\": 0,\n    \"hours\": null\n  },\n  //(...)\n  \"2014-01-20\": {\n    \"count\": 2,\n    \"hours\": 1.8\n  }\n}\n</code></pre>\n<p>Shows the resolution time of the tickets that were solved during the specified period.</p>\n<h4 id=\"optional-arguments-15\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><p>Two parameters are returned:</p>\n<ul>\n<li><code>count</code> – the number of tickets that were responded to for the first time that day.</li>\n<li><code>hours</code> – the average first response time of the tickets. For example, <code>\"hours\": 0.83</code> means an average first response time of 49mins 48sec.</li>\n</ul>\n<h2 id=\"ticket-sources\">Ticket sources</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/ticket_sources\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/ticket_sources?\\\ndate_from=2014-01-10&amp;\\\ndate_to=2014-01-20\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01-10\": {\n    \"tickets_from_chat_window\": 4,\n    \"tickets_from_mail\": 12,\n    \"tickets_from_chat\": 2\n  },\n  \"2014-01-11\": {\n    \"tickets_from_chat_window\": 7,\n    \"tickets_from_mail\": 8,\n    \"tickets_from_chat\": 6\n  },\n  //(...)\n  \"2014-01-20\": {\n    \"tickets_from_chat_window\": 0,\n    \"tickets_from_mail\": 16,\n    \"tickets_from_chat\": 1\n  }\n}\n</code></pre>\n<p>Shows the distribution of the tickets between various channels.</p>\n<h4 id=\"optional-arguments-16\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><p>The following parameters are returned for each date:</p>\n<ul>\n<li><code>tickets_from_chat_window</code> – the number of tickets created by the visitor via the ticket form,</li>\n<li><code>tickets_from_mail</code> – the number of tickets created by sending an email to your support email tied to LiveChat,</li>\n<li><code>tickets_from_chat</code> – the number of tickets created by the agents during a chat.</li>\n</ul>\n<h2 id=\"ticket-ratings-report\">Ticket ratings report</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/ratings\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/ratings?\\\ngroup=2&amp;\\\ndate_from=2012-01-29&amp;\\\ndate_to=2013-01-29&amp;\\\ngroup_by=month\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2012-01\": {\n    \"begin\": \"2012-01-29\",\n    \"end\": \"2012-01-31\",\n    \"bad\": 0,\n    \"good\": 6\n  },\n  \"2012-02\": {\n    \"begin\": \"2012-02-01\",\n    \"end\": \"2012-02-29\",\n    \"bad\": 4,\n    \"good\": 38\n  },\n  \"2012-03\": {\n    \"begin\": \"2012-03-01\",\n    \"end\": \"2012-03-31\",\n    \"bad\": 0,\n    \"good\": 16\n  },\n  //(...) \n  \"2012-11\": {\n    \"begin\": \"2012-11-01\",\n    \"end\": \"2012-11-30\",\n    \"bad\": 20,\n    \"good\": 49\n  },\n  \"2012-12\": {\n    \"begin\": \"2012-12-01\",\n    \"end\": \"2012-12-31\",\n    \"bad\": 22,\n    \"good\": 35\n  },\n  \"2013-01\": {\n    \"begin\": \"2013-01-01\",\n    \"end\": \"2013-01-29\",\n    \"bad\": 18,\n    \"good\": 51\n  }\n}\n</code></pre>\n<p>Shows the tickets that were rated during the specified period.</p>\n<h4 id=\"optional-arguments-17\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"ticket-ranking\">Ticket Ranking</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/ratings/ranking\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/ratings/ranking\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"ranking\": [\n    {\n      \"good\": 2502,\n      \"bad\": 426,\n      \"total\": 2928,\n      \"score\": 0.8361489669658251,\n      \"name\": \"john.doe@mycompany.com\"\n    },\n    {\n      \"good\": 2164,\n      \"bad\": 443,\n      \"total\": 2607,\n      \"score\": 0.8094273999034496,\n      \"name\": \"jane.doe@mycompany.com\"\n    },\n    {\n      \"good\": 1070,\n      \"bad\": 215,\n      \"total\": 1285,\n      \"score\": 0.8029689181922964,\n      \"name\": \"jenny.doe@mycompany.com\"\n    }\n}\n</code></pre>\n<p>Shows the ratio of good to bad ratings for each operator.</p>\n<h4 id=\"optional-arguments-18\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"685e8fd3-e2ca-4a3a-8157-5e75b7e37f3d","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"688bee17-5dcd-42b4-b894-c589a292d6a3","type":"text/javascript","exec":[""]}}],"_postman_id":"8e6a7cdb-4af1-4715-762d-b14ea757896d","auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":true,"source":{"_postman_id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","name":"LiveChat REST API","type":"collection"}}},{"name":"Status","item":[{"name":"Get status","id":"ee46edef-22c8-b991-bbc3-77495de9da56","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/status","description":"<p>Returns the current LiveChat status. Available return values: online, offline.</p>\n","urlObject":{"protocol":"https","path":["status"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"ee46edef-22c8-b991-bbc3-77495de9da56"}],"id":"b54bb228-94d9-fe16-de24-7026edcc4154","description":"<h1 id=\"status\">Status</h1>\n<p>You can use this method to check whether your LiveChat is <strong>online</strong> or <strong>offline</strong>.</p>\n<h2 id=\"available-paths-status-available-paths\">Available paths {#status-available-paths}</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Methods</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>GET</code></td>\n<td><code>/status</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"get-status\">Get status</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/status\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/status/1\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\":\"online\"\n}\n</code></pre>\n<p>Returns the current LiveChat status. Available return values: <code>online</code>, <code>offline</code>.</p>\n<h4 id=\"optional-parameters\">Optional parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>group</code></td>\n<td>defaults to 0</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"3b558439-b452-463f-bd97-4af630a039fa","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"c3129ba2-784c-4270-8af1-b67f0d021e10","type":"text/javascript","exec":[""]}}],"_postman_id":"b54bb228-94d9-fe16-de24-7026edcc4154","auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":true,"source":{"_postman_id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","name":"LiveChat REST API","type":"collection"}}},{"name":"Tags","item":[{"name":"List all tags","id":"64923bc0-6952-1e76-f285-5c2897eca3ec","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/tags?group=1","description":"<p>Returns tags from all groups.</p>\n","urlObject":{"protocol":"https","path":["tags"],"host":["api","livechatinc","com"],"query":[{"key":"group","value":"1"}],"variable":[]}},"response":[],"_postman_id":"64923bc0-6952-1e76-f285-5c2897eca3ec"},{"name":"Add a tag","id":"bcb98039-a04c-d008-bdf2-bcf2a9f8e932","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"POST","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"tag","value":"support","type":"text"},{"key":"author","value":"john.doe@mycompany.com","type":"text"},{"key":"group","value":"1","type":"text"}]},"url":"https://api.livechatinc.com/tags","description":"<p>Adds a new tag. Note that only the owner and the admins are authorized to use this.</p>\n","urlObject":{"protocol":"https","path":["tags"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"bcb98039-a04c-d008-bdf2-bcf2a9f8e932"},{"name":"Delete a tag","id":"070528ef-773f-6621-9a85-1194ea791a02","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"DELETE","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"group","value":"1","type":"text"}]},"url":"https://api.livechatinc.com/tags/support","description":"<p>Deletes a tag from the chosen group. The agents will no longer be able to tag chats and tickets using this tag.</p>\n<p>Deleting a tag will not remove it from the archived chats and tickets.</p>\n","urlObject":{"protocol":"https","path":["tags","support"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"070528ef-773f-6621-9a85-1194ea791a02"}],"id":"72704ab8-ac33-3b27-c8bc-37f63b71dabf","description":"<h1 id=\"tags\">Tags</h1>\n<p>Using this method, you will be able to <strong>create</strong> and <strong>delete</strong> <a href=\"https://www.livechatinc.com/kb/tagging-chats-and-tickets/\">Tags</a> in LiveChat. You can also use it to <strong>learn more</strong> about the performance of all your Tags.</p>\n<h2 id=\"available-paths-tags-available-paths\">Available paths {#tags-available-paths}</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Methods</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>GET</code>, <code>POST</code></td>\n<td><code>/tags</code></td>\n</tr>\n<tr>\n<td><code>DELETE</code></td>\n<td><code>/tags/&lt;TAG&gt;</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"list-all-tags\">List all tags</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/tags\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/tags\\\n      ?group=1\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  {\n    \"name\": \"sales\",\n    \"author\":\"john.doe@mycompany.com\",\n    \"creation_date\":1402989014,\n    \"count\": \n    {\n        \"inChats\":4,\n        \"inTickets\":1\n    },\n    group:1\n  },\n  {\n    \"name\": \"support\",\n    \"author\":\"john.doe@mycompany.com\",\n    \"creation_date\":1402991857,\n    \"count\": \n    {\n        \"inChats\":0,\n        \"inTickets\":2\n    },\n    group:1\n  }\n]\n</code></pre>\n<p>Returns tags from all groups.</p>\n<h4 id=\"optional-parameters\">Optional parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>group</code></td>\n<td>returns tags from chosen group</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"add-a-tag\">Add a tag</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://api.livechatinc.com/tags\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/tags\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -d \"tag=support&amp;\\\nauthor=john.doe@mycompany.com&amp;\\\ngroup=1\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/tags\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n        \"tag\":\"support\",\n        \"author\":\"john.doe@mycompany.com\",\n        \"group\":1  \n      }'\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"support\",\n  \"author\":\"john.doe@mycompany.com\",\n  \"creation_date\":1402989014,\n  \"count\": \n  {\n      \"inChats\":0,\n      \"inTickets\":0\n  },\n  group:1\n}\n</code></pre>\n<p>Adds a new tag. Note that only the owner and the admins are authorized to use this.</p>\n<h4 id=\"required-parameters\">Required parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>author</code></td>\n<td>agent login</td>\n</tr>\n<tr>\n<td><code>tag</code></td>\n<td>name of a tag</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group that tag will be added to</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"delete-a-tag\">Delete a tag</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>[DELETE]   /tags/&lt;TAG&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/tags/support\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 DELETE \\\n  -d \"group=1\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/tags/support\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 DELETE \\\n  -H Content-type:application/json \\\n  -d '{\n        \"group\":1\n      }' \n</code></pre>\n<blockquote>\n<p>Example response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"ok\": true\n}\n</code></pre>\n<p>Deletes a tag from the chosen group. The agents will no longer be able to tag chats and tickets using this tag. </p>\n<aside>Deleting a tag will not remove it from the archived chats and tickets.</aside>\n\n<h4 id=\"required-properties\">Required properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>tag</code></td>\n<td>tag name</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group that the tag is assigned to</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"2b8ffa77-bbd1-482d-b8c8-a3737de0b979","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"fc1c7a00-bb98-4b49-b14d-2fd3fdbad83a","type":"text/javascript","exec":[""]}}],"_postman_id":"72704ab8-ac33-3b27-c8bc-37f63b71dabf","auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":true,"source":{"_postman_id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","name":"LiveChat REST API","type":"collection"}}},{"name":"Tickets","item":[{"name":"Get list of tickets","id":"a06e4abd-2a01-4ef6-3691-8b48ac6acd1d","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/tickets?date_from=2013-11-15&status=open","description":"<p>Returns all tickets.</p>\n","urlObject":{"protocol":"https","path":["tickets"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"2013-11-15"},{"key":"status","value":"open"}],"variable":[]}},"response":[],"_postman_id":"a06e4abd-2a01-4ef6-3691-8b48ac6acd1d"},{"name":"Get single ticket","id":"bea8b8af-2cb7-ce6e-c740-765428c6eb4a","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/tickets/5FUED","description":"<p>Returns a single ticket item for the given TICKET_ID</p>\n","urlObject":{"protocol":"https","path":["tickets","5FUED"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"bea8b8af-2cb7-ce6e-c740-765428c6eb4a"},{"name":"Create a ticket","id":"cf6daf3a-12c7-4034-2ffa-dc2695841e78","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"POST","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"subject","value":"I have a problem","type":"text"},{"key":"message","value":"Hi,I+have a problem with my shoes. Could you please advise?","type":"text"},{"key":"requester[mail]","value":"mary.brown@email.com","type":"text"},{"key":"requester[name]","value":"Mary+Brown","type":"text"}]},"url":"https://api.livechatinc.com/tickets","description":"<p>Creates a new ticket.</p>\n","urlObject":{"protocol":"https","path":["tickets"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[{"id":"63dcdbfb-e385-30d1-712c-4a1026d9dfa9","name":"Create a ticket","originalRequest":{"method":"POST","header":[{"key":"X-API-Version","value":"2","disabled":false}],"body":{"mode":"formdata","formdata":[{"key":"subject","value":"I have a problem","type":"text"},{"key":"message","value":"Hi,I+have a problem with my shoes. Could you please advise?","type":"text"},{"key":"requester[mail]","value":"mary.brown@email.com","type":"text"},{"key":"requester[name]","value":"Mary+Brown","type":"text"}]},"url":"https://api.livechatinc.com/tickets"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"max-age=0, no-cache, no-store","name":"Cache-Control","description":""},{"key":"Connection","value":"keep-alive","name":"Connection","description":""},{"key":"Content-Length","value":"697","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json; charset=utf-8","name":"Content-Type","description":""},{"key":"Date","value":"Fri, 02 Mar 2018 13:51:31 GMT","name":"Date","description":""},{"key":"Expires","value":"Fri, 02 Mar 2018 13:51:31 GMT","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Vary","value":"Accept-Encoding","name":"Vary","description":""},{"key":"X-Content-Type-Options","value":"nosniff","name":"X-Content-Type-Options","description":""}],"cookie":[{"expires":"Wed Mar 31 2021 13:38:35 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"livechatinc.com","path":"/licence/1520","secure":false,"value":"livechatinc.com%3D1519997914","key":"__livechat_lastvisit"},{"expires":"Wed Mar 31 2021 13:38:35 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"livechatinc.com","path":"/licence/1520","secure":false,"value":"lc_all_invitation%3D0%26lc_auto_invites_shown%3D%26lc_chat_number%3D0%26lc_client_version%3D%26lc_goals_achieved%3D%26lc_integration_params%3D%26lc_lang%3Den%26lc_last_chat_start_time%3D0%26lc_last_conference_id%3D%26lc_last_operator_key%3D%26lc_last_operator_key_per_skill%3D%26lc_last_visit%3D1519997888%26lc_nick%3D%26lc_ok_invitation%3D0%26lc_page_view%3D39%26lc_session%3DS1519389059.1405811d37%26lc_visit_number%3D6","key":"__livechat"},{"expires":"Mon Jan 18 2038 03:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":false,"domain":"livechatinc.com","path":"/","secure":false,"value":"PbDMI8SRngYi+6dZg9TMBjD521cAAAAA/d6yozFOUDK3t9i9nj3R5g==","key":"incap_ses_490_617516"},{"expires":"Mon Jan 18 2038 04:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":false,"domain":"livechatinc.com","path":"/","secure":false,"value":"eYHCfWHJDzkaMXIqL4KpBaOo3VcAAAAANQ90uO/SrOGWZC2UiUP9gg==","key":"incap_ses_408_617516"},{"expires":"Sun Jan 17 2038 15:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":false,"domain":"livechatinc.com","path":"/","secure":false,"value":"TwafCTMipFwMZIisZKINA+lA5VcAAAAA44Zs6McWlhQW+kCSJddalA==","key":"incap_ses_220_617516"},{"expires":"Mon Jan 18 2038 09:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":false,"domain":"livechatinc.com","path":"/","secure":false,"value":"70ZFYiPdoVXGz7tZyIIwBrWJ81cAAAAAnZgaoH8D4bkQ3t9bpKUJ1A==","key":"incap_ses_446_667841"},{"expires":"Fri Jan 15 2038 09:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":false,"domain":"livechatinc.com","path":"/","secure":false,"value":"wuI7XcGqG342ppMucLR1FwAAAABCkoMreMANiYaDlq2cXe5z","key":"nlbi_617516"},{"expires":"Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":false,"domain":"livechatinc.com","path":"/","secure":false,"value":"xmuyLyjWOGTgpXHyNqKCBFkGE1gAAAAA5j/awcYzp81zzFguUaRPHw==","key":"incap_ses_325_617516"},{"expires":"Mon Jan 18 2038 05:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":false,"domain":"livechatinc.com","path":"/","secure":false,"value":"HdYaOJ/HTx4sMASeRMajIwAAAADqrE6y7Y6ECG/TskPp/yKE","key":"nlbi_667841"},{"expires":"Tue Jan 19 2038 02:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":false,"domain":"livechatinc.com","path":"/","secure":false,"value":"https%3A%2F%2Fwww.livechatinc.com%2Fsignup%2F","key":"landing_page"},{"expires":"Sat Nov 21 2020 14:26:40 GMT+0000 (Coordinated Universal Time)","httpOnly":false,"domain":"livechatinc.com","path":"/","secure":false,"value":"S1519389059.1405811d37","key":"__lc.visitor_id.1520"},{"expires":"Mon Feb 28 2028 13:38:30 GMT+0000 (Coordinated Universal Time)","httpOnly":false,"domain":"livechatinc.com","path":"/","secure":false,"value":"eyJkZXZpY2VJZCI6IjNmOTM4NzQ2LWFlMzUtNDM2NC1hNjE0LWYwZGQxNzNkYTFhMCIsInVzZXJJZCI6Im0ucGFzem93c2tpK3R1dG9yaWFsQGxpdmVjaGF0aW5jLmNvbSIsIm9wdE91dCI6ZmFsc2UsInNlc3Npb25JZCI6MTUxOTk5Nzg4Nzk1NCwibGFzdEV2ZW50VGltZSI6MTUxOTk5NzkxMDY4MSwiZXZlbnRJZCI6MSwiaWRlbnRpZnlJZCI6MCwic2VxdWVuY2VOdW1iZXIiOjF9","key":"amplitude_idlivechatinc.com"}],"responseTime":"619","body":"{\"events\":[{\"author\":{\"id\":\"mary.brown@email.com\",\"name\":\"Mary+Brown\",\"type\":\"client\"},\"date\":\"2018-03-02T13:51:30Z\",\"is_private\":false,\"message\":\"Hi,I+have a problem with my shoes. Could you please advise?\",\"type\":\"message\",\"source\":{\"type\":\"lc2\",\"url\":null}}],\"id\":\"8PQRU\",\"requester\":{\"mail\":\"mary.brown@email.com\",\"name\":\"Mary+Brown\",\"ip\":\"194.181.146.130\"},\"groups\":[{\"id\":0,\"name\":\"All operators\"}],\"status\":\"open\",\"subject\":\"I have a problem\",\"modified\":\"2018-03-02T13:51:30Z\",\"source\":{\"type\":\"lc2\",\"url\":null,\"id\":null},\"opened\":[{\"from\":\"2018-03-02T13:51:30Z\"}],\"firstResponse\":{},\"tags\":[],\"rate\":\"not_rated\",\"date\":\"2018-03-02T13:51:30Z\",\"currentGroup\":{\"id\":0,\"name\":\"All operators\"}}"}],"_postman_id":"cf6daf3a-12c7-4034-2ffa-dc2695841e78"},{"name":"Update ticket tags","id":"f1c26ef0-bf3b-cd72-7436-90a5497ea208","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"PUT","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"tag[]","value":"sales","type":"text"},{"key":"tag[]","value":"support","type":"text"},{"key":"tag[]","value":"feedback","type":"text"}]},"url":"https://api.livechatinc.com/tickets/5FUED/tags","description":"<p>Updates tags associated with the ticket.</p>\n","urlObject":{"protocol":"https","path":["tickets","5FUED","tags"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"f1c26ef0-bf3b-cd72-7436-90a5497ea208"}],"id":"466e09fd-c244-d3af-0945-0cb1504e7596","description":"<h1 id=\"tickets\">Tickets</h1>\n<p>Use this method to <strong>get information</strong> about a specific case or all <a href=\"https://www.livechatinc.com/kb/support-tickets-in-livechat/\">Ticket</a> of them. You also use it to <strong>create new</strong> Tickets or <strong>update tags</strong> for the existing Tickets.</p>\n<h2 id=\"available-paths-tickets-available-paths\">Available paths {#tickets-available-paths}</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Methods</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>GET</code></td>\n<td><code>/tickets/&lt;TICKET_ID&gt;</code></td>\n</tr>\n<tr>\n<td><code>POST</code></td>\n<td><code>/tickets</code></td>\n</tr>\n<tr>\n<td><code>PUT</code></td>\n<td><code>/tickets/&lt;TICKET_ID&gt;/tags</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"get-list-of-tickets\">Get list of tickets</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/tickets\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/tickets?\\\ndate_from=2013-11-15&amp;\\\nstatus=open\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"pages\": 1,\n  \"total\": 15,\n  \"tickets\": [\n  {\n    \"assignee\": {\n      \"id\": \"jane.doe@mycompany.com\",\n      \"name\": \"Jane Doe\"\n    },\n    \"events\": [\n    {\n      \"author\": {\n        \"id\": \"mary.brown@email.com\",\n        \"name\": \"Mary Brown\",\n        \"type\": \"client\"\n      },\n      \"date\": 1384554260,\n      \"is_private\": false,\n      \"message\": \"Hello,\\n\\nIt seems that my new shoes are broken. What can we do about this?\",\n      \"type\": \"message\",\n      \"source\": {\n        \"type\": \"mail\"\n      }\n    }, {\n      \"to\": {\n        \"id\": \"jane.doe@mycompany.com\",\n        \"name\": \"Jane Doe\"\n      },\n      \"author\": {\n        \"id\": \"john.doe@mycompany.com\",\n        \"name\": \"John Doe\"\n      },\n      \"date\": 1384554270,\n      \"type\": \"assignee_changed\"\n    }, {\n      \"message\": \"Jane, could you please find a moment to handle this customer's complaint?\",\n      \"is_private\": true,\n      \"author\": {\n        \"type\": \"agent\",\n        \"id\": \"john.doe@mycompany.com\",\n        \"name\": \"John Doe\"\n      },\n      \"date\": 1384554322,\n      \"type\": \"message\",\n      \"source\": {\n        \"type\": \"lc2\"\n      }\n    }],\n    \"id\": \"5FUED\",\n    \"requester\": {\n      \"mail\": \"mary.brown@email.com\",\n      \"name\": \"Mary Brown\"\n    },\n    \"groups\": [0],\n    \"status\": \"open\",\n    \"subject\": \"My new shoes are broken\",\n    \"modified\": 1384790802,\n    \"source\": {\n      \"type\": \"mail\"\n    },\n    \"opened\": [{\n      \"from\": 1384554260\n    }],\n    \"firstResponse\": {}\n  },\n  \"tags\": [\n    \"sales\",\n    \"support\",\n    \"feedback\"\n  ],\n  (...)\n  ]\n}\n</code></pre>\n<p>Returns all tickets.</p>\n<h4 id=\"optional-parameters\">Optional parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>. Returns the tickets with any of their activities matching the date. Defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>. Returns the tickets with any of their activities matching the date. Defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>page</code></td>\n<td>page number, defaults to 1</td>\n</tr>\n<tr>\n<td><code>assigned</code></td>\n<td>if <code>0</code>, returns only the unassigned tickets. If <code>1</code>, returns only the tickets assigned to any agent</td>\n</tr>\n<tr>\n<td><code>order</code></td>\n<td>orders the tickets by date of the last ticket modification. Possible values: <code>desc</code>, <code>asc</code>. Defaults to <code>desc</code></td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>not set by default. Possible values: <code>open</code>, <code>pending</code>, <code>solved</code> or <code>spam</code></td>\n</tr>\n<tr>\n<td><code>assignee</code></td>\n<td>return the tickets assigned to the given agent's login</td>\n</tr>\n<tr>\n<td><code>query</code></td>\n<td>return the tickets containing the query</td>\n</tr>\n<tr>\n<td><code>requester[mail]</code></td>\n<td>returns the tickets assigned to the given requester</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>returns the tickets for the given group</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>returns the tickets for the given source. Possible values: <code>lc2</code> (created from archives), <code>mail</code>, <code>facebook</code>, <code>agent-app-manual</code> (created manually), <code>chat-window</code> (created from ticket form)</td>\n</tr>\n<tr>\n<td><code>tag</code></td>\n<td>returns the statistics for the specified tag</td>\n</tr>\n<tr>\n<td><code>tagged</code></td>\n<td><code>1/0</code>. If 1 is passed, returns the tickets with any tag. If 0 passed, returns the tickets with no tags</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"additional-info\">Additional info:</h4>\n<p>The results are divided into pages, each containing 25 tickets.</p>\n<p><code>total</code> indicates the total number of tickets.<br /><code>pages</code> indicstes the total number of pages.</p>\n<p>To access next pages of the results, use <code>?page=&lt;PAGE&gt;</code> parameter.<br />Please note that the first page's number is <code>1</code>, not <code>0</code>.</p>\n<h2 id=\"get-single-ticket\">Get single ticket</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/tickets/&lt;TICKET_ID&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/tickets/5FUED\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<blockquote>\n<p><em>The return format is the same as the single ticket item in <a href=\"#get-list-of-tickets\">tickets list</a>.</em></p>\n</blockquote>\n<p>Returns a single ticket item for the given <code>TICKET_ID</code>.</p>\n<h2 id=\"create-a-ticket\">Create a ticket</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://api.livechatinc.com/tickets\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl \"https://api.livechatinc.com/tickets\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2  \\\n  -X POST -d \"subject=I+have+a+problem&amp;\\\n  message=Hi,I+have+a+problem+with+my+shoes.+Could+you+please+advise?&amp;\\\n  requester[mail]=mary.brown@email.com&amp;\\\n  requester[name]=Mary+Brown\"\n</code></pre><blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/tickets\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n      \"subject\":\"I have a problem\",\n      \"message\":\"Hi,I have a problem with my shoes. Could you please advise?\",\n      \"requester\":\n      {\n        \"mail\":\"mary.brown@email.com\",\n        \"name\":\"Mary Brown\"\n      }\n     }'\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">The return format is the same as the single ticket item in [tickets list](#get-tickets).\n\n</code></pre>\n<p>Creates a new ticket.</p>\n<h4 id=\"required-parameters\">Required parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>message</code></td>\n<td>requester's message</td>\n</tr>\n<tr>\n<td><code>requester[mail]</code></td>\n<td>requester's email address</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"optional-parameters-1\">Optional parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>requester[name]</code></td>\n<td>requester's name</td>\n</tr>\n<tr>\n<td><code>assignee[id]</code></td>\n<td>login of the agent that will be assigned to the ticket</td>\n</tr>\n<tr>\n<td><code>source[type]</code></td>\n<td>source of the ticket. Possible values: <code>chat-window</code>, <code>mail</code> or <code>lc2</code>. Defaults to <code>lc2</code></td>\n</tr>\n<tr>\n<td><code>source[url]</code></td>\n<td>url of the website that the ticket was sent from. Applies only if <code>source[type]</code> is <code>chat-window</code></td>\n</tr>\n<tr>\n<td><code>subject</code></td>\n<td>ticket subject. Defaults to <code>(no subject)</code></td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>list of groups. Must be an array with group IDs. Defaults to <code>[0]</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"update-ticket-tags\">Update ticket tags</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT https://api.livechatinc.com/tickets/&lt;TICKET_ID&gt;/tags\n</code></pre><p>Sample</p>\n<blockquote>\n<p>Example request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/tickets/5FUED/tags\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X PUT \\\n  -d \"tag[]=sales&amp;\\\ntag[]=support&amp;\\\ntag[]=feedback\" \n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl \"https://api.livechatinc.com/tickets/5FUED/tags\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n        \"tag\":[\"sales\",\"support\",\"feedback\"]\n     }'\n</code></pre><blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"pages\": 1,\n  \"total\": 15,\n  \"tickets\": [\n  {\n    \"assignee\": {\n      \"id\": \"jane.doe@mycompany.com\",\n      \"name\": \"Jane Doe\"\n    },\n    \"events\": [\n    {\n      \"author\": {\n        \"id\": \"mary.brown@email.com\",\n        \"name\": \"Mary Brown\",\n        \"type\": \"client\"\n      },\n      \"date\": 1384554260,\n      \"is_private\": false,\n      \"message\": \"Hello,\\n\\nIt seems that my new shoes are broken. What can we do about this?\",\n      \"type\": \"message\",\n      \"source\": {\n        \"type\": \"mail\"\n      }\n    }, {\n      \"to\": {\n        \"id\": \"jane.doe@mycompany.com\",\n        \"name\": \"Jane Doe\"\n      },\n      \"author\": {\n        \"id\": \"john.doe@mycompany.com\",\n        \"name\": \"John Doe\"\n      },\n      \"date\": 1384554270,\n      \"type\": \"assignee_changed\"\n    }, {\n      \"message\": \"Jane, could you please find a moment to handle this customer's complaint?\",\n      \"is_private\": true,\n      \"author\": {\n        \"type\": \"agent\",\n        \"id\": \"john.doe@mycompany.com\",\n        \"name\": \"John Doe\"\n      },\n      \"date\": 1384554322,\n      \"type\": \"message\",\n      \"source\": {\n        \"type\": \"lc2\"\n      }\n    }],\n    \"id\": \"5FUED\",\n    \"requester\": {\n      \"mail\": \"mary.brown@email.com\",\n      \"name\": \"Mary Brown\"\n    },\n    \"groups\": [0],\n    \"status\": \"open\",\n    \"subject\": \"My new shoes are broken\",\n    \"modified\": 1384790802,\n    \"source\": {\n      \"type\": \"mail\"\n    },\n    \"opened\": [{\n      \"from\": 1384554260\n    }],\n    \"firstResponse\": {}\n  },\n  \"tags\": [\n    \"sales\",\n    \"support\",\n    \"feedback\"\n  ],\n  (...)\n  ]\n}\n</code></pre>\n<p>Updates tags associated with the ticket.</p>\n<h4 id=\"required-parameters-1\">Required parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>tag</code></td>\n<td>array of used tags</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"160afbc8-597f-4969-9b15-82fb357005f5","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"c3c0fffd-da62-4da3-96d1-3af464e1059c","type":"text/javascript","exec":[""]}}],"_postman_id":"466e09fd-c244-d3af-0945-0cb1504e7596","auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":true,"source":{"_postman_id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","name":"LiveChat REST API","type":"collection"}}},{"name":"Visitors","item":[{"name":"List all visitors","id":"99f1d5fa-ba12-3ceb-ba90-6bc0a884f0c7","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/visitors?state=chatting&group[]=0","description":"<p>Returns a list of the visitors on the pages with the tracking code installed.</p>\n","urlObject":{"protocol":"https","path":["visitors"],"host":["api","livechatinc","com"],"query":[{"key":"state","value":"chatting"},{"key":"group[]","value":"0"}],"variable":[]}},"response":[],"_postman_id":"99f1d5fa-ba12-3ceb-ba90-6bc0a884f0c7"},{"name":"Add custom visitor details","id":"930ead08-1290-7650-fd10-194999619c15","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"POST","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"license_id","value":"12345","type":"text"},{"key":"token","value":"26132406c42c96ba61ed42689b70f719","type":"text"},{"key":"id","value":"my-app","type":"text"},{"key":"fields[0][name]","value":"Age","type":"text"},{"key":"fields[0][value]","value":"36","type":"text"}]},"url":"https://api.livechatinc.com/visitors/S1352647457.ac951bfe2e/details","description":"<p>Displays additional information about a visitor in LiveChat apps.</p>\n","urlObject":{"protocol":"https","path":["visitors","S1352647457.ac951bfe2e","details"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"930ead08-1290-7650-fd10-194999619c15"}],"id":"fb03d059-beba-2373-950d-64cf9e0115a7","description":"<h1 id=\"visitors\">Visitors</h1>\n<p>You can use this method to get information about the real-time <a href=\"https://www.livechatinc.com/features/visitors-tracking/\">Visitors</a> on your website. You can also use it to <strong>display additional information</strong> about the visitors in the LiveChat app.</p>\n<h2 id=\"available-paths-visitors-available-paths\">Available paths {#visitors-available-paths}</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Methods</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>GET</code></td>\n<td><code>/visitors</code></td>\n</tr>\n<tr>\n<td><code>POST</code></td>\n<td><code>/visitors/&lt;VISITOR_ID&gt;/details</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"list-all-visitors\">List all visitors</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/visitors\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/visitors?\nstate=chatting&amp;\\\ngroup[]=0\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 -g\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  {\n    \"browser\": \"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\n    \"chat\": {\n      // (...)\n    },\n    \"chat_id\": \"DL1G0UED4H\",\n    \"chat_start_time\": \"2017-02-16 12:54:26\",\n    \"chat_start_time_ts\": 1487246066,\n    \"chats\": 1,\n    \"custom_variables\": [\n      {\n        \"key\": \"empty_cart\",\n        \"value\": \"true\"\n      }\n    ],\n    \"city\": \"Greenville\",\n    \"country\": \"United States\",\n    \"country_code\": \"US\",\n    \"greetings_accepted\": 1,\n    \"greetings_all\": 2,\n    \"greetings_refused\": 1,\n    \"group\": 102,\n    \"host\": \"very-hosty.sl.us\",\n    \"id\": \"S148dea44981.d9443253fef2\",\n    \"invitation\": \"\",\n    \"ip\": \"8.8.8.8\",\n    \"language\": \"en\",\n    \"last_visit\": \"2017-02-16 12:36:21\",\n    \"last_visit_ts\": 1487244981,\n    \"latitude\": \"35.6127\",\n    \"longitude\": \"-77.3663\",\n    \"name\": \"Visitor\",\n    \"operators\": [\n      // (...)\n    ],\n    \"page_address\": \"https://docs.livechatinc.com/js-api/#on-chat-window-minimized\",\n    \"page_current\": \"https://docs.livechatinc.com/js-api/#on-chat-window-minimized\",\n    \"page_entered\": \"2017-02-16 12:36:21\",\n    \"page_entered_ts\": 1487244981,\n    \"page_time\": \"2017-02-16 12:39:12\",\n    \"page_time_ts\": 1487245152,\n    \"page_title\": \"LiveChat – Chat Window API (JS)\",\n    \"page_views\": 16,\n    \"prechat_survey\": [\n      // (...)\n    ],\n    \"queue_start_time\": 46843480,\n    \"referrer\": \"https://www.livechatinc.com/\",\n    \"region\": \"North Carolina\",\n    \"state\": \"chatting\",\n    \"timezone\": \"America/New_York\",\n    \"visit_path\": [\n      {\n        \"invitation\": \"Time on site: 30 sec\",\n        \"page\": \"https://developers.livechatinc.com/\",\n        \"time\": \"2017-02-16 12:36:21\",\n        \"time_ref\": 1487244981,\n        \"time_ts\": 1487244981,\n        \"title\": \"LiveChat Developers - REST API &amp; Integrations\"\n      },\n      {\n        \"invitation\": \"\",\n        \"page\": \"https://docs.livechatinc.com/\",\n        \"time\": \"2017-02-16 12:38:33\",\n        \"time_ref\": 1487245113,\n        \"time_ts\": 1487245113,\n        \"title\": \"LiveChat Docs\"\n      },\n      // (...)\n    ],\n    \"visits\": 3\n  },\n  // (...)\n]\n</code></pre>\n<p>Returns a list of the visitors on the pages with the tracking code installed.</p>\n<h4 id=\"optional-parameters\">Optional parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>state</code></td>\n<td>parameter determines what state the visitors are. Possible values: <code>chatting</code>, <code>queued</code>, <code>browsing</code>, <code>invited</code>, <code>refused invitation</code> or <code>chat closed</code></td>\n</tr>\n<tr>\n<td><code>group[]</code></td>\n<td>parameter decides which group will be used for the listing. Use group numbers as values to select visitors only for the specified group</td>\n</tr>\n<tr>\n<td><code>count</code></td>\n<td>parameter will allow you to return the number of visitors (when the value is set to <code>1</code>) instead of all the available information (when it is set to <code>0</code>). The parameter is set to <code>0</code> by default</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"additional-info\">Additional info:</h4>\n<p>The possible <code>state</code> values returned without any filter are:</p>\n<ul>\n<li><code>browsing</code></li>\n<li><code>chatting</code></li>\n<li><code>logging into chat</code></li>\n<li><code>queued</code></li>\n<li><code>invited</code></li>\n<li><code>refused invitation</code></li>\n<li><code>chat closed</code></li>\n</ul>\n<p>The possible <code>state</code> filter values are <code>chatting</code> and <code>queued</code>.</p>\n<p><code>prechat_survey</code> parameter will be available only if the visitor is currently chatting.</p>\n<p><code>custom_variables</code> parameter will be available only if the custom variables are defined in the tracking code.</p>\n<h2 id=\"add-custom-visitor-details\">Add custom visitor details</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://api.livechatinc.com/visitors/&lt;VISITOR_ID&gt;/details\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/visitors/S1352647457.ac951bfe2e/details\" \\\n  -H X-API-Version:2\n  -d \"license_id=12345&amp;\\\ntoken=26132406c42c96ba61ed42689b70f719&amp;\\\nid=my-app&amp;\\\nfields[0][name]=Age&amp;\\\nfields[0][value]=36\"\n</code></pre>\n<blockquote>\n<p>Sample JSON request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/visitors/S1352647457.ac951bfe2e/details\" \\\n  -H X-API-Version:2 \\\n  -H Content-type:application/json \\\n  -d '{\n        \"license_id\":12345,\n        \"token\":\"26132406c42c96ba61ed42689b70f719\",\n        \"id\":\"my-app\",\n        \"fields\":[\n          {\n            \"name\":\"Age\",\n            \"value\":36\n          }\n        ]\n      }'\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"result\": \"Visitor details added\"\n}\n</code></pre>\n<p>Displays additional information about a visitor in LiveChat apps.</p>\n<p>For example, if you have your own database with some additional details about your users, you can query this database based on your visitor’s e-mail address, and display the data from your database for an agent during the chat.</p>\n<img src=\"https://www.livechatinc.com/wp-content/uploads/2013/02/visitor-details1.png\" width=\"300\" />\n\n<p><strong>Note:</strong> this method can only be used along with the <a href=\"/build-integration/#webhooks\">Webhooks</a>. You should create a webhook with <code>chat_started</code> event that will be sent to your integration script. This script must read webhook's <code>license_id</code> and <code>token</code> params and include them in this API method call. See a sample integration in <a href=\"/build-integration/#webhooks\">Webhooks documentation</a>.</p>\n<h4 id=\"required-properties\">Required properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>license_id</code></td>\n<td>sent by the webhook (read the note above)</td>\n</tr>\n<tr>\n<td><code>token</code></td>\n<td>sent by the webhook (read the note above)</td>\n</tr>\n<tr>\n<td><code>id</code></td>\n<td>descriptive ID your data set, for example: \"my-app\". It lets us group the data into one set and display many different data sets for single visitor. It should include only alphanumeric characters (letters, digits, punctuation marks)</td>\n</tr>\n<tr>\n<td><code>fields</code></td>\n<td>array of data objects that include <code>name</code> and <code>value</code> properties. This is the actual data that you have about your visitor. This data will be displayed to the agent during the chat. For the links you can also pass the anchor text. By adding <code>url</code> param, the value field would act as the anchor.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"optional-properties\">Optional properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>icon</code></td>\n<td>address of the icon picture that will be displayed in the LiveChat app next to visitor’s data. It lets you group important information. <code>icon</code> should be a URL without the <code>http://</code> prefix. Your web server should support serving the icon file using https:// (SSL) protocol. The icon’s dimensions must be 64x64 px.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"108fdbb6-00bd-4dc0-95b9-517e3afc8089","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"285865b3-7cdf-4645-965b-97ba2192e83a","type":"text/javascript","exec":[""]}}],"_postman_id":"fb03d059-beba-2373-950d-64cf9e0115a7","auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":true,"source":{"_postman_id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","name":"LiveChat REST API","type":"collection"}}},{"name":"Webhooks","item":[{"name":"Display configured webhooks","id":"e971938e-53ef-b43e-898b-4fa71b4eeea5","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/webhooks","description":"<p>Returns a list of webhooks that have been created in a LiveChat account.</p>\n","urlObject":{"protocol":"https","path":["webhooks"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"e971938e-53ef-b43e-898b-4fa71b4eeea5"},{"name":"Create a new webhook","id":"8e43f5fd-63d5-fbb6-3ef7-8d79f22e5664","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"POST","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[{"key":"event_type","value":"chat_started","type":"text"},{"key":"data_types[]","value":"chat","type":"text"},{"key":"data_types[]","value":"visitor","type":"text"},{"key":"url","value":"http://my-company.com/parse_webhook.php","type":"text"}]},"url":"https://api.livechatinc.com/webhooks","description":"<p>Creates a new webhook.</p>\n","urlObject":{"protocol":"https","path":["webhooks"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"8e43f5fd-63d5-fbb6-3ef7-8d79f22e5664"},{"name":"Delete a webhook","id":"acbac7cf-3bd0-5764-9217-07a53caa2ef6","request":{"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":false},"method":"DELETE","header":[{"key":"X-API-Version","value":"2"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.livechatinc.com/webhooks/12345","description":"<p>Deletes a webhook with the given ID.</p>\n","urlObject":{"protocol":"https","path":["webhooks","12345"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"acbac7cf-3bd0-5764-9217-07a53caa2ef6"}],"id":"28b1730a-4891-2fa7-0f95-c748ec7db2ad","description":"<h1 id=\"webhooks\">Webhooks</h1>\n<p>This method will help you build your own LiveChat integrations by <strong>creating</strong> and <strong>managing webhooks</strong>. </p>\n<p>Check out our <a href=\"https://docs.livechatinc.com/build-integration/#!webhooks\">webhooks tutorial</a> for more information, use cases and to learn how to get started.</p>\n<h2 id=\"available-paths-webhooks-available-paths\">Available paths {#webhooks-available-paths}</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Methods</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>GET</code></td>\n<td><code>/webhooks</code></td>\n</tr>\n<tr>\n<td><code>POST</code></td>\n<td><code>/webhooks</code></td>\n</tr>\n<tr>\n<td><code>DELETE</code></td>\n<td><code>/webhooks/&lt;WEBHOOK_ID&gt;</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"display-configured-webhooks\">Display configured webhooks</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/webhooks\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/webhooks\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"events\": [{\n        \"licence\": 12345,\n        \"event_type\": \"chat_started\",\n        \"data_types\": [\"chat\", \"visitor\"],\n        \"url\": \"https://my-company.com/parse_webhook.php\",\n        \"verified\": true,\n        \"token\": \"0adec158e423091d5a36c9fce95775db\",\n        \"id\": \"39612eee5f1b431217aafb9de19c1e32\"\n    }]\n}\n</code></pre>\n<p>Returns a list of webhooks that have been created in a LiveChat account.</p>\n<h2 id=\"create-a-new-webhook\">Create a new webhook</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://api.livechatinc.com/webhooks\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/webhooks\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n  -d \"event_type=chat_started&amp;\\\ndata_types[]=chat&amp;\\\ndata_types[]=visitor&amp;\\\nurl=http://my-company.com/parse_webhook.php\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"events\": [{\n        \"licence\": 12345,\n        \"event_type\": \"chat_started\",\n        \"data_types\": [\"chat\", \"visitor\"],\n        \"url\": \"https://my-company.com/parse_webhook.php\",\n        \"verified\": true,\n        \"token\": \"0adec158e423091d5a36c9fce95775db\",\n        \"id\": \"39612eee5f1b431217aafb9de19c1e32\"\n    }]\n}\n</code></pre>\n<p>Creates a new webhook.</p>\n<h4 id=\"required-properties\">Required properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>event_type</code></td>\n<td>must be one of <code>chat_started</code>, <code>chat_ended</code>, <code>chat_changed</code>, <code>visitor_queued</code>, <code>ticket_created</code> or <code>canned_response_changed</code></td>\n</tr>\n<tr>\n<td><code>data_types</code></td>\n<td>determines what information the webhook will contain</td>\n</tr>\n<tr>\n<td><code>url</code></td>\n<td>the URL address the webhook will be sent to</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"additional-info\">Additional info:</h4>\n<p><code>event_type</code> determines when the webhook will be sent to your script:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>chat_started</code></td>\n<td>when the chat is started</td>\n</tr>\n<tr>\n<td><code>chat_ended</code></td>\n<td>when the chat is ended</td>\n</tr>\n<tr>\n<td><code>chat_changed</code></td>\n<td>when the chat is tagged</td>\n</tr>\n<tr>\n<td><code>visitor_queued</code></td>\n<td>when the visitor enters the queue before a chat</td>\n</tr>\n<tr>\n<td><code>ticket_created</code></td>\n<td>when a new ticket is created</td>\n</tr>\n<tr>\n<td><code>canned_response_changed</code></td>\n<td>when a canned response is created, modified or deleted</td>\n</tr>\n</tbody>\n</table>\n</div><p><code>data_type</code> is an array that includes one or more of the following values):</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>chat</code></td>\n<td>only supported in <code>chat_started</code>, <code>chat_changed</code> and <code>chat_ended</code> event types</td>\n</tr>\n<tr>\n<td><code>visitor</code></td>\n<td>only supported in <code>chat_started</code>, <code>chat_ended</code>, <code>chat_changed</code> and <code>visitor_queued</code> event types</td>\n</tr>\n<tr>\n<td><code>pre_chat_survey</code></td>\n<td>only supported in <code>chat_started</code> and <code>chat_ended</code> event types</td>\n</tr>\n<tr>\n<td><code>ticket</code></td>\n<td>only supported in <code>ticket_created</code> event type</td>\n</tr>\n<tr>\n<td><code>canned_response</code></td>\n<td>only supported in <code>canned_response_changed</code> event type</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"delete-a-webhook\">Delete a webhook</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>DELETE https://api.livechatinc.com/webhooks/&lt;ID&gt;\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/webhooks/39612eee5(...)\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2 \\\n  -X DELETE\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"result\":\"Push notification removed successfully\"\n}\n</code></pre>\n<p>Deletes a webhook with the given <code>ID</code>.</p>\n","event":[{"listen":"prerequest","script":{"id":"00756ff3-438d-4de7-9e43-05cb0973c67f","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"8bf5123f-47d3-4e9c-8b3b-a5bd60e6ce13","type":"text/javascript","exec":[""]}}],"_postman_id":"28b1730a-4891-2fa7-0f95-c748ec7db2ad","auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"},"isInherited":true,"source":{"_postman_id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","id":"4a592118-5cdd-b8b6-2f1e-09e0555283fd","name":"LiveChat REST API","type":"collection"}}}],"auth":{"type":"oauth2","oauth2":{"accessToken":"<access-token>","tokenType":"<token-type>"}},"event":[{"listen":"prerequest","script":{"id":"d86412fc-5641-4838-be51-4ff2cebf95e6","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"87368235-754f-48f2-a072-f8fa668a91a4","type":"text/javascript","exec":[""]}}]}