{"info":{"_postman_id":"e2e0b1fb-f5e4-49e8-b500-a2a80074f660","name":"BPCC Mobile/Web Messaging API v1","description":"<html><head></head><body><p>The Bright Pattern Contact Center Mobile/Web Messaging API v1 is a RESTful API that allows developers to integrate chat and voice interactions with mobile devices or third-party applications. This API can be used for development of rich contact applications, such as customer-facing mobile and web applications for advanced chat, voice, and video communications with Bright Pattern Contact Center-based contact centers.</p>\n<h1 id=\"audience\">Audience</h1>\n<p>This documentation is intended for the IT personnel and developers of custom applications for Bright Pattern Contact Center-based contact centers. Readers of this documentation are expected to have expertise in web and mobile application development as well as a solid understanding of contact center operations and resources that are involved in such operations.</p>\n<h1 id=\"sample-applications\">Sample Applications</h1>\n<p>Bright Pattern provides source code of sample customer-facing rich contact applications. This source code can be used as a reference for in-house application development or it can be embedded directly into the customer-facing mobile applications and/or web applications of your organization.</p>\n<p>For web chat applications, you can download the source code by clicking the <strong>Client application</strong> button on the <a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/Messaging\">Messaging/Chat Scenario Entry</a> page of the Contact Center Administrator application.</p>\n<p>For mobile applications, you can obtain the source code by submitting a service request to <a href=\"https://bugfocus.zendesk.com/home\">Bright Pattern Customer Success Management</a>.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Audience","slug":"audience"},{"content":"Sample Applications","slug":"sample-applications"}],"owner":"6735877","collectionId":"e2e0b1fb-f5e4-49e8-b500-a2a80074f660","publishedId":"T1LHGpBY","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-08-06T21:00:13.000Z"},"item":[{"name":"General Information","item":[],"id":"4e923b86-14fb-4e4e-8beb-184de7aacfea","description":"<h1 id=\"example-request\">Example Request</h1>\n<p>The following is an example of an API request:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>URL: https://yourcontactcenter.brightpattern.com/clientweb/api/v1/chats?tenantUrl=yourcontactcenter.brightpattern.com\n\nMethod: POST\n\nAuthorization: MOBILE-API-140-327-PLAIN appId=\"test\", clientId=\"123\"\n\nContent-Type: application/json; charset=UTF-8\n\nUser-Agent: MobileClient\n\n{\n    \"phone_number\":\"3001\",\n    \"parameters\": {\n        \"first_name\":\"John\",\n        \"last_name\":\"Lee\"\n        }\n}\n</code></pre><h1 id=\"client-authentication-elements\">Client Authentication Elements</h1>\n<p>The following elements are used for client authentication and must be specified in every client request:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Element</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>tenantUrl</td>\n<td>Identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login.</td>\n</tr>\n<tr>\n<td>appId</td>\n<td>Unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario</td>\n</tr>\n<tr>\n<td>clientId</td>\n<td>Unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application and should be unique for each client application/device combination. If clientId is set to WebChat, HTTP cookies will be used for client identification.</td>\n</tr>\n<tr>\n<td>User-Agent</td>\n<td>Specifies the type of client interface. For web applications, it is determined by the browser type. For mobile applications, this parameter shall always be set to MobileClient.</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"additional-information\">Additional Information</h1>\n<p>Standard HTTP response codes whose meaning conforms to the original specification (RFC 2616) are not discussed in this document. For specification of such responses, see section 10 of <a href=\"http://www.ietf.org/rfc/rfc2616.txt\">http://www.ietf.org/rfc/rfc2616.txt</a>. This document only specifies the response codes whose description deviates from the original specification (e.g., is defined more narrowly or has a different meaning).</p>\n<p>Note that a client application can only have one active communication session at a time.</p>\n<h1 id=\"error-body\">Error Body</h1>\n<p>When the response status code indicates an error, a JSON response body is provided by the server to\ngive more details about the error:\n{\"error_code\": \"error code\", \"error_message\":\"error message\"}</p>\n<h2 id=\"authorization-errors\">Authorization Errors</h2>\n<p>Here is a list of the possible values of authorization-related error codes and error messages that are\ncommon to all requests that require authorization.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>error_code</th>\n<th>error_message</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1000</td>\n<td>Missing or invalid tenantUrl</td>\n</tr>\n<tr>\n<td>2000</td>\n<td>Authorization header is missing</td>\n</tr>\n<tr>\n<td>2001</td>\n<td>Authorization parameter format is incorrect</td>\n</tr>\n<tr>\n<td>2002</td>\n<td>Authorization scheme is incorrect</td>\n</tr>\n<tr>\n<td>2003</td>\n<td>Authorization parameter is missing: appId</td>\n</tr>\n<tr>\n<td>2004</td>\n<td>Authorization parameter is missing: clientId</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"other-errors\">Other Errors</h2>\n<p>Here is a list of the possible values of other error codes and error messages.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>error_code</th>\n<th>error_message</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>3000</td>\n<td>Missing or invalid application unique id</td>\n</tr>\n<tr>\n<td>5000</td>\n<td>Timeout - chat server takes too long to respond</td>\n</tr>\n<tr>\n<td>5001</td>\n<td>No server is available to accept chat connection</td>\n</tr>\n<tr>\n<td>5003</td>\n<td>Error decoding JSON request body: {JSON exception message}</td>\n</tr>\n<tr>\n<td>5004</td>\n<td>Chat server disconnected</td>\n</tr>\n<tr>\n<td>5005</td>\n<td>Chat session is not found</td>\n</tr>\n<tr>\n<td>5006</td>\n<td>Mobile Launch Point (application) is not found</td>\n</tr>\n<tr>\n<td>5500</td>\n<td>[internal server error message]</td>\n</tr>\n<tr>\n<td>5501</td>\n<td>Upload size limit exceeded</td>\n</tr>\n<tr>\n<td>5502</td>\n<td>File not found</td>\n</tr>\n<tr>\n<td>5509</td>\n<td>Too many concurrent poll requests for the same session</td>\n</tr>\n<tr>\n<td>5511</td>\n<td>No events</td>\n</tr>\n<tr>\n<td>5558</td>\n<td>[file operation error message]</td>\n</tr>\n<tr>\n<td>5955</td>\n<td>Unspecified server error</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"54ba443f-cbf5-4147-9dab-ae82a573d594","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"64fa67e9-1954-40cd-a59d-166cf088b319","type":"text/javascript","exec":[""]}}],"_postman_id":"4e923b86-14fb-4e4e-8beb-184de7aacfea"},{"name":"Methods","item":[{"name":"Check Availability","id":"034a5daf-b092-41c3-a3ef-561ac2539f3d","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"user-agent":true}},"request":{"method":"GET","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\"","description":"<p>appId is the unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario. </p>\n<p>clientId is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application and should be unique for each client application/device combination. If clientId is set to \"WebChat\", HTTP cookies will be used for client identification.</p>\n","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":"https://<tenant_url>/clientweb/api/v1/availability?tenantUrl=<tenantUrl>","description":"<p>This method returns the availability status of the configured hours of operation of the associated <a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/ScenarioEntries/MessagingChat\">Messaging/Chat scenario entry</a>. Optionally, <a href=\"https://help.brightpattern.com/5.3:Faq/Metrics#How_is_EWT_Calculated.3F\">Estimated Wait time (EWT)</a> (in seconds) may be returned but could be missing if the server does not have enough data to estimate the EWT value. Note that the API does not check if there are any agents actually logged in.</p>\n<h1 id=\"status-meanings\">Status Meanings</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>available</td>\n<td>The requested service is available.</td>\n</tr>\n<tr>\n<td>notAvailable</td>\n<td>The office providing the requested service is currently closed.</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"returns\">Returns</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>Success: Returns the scenario entry’s current status / EWT (optionally)</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"errors\">Errors</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v1","availability"],"host":["<tenant_url>"],"query":[{"description":{"content":"<p>Identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login. Additionally, this variable allows service providers to specify a particular tenant (i.e., if the request is not sent to the tenant's domain).</p>\n","type":"text/plain"},"key":"tenantUrl","value":"<tenantUrl>"}],"variable":[]}},"response":[{"id":"12c3f828-10c5-4d15-a0fa-04fb546e5db3","name":"Check Availability Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"1a2c26b0-b065-4f27-8696-cbac8f03bb57\", clientId=\"WebChat\"","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v1/availability?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v1","availability"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com"}]}},"code":200,"_postman_previewlanguage":null,"header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"chat\":\"<available|notAvailable>\",\r\n    \"ewt\": \"<estimated wait time in seconds for a chat in state queued>\"\r\n}"}],"_postman_id":"034a5daf-b092-41c3-a3ef-561ac2539f3d"},{"name":"Expected Parameters","id":"47715c60-5210-4a4f-85d6-f43226d9a480","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"user-agent":true}},"request":{"method":"GET","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\"","description":"<p>appId is the unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario. \nclientId is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application and should be unique for each client application/device combination. If clientId is set to \"WebChat\", HTTP cookies will be used for client identification.</p>\n","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":"https://<tenant_url>/clientweb/api/v1/parameters?tenantUrl=<tenantUrl>","description":"<p>This method returns an array of expected parameters. The parameters are optional. They may be used, for example, to look for the most qualified agents to handle the requested chat sessions and/or to display user information for the agents. These parameters are initially specified for the <a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/Messaging\">Messaging/Chat scenario entry</a> through which this mobile application will communicate with the contact center.</p>\n<p>Currently, the following parameter types are supported:</p>\n<ul>\n<li>PHONE</li>\n<li>TEXT</li>\n<li>EMAIL</li>\n<li>FIRST_NAME</li>\n<li>LAST_NAME</li>\n<li>ACCOUNT</li>\n<li>COMPANY</li>\n</ul>\n<h1 id=\"returns\">Returns</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>application/json with names and types of parameters that may be expected from the client application</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"errors\">Errors</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v1","parameters"],"host":["<tenant_url>"],"query":[{"description":{"content":"<p>Identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login. Additionally, this variable allows service providers to specify a particular tenant (i.e., if the request is not sent to the tenant's domain).</p>\n","type":"text/plain"},"key":"tenantUrl","value":"<tenantUrl>"}],"variable":[]}},"response":[{"id":"ece5594b-2fca-463e-ab49-cfcdf1434644","name":"Expected Parameters Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"1a2c26b0-b065-4f27-8696-cbac8f03bb57\", clientId=\"WebChat\"","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v1/parameters?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v1","parameters"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com"}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"parameters\":[\r\n        {\r\n            \"<name>\":\"<type>\"\r\n        },\r\n        \"...\"\r\n    ]\r\n}"}],"_postman_id":"47715c60-5210-4a4f-85d6-f43226d9a480"},{"name":"Request Chat","id":"8e7227be-aed6-4bf7-a641-48274ae2221b","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"user-agent":true}},"request":{"method":"POST","header":[{"description":"<p>appId is the unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario. \nclientId is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application and should be unique for each client application/device combination. If clientId is set to \"WebChat\", HTTP cookies will be used for client identification.</p>\n","key":"Authorization","type":"text","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\""},{"key":"Content","value":"application/json","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"phone_number\":\"<phone number for callback, if necessary>\",\r\n    \"from\":\"<propagated into scenario variable $(item.from)>\",\r\n    \"parameters\":{\r\n        \"parameter_1\":\"value_1\",\r\n        \"...\",\r\n        \"parameter_n\":\"value_n\"\r\n    }\r\n}"},"url":"https://<tenant_url>/clientweb/api/v1/chats?tenantUrl=<tenantUrl>","description":"<p>This method initiates a chat session. It provides values of all or some of the <a href=\"https://help.brightpattern.com/5.3:Mobile-web-api-specification/ExpectedParameters\">expected parameters</a>, and it may also contain the phone number of the mobile device. Depending on the <a href=\"https://help.brightpattern.com/5.3:Contact-center-administrator-guide/Messaging\">scenario entry configuration</a>, a callback can be initiated automatically to the specified number as soon as the chat request is delivered to the agent.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>The Request Chat method may return the ID and parameters of an existing chat session if there are any currently existing chat sessions associated with this specific client. For example, the client app created a chat session, which was then closed or crashed, then restarted before the session timed out on the server. </li>\n<li>The <em>is_new_chat</em> response attribute is specified if the chat is a new session or existing session. The client application will handle these differently (e.g., if in an existing session the app may request session history and show the previous content.</li>\n<li>If the associated mobile/web scenario entry is not configured for automatic callback, the agent can still use this number to call the mobile user manually, either upon the agent's own initiative or when asked to do this via a chat message from the mobile user.</li>\n<li>The parameter <em>from</em> may be used to specify either the device owner’s name or phone number. It will be placed in the scenario variable <em>$(item.from)</em>.</li>\n<li>Parameters returned in the <em>parameters</em> attribute are propagated into the scenario variable <a href=\"https://help.brightpattern.com/5.3:Scenario-builder-reference-guide/Reference/VariablesandExpressions/Variables#.24.28item.externalChatData.29\">$(item.externalChatData)</a>.</li>\n<li>Optionally, <a href=\"https://help.brightpattern.com/5.3:Faq/Metrics#How_is_EWT_Calculated.3F\">Estimated Wait time (EWT)</a> (in seconds) may be returned but could be missing if the server does not have enough data to estimate the EWT value. This might be important for the clients with strict JSON serialization (i.e., the client app may fail deserializing the JSON if the attribute is missing).</li>\n</ul>\n<h1 id=\"returns\">Returns</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>Chat session properties (content type: application/json)</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"errors\">Errors</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>400</td>\n<td>Bad request</td>\n</tr>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v1","chats"],"host":["<tenant_url>"],"query":[{"description":{"content":"<p>Identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login. Additionally, this variable allows service providers to specify a particular tenant (i.e., if the request is not sent to the tenant's domain).</p>\n","type":"text/plain"},"key":"tenantUrl","value":"<tenantUrl>"}],"variable":[]}},"response":[{"id":"c25e4042-8985-4a6a-a5f2-379d88b083fe","name":"Request Chat Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"1a2c26b0-b065-4f27-8696-cbac8f03bb57\", clientId=\"WebChat\"","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"phone_number\": \"<phone number for callback, if necessary>\",\r\n    \"from\": \"<propagated into scenario variable $(item.from)>\",\r\n    \"parameters\": {\r\n        \"parameter_1\": \"value_1\",\r\n        \"...\",\r\n        \"parameter_n\": \"value_n\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v1/chats?tenantUrl=yourcompany","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v1","chats"],"query":[{"key":"tenantUrl","value":"yourcompany","description":"Identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login."}]}},"code":200,"_postman_previewlanguage":null,"header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"chat_id\":\"<chat ID>\",\r\n    \"state\":\"<queued|connected|ivr|establishing>\",\r\n    \"ewt\":\"<estimated wait time for a chat in state queued>\",\r\n    \"is_new_chat\":\"true|false\",\r\n    \"phone_number\":\"phone number that will be used for callback\"\r\n}"}],"_postman_id":"8e7227be-aed6-4bf7-a641-48274ae2221b"},{"name":"Get Active Chat","id":"9e7c701c-c6eb-4417-85c4-a3e2b40905fe","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"user-agent":true}},"request":{"method":"GET","header":[{"description":"<p>appId is the unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario. \nclientId is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application and should be unique for each client application/device combination. If clientId is set to \"WebChat\", HTTP cookies will be used for client identification.</p>\n","key":"Authorization","type":"text","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\""},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":"https://<tenant_url>/clientweb/api/v1/chats/active?tenantUrl=<tenantUrl>","description":"<p>This method returns the properties of an active chat session. Optionally, <a href=\"https://help.brightpattern.com/5.3:Faq/Metrics#How_is_EWT_Calculated.3F\">Estimated Wait time (EWT)</a> (in seconds) may be returned but could be missing if the server does not have enough data to estimate the EWT value.</p>\n<h1 id=\"returns\">Returns</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>Chat session properties (content type: application/json)</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"errors\">Errors</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n</tr>\n<tr>\n<td>404</td>\n<td>Not found</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v1","chats","active"],"host":["<tenant_url>"],"query":[{"description":{"content":"<p>Identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login. Additionally, this variable allows service providers to specify a particular tenant (i.e., if the request is not sent to the tenant's domain).</p>\n","type":"text/plain"},"key":"tenantUrl","value":"<tenantUrl>"}],"variable":[]}},"response":[{"id":"03f83490-6ef1-4b44-8f66-928b869b0821","name":"Get Active Chat Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"1a2c26b0-b065-4f27-8696-cbac8f03bb57\", clientId=\"WebChat\"","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v1/chats/active?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v1","chats","active"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com"}]}},"code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"chat_id\": \"<chat ID>\",\n    \"state\": \"<queued|connected|ivr|establishing>\",\n    \"ewt\": \"<estimated wait time for a chat in state queued>\",\n    \"phone_number\": \"<phone number that will be used for callback>\"\n}"}],"_postman_id":"9e7c701c-c6eb-4417-85c4-a3e2b40905fe"},{"name":"Send Events","id":"64188469-0be9-4ce1-86a8-85adf0f34f76","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"user-agent":true}},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\"","description":"<p>appId is the unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario. \nclientId is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application and should be unique for each client application/device combination. If clientId is set to \"WebChat\", HTTP cookies will be used for client identification.</p>\n","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"body":{"mode":"raw","raw":"{\r\n “events”: [<array of chat events>\r\n    ]\r\n}"},"url":"https://<tenant_url>/clientweb/api/v1/chats/:chatId/events?tenantUrl=<tenantUrl>","description":"<p>This method sends events from the client to the server side.</p>\n<h1 id=\"returns\">Returns</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>Array of new chat events from the server side (content type: application/json)</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"errors\">Errors</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n</tr>\n<tr>\n<td>404</td>\n<td>Not found</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v1","chats",":chatId","events"],"host":["<tenant_url>"],"query":[{"description":{"content":"<p>Identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login. Additionally, this variable allows service providers to specify a particular tenant (i.e., if the request is not sent to the tenant's domain).</p>\n","type":"text/plain"},"key":"tenantUrl","value":"<tenantUrl>"}],"variable":[{"description":{"content":"<p>The current chat session ID. The value of this variable is returned in the body of a successful invocation of the \"Request Chat\" method.</p>\n","type":"text/plain"},"type":"any","value":"","key":"chatId"}]}},"response":[{"id":"02a528a4-d89c-4705-9acf-1072a313bcd3","name":"Send Events Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\""},{"key":"User-Agent","type":"text","value":"MobileClient"}],"body":{"mode":"raw","raw":"{\r\n    \"events\":[\r\n        \"<array of chat events>\"\r\n    ]\r\n}"},"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v1/chats/:chatId/events?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v1","chats",":chatId","events"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com"}],"variable":[{"key":"chatId","value":"f5f68c35-ffec-4dcb-8f7f-755b6395a6dc"}]}},"code":200,"_postman_previewlanguage":null,"header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"events\":[\r\n        \"<array of new chat events from server>\"\r\n    ]\r\n}"}],"_postman_id":"64188469-0be9-4ce1-86a8-85adf0f34f76"},{"name":"Get Chat History","id":"1d0a72fa-2c73-4d6d-a32c-c25ca14a869a","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"user-agent":true}},"request":{"method":"GET","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\"","description":"<p>appId is the unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario. \nclientId is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application and should be unique for each client application/device combination. If clientId is set to \"WebChat\", HTTP cookies will be used for client identification.</p>\n","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":"https://<tenant_url>/clientweb/api/v1/chats/:chatId/history?tenantUrl=<tenantUrl>","description":"<p>This method returns all <a href=\"https://help.brightpattern.com/5.3:Mobile-web-api-specification/ClientEvents\">client events</a> and all <a href=\"https://help.brightpattern.com/5.3:Mobile-web-api-specification/ServerEvents\">server events</a> for the current session. Multiple event objects can be returned; each event's <em>timestamp</em> attribute can be used to restore the correct message order.</p>\n<h1 id=\"returns\">Returns</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>Array of chat events (content type: application/json)</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"errors\">Errors</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n</tr>\n<tr>\n<td>404</td>\n<td>Not found</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v1","chats",":chatId","history"],"host":["<tenant_url>"],"query":[{"description":{"content":"<p>Identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login. Additionally, this variable allows service providers to specify a particular tenant (i.e., if the request is not sent to the tenant's domain).</p>\n","type":"text/plain"},"key":"tenantUrl","value":"<tenantUrl>"}],"variable":[{"description":{"content":"<p>The current chat session ID. The value of this variable is returned in the body of a successful invocation of the \"Request Chat\" method.</p>\n","type":"text/plain"},"type":"any","value":"","key":"chatId"}]}},"response":[{"id":"05b44635-ac02-4421-81eb-8d8d6d658025","name":"Get Chat History Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"1a2c26b0-b065-4f27-8696-cbac8f03bb57\", clientId=\"WebChat\"","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v1/chats/:chatId/history?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v1","chats",":chatId","history"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com"}],"variable":[{"key":"chatId","value":"f5f68c35-ffec-4dcb-8f7f-755b6395a6dc"}]}},"code":200,"_postman_previewlanguage":null,"header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"events\":[\r\n        \"<array of chat events>\"\r\n    ]\r\n}"}],"_postman_id":"1d0a72fa-2c73-4d6d-a32c-c25ca14a869a"},{"name":"Get New Chat Events","id":"42a80cb9-957a-4baf-8f1c-c0708be003e5","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"user-agent":true}},"request":{"method":"GET","header":[{"description":"<p>appId is the unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario. \nclientId is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application and should be unique for each client application/device combination. If clientId is set to \"WebChat\", HTTP cookies will be used for client identification.</p>\n","key":"Authorization","type":"text","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\""},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":"https://<tenant_url>/clientweb/api/v1/chats/:chatId/events?tenantUrl=<tenantUrl>","description":"<p>This method returns new chat events for the current session. If there are no new events, the server can keep the request active during a timeout (i.e., for about 5–15 seconds). If the client sends another request to get new events while the previous request is kept active, the server will respond with error 400 (Bad request).</p>\n<h1 id=\"returns\">Returns</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>Array of chat events (content type: application/json)</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"errors\">Errors</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>400</td>\n<td>Bad request</td>\n</tr>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n</tr>\n<tr>\n<td>404</td>\n<td>Not found</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v1","chats",":chatId","events"],"host":["<tenant_url>"],"query":[{"description":{"content":"<p>Identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login. Additionally, this variable allows service providers to specify a particular tenant (i.e., if the request is not sent to the tenant's domain).</p>\n","type":"text/plain"},"key":"tenantUrl","value":"<tenantUrl>"}],"variable":[{"description":{"content":"<p>The current chat session ID. The value of this variable is returned in the body of a successful invocation of the \"Request Chat\" method.</p>\n","type":"text/plain"},"type":"any","value":"","key":"chatId"}]}},"response":[{"id":"3c91960c-f89b-4985-9e6d-5d00aa7452ad","name":"Get New Chat Events Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","type":"text","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\""},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v1/chats/:chatId/events?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v1","chats",":chatId","events"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com"}],"variable":[{"key":"chatId","value":"f5f68c35-ffec-4dcb-8f7f-755b6395a6dc"}]}},"code":200,"_postman_previewlanguage":null,"header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"events\":[\r\n        \"<array of chat events>\"\r\n    ]\r\n}"}],"_postman_id":"42a80cb9-957a-4baf-8f1c-c0708be003e5"},{"name":"Upload File","id":"b87a2f8e-7095-41da-8771-502966a86be9","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"user-agent":true}},"request":{"method":"POST","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\"","description":"<p>appId is the unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario. \nclientId is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application and should be unique for each client application/device combination. If clientId is set to \"WebChat\", HTTP cookies will be used for client identification.</p>\n","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"file","description":"<p>The file or text to be uploaded</p>\n","type":"file","src":"/C:/Users/Lenovo/Desktop/important_file.txt"}]},"url":"https://<tenant_url>/clientweb/api/v1/files?tenantUrl=<tenantUrl>","description":"<p>This method uploads a file to the server. The maximum file size is 25 MB. The server will store up to 1000 files. Newly received files will replace the oldest files. This method can be used, for example, to send pictures from the client mobile application to the contact center agents.</p>\n<h1 id=\"returns\">Returns</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>File ID to be used in the chat_session_file message (content type: application/json)</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"errors\">Errors</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v1","files"],"host":["<tenant_url>"],"query":[{"description":{"content":"<p>Identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login. Additionally, this variable allows service providers to specify a particular tenant (i.e., if the request is not sent to the tenant's domain).</p>\n","type":"text/plain"},"key":"tenantUrl","value":"<tenantUrl>"}],"variable":[]}},"response":[{"id":"e59051cb-0644-4df4-ab4b-a4f060d97c01","name":"Upload File Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\"","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"},{"key":"Content-Type","value":"multipart/form-data","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"File","type":"file","src":"/C:/Users/Lenovo/Desktop/important_file.txt"}]},"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v1/files?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v1","files"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com"}]}},"code":200,"_postman_previewlanguage":null,"header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"file_id\":\"file ID\"\r\n}"}],"_postman_id":"b87a2f8e-7095-41da-8771-502966a86be9"},{"name":"Get File","id":"55791b6d-fdbf-4fc1-8348-e843599df60d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"description":"<p>appId is the unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario. \nclientId is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application and should be unique for each client application/device combination. If clientId is set to \"WebChat\", HTTP cookies will be used for client identification.</p>\n","key":"Authorization","type":"text","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\""}],"url":"https://<tenant_url>/clientweb/api/v1/chats/:chatId/files/:fileId","description":"<p>This method downloads a file from the server using the received file ID. See server event <strong>Chat Session File</strong>.</p>\n<h1 id=\"returns\">Returns</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>File content type</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"errors\">Errors</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n</tr>\n<tr>\n<td>404</td>\n<td>Not found</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v1","chats",":chatId","files",":fileId"],"host":["<tenant_url>"],"query":[{"disabled":true,"key":"","value":""},{"disabled":true,"key":"","value":""}],"variable":[{"description":{"content":"<p>The current chat session ID. The value of this variable is returned in the body of a successful invocation of the \"Request Chat\" method.</p>\n","type":"text/plain"},"type":"any","value":"","key":"chatId"},{"description":{"content":"<p>The file ID of the file to download</p>\n","type":"text/plain"},"type":"any","value":"","key":"fileId"}]}},"response":[{"id":"01cb53de-53f1-4c01-b34b-84828769eae1","name":"Get File Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","type":"text","value":"MOBILE-API-140-327-PLAIN appId=\"1a2c26b0-b065-4f27-8696-cbac8f03bb57\", clientId=\"WebChat\""}],"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v1/chats/:chatId/files/:fileId","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v1","chats",":chatId","files",":fileId"],"query":[{"key":"","value":"","disabled":true},{"key":"","value":"","disabled":true}],"variable":[{"key":"chatId","value":"f5f68c35-ffec-4dcb-8f7f-755b6395a6dc"},{"key":"fileId","value":"e1f234c35-ffec-4dcb-8f7f-755b6395a6dc"}]}},"code":200,"_postman_previewlanguage":"text","header":null,"cookie":[],"responseTime":null,"body":"File content type"}],"_postman_id":"55791b6d-fdbf-4fc1-8348-e843599df60d"},{"name":"Get Agent Profile Photo","id":"06901c0d-142b-44b2-a6b0-063609196a3b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"description":"<p>appId is the unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario. \nclientId is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application and should be unique for each client application/device combination. If clientId is set to \"WebChat\", HTTP cookies will be used for client identification.</p>\n","key":"Authorization","type":"text","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\""}],"url":"https://<tenant_url>/clientweb/api/v1/chats/:chatId/profilephotos/:partyId","description":"<p>This method downloads a profile photo of the specified agent.</p>\n<h1 id=\"request-body\">Request Body</h1>\n<p>The request body is the party ID of the agent participating in the current chat session.</p>\n<p>Note: The party ID is provided with the chat event (polled at https://{host:port}/clientweb/api/v1/chats/{chatId}/events?tenantUrl={tenantUrl}). For example, you can see <em>party_ID</em> in the event message for <em>chat_session_party_joined</em>.</p>\n<h1 id=\"returns\">Returns</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>File content type</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"errors\">Errors</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n</tr>\n<tr>\n<td>404</td>\n<td>Not found</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v1","chats",":chatId","profilephotos",":partyId"],"host":["<tenant_url>"],"query":[],"variable":[{"description":{"content":"<p>The current chat ID</p>\n","type":"text/plain"},"type":"any","value":"","key":"chatId"},{"description":{"content":"<p>The party ID of the agent for the current chat session</p>\n","type":"text/plain"},"type":"any","value":"","key":"partyId"}]}},"response":[{"id":"a966188d-4adf-463b-8b27-76bb700529d8","name":"Get Agent Profile Photo Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","type":"text","value":"MOBILE-API-140-327-PLAIN appId=\"1a2c26b0-b065-4f27-8696-cbac8f03bb57\", clientId=\"WebChat\""}],"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v1/chats/:chatId/profilephotos/:partyId","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v1","chats",":chatId","profilephotos",":partyId"],"variable":[{"key":"chatId","value":"f5f68c35-ffec-4dcb-8f7f-755b6395a6dc"},{"key":"partyId","value":"e5f23c35-ffec-4dcb-8f7f-755b6395a6dd"}]}},"code":200,"_postman_previewlanguage":"text","header":null,"cookie":[],"responseTime":null,"body":"File content type"}],"_postman_id":"06901c0d-142b-44b2-a6b0-063609196a3b"},{"name":"Get ICE servers","id":"46a50947-3e48-42cc-85b0-8271d448ff77","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"user-agent":true}},"request":{"method":"GET","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\"","description":"<p>appId is the unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario. \nclientId is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application and should be unique for each client application/device combination. If clientId is set to \"WebChat\", HTTP cookies will be used for client identification.</p>\n","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":"https://<tenant_url>/clientweb/api/v1/iceservers?tenantUrl=<tenantUrl>","description":"<p>This method returns a list of configured ICE servers to provide to the browser so that an audio-visual session could be added to the chat.</p>\n<h1 id=\"returns\">Returns</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>Success: JSON response with information of ICE servers</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"errors\">Errors</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v1","iceservers"],"host":["<tenant_url>"],"query":[{"description":{"content":"<p>Identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login. Additionally, this variable allows service providers to specify a particular tenant (i.e., if the request is not sent to the tenant's domain).</p>\n","type":"text/plain"},"key":"tenantUrl","value":"<tenantUrl>"}],"variable":[]}},"response":[{"id":"75df352e-dec7-428e-90fd-29ede89846fa","name":"Get ICE servers","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"1a2c26b0-b065-4f27-8696-cbac8f03bb57\", clientId=\"WebChat\"","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":{"raw":"https://<tenant_url>/clientweb/api/v1/iceservers?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["<tenant_url>"],"path":["clientweb","api","v1","iceservers"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\r\n  \"servers\":[{\r\n    \"url\": \"<url>\",\r\n    \"username\": \"<(optional) username>\",\r\n    \"credential\": \"<(optional) password>\"\r\n  }]\r\n}\r\n"}],"_postman_id":"46a50947-3e48-42cc-85b0-8271d448ff77"},{"name":"Get Chat Widget Configuration","id":"7818889c-6690-4cd5-ac26-7db0759da8a6","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"user-agent":true}},"request":{"method":"GET","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"<app_id>\", clientId=\"WebChat\"","description":"<p>appId is the unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario. \nclientId is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application and should be unique for each client application/device combination. If clientId is set to \"WebChat\", HTTP cookies will be used for client identification.</p>\n","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":"https://<tenant_url>/clientweb/api/v1/configuration?tenantUrl=<tenantUrl>","description":"<p>This method returns the chat widget configuration for the launch point.</p>\n<h1 id=\"returns\">Returns</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>Success: JSON response with information of ICE servers</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"errors\">Errors</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v1","configuration"],"host":["<tenant_url>"],"query":[{"description":{"content":"<p>Identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login. Additionally, this variable allows service providers to specify a particular tenant (i.e., if the request is not sent to the tenant's domain).</p>\n","type":"text/plain"},"key":"tenantUrl","value":"<tenantUrl>"}],"variable":[]}},"response":[{"id":"125fb222-df57-4577-afdf-b12fc0f053cf","name":"Get Chat Widget Configuration","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"1a2c26b0-b065-4f27-8696-cbac8f03bb57\", clientId=\"WebChat\"","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v1/configuration?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v1","configuration"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\r\n  \"widgets\":[\r\n     {\r\n       \"name\": \"<widget name>\",\r\n       \"urls\":[\"<url>\", …],\r\n       \"definition\": {\r\n         \"contact_tab\":{\r\n           \"enabled\": true|false,\r\n           \"location\": \"top_left|top_middle|top_right\r\n                       |right_top|right_middle|right_bottom\r\n                       |bottom_left| bottom_middle|bottom_right\r\n                       |left_top|left_middle|left_bottom\",\r\n           \"color\": \"<color>\",\r\n           \"bg_color\": \"color\",\r\n           \"font\": {\r\n             \"family\": \"<font family>\",\r\n             \"size\": \"<font size>\",\r\n             \"style\": \"<font style>\",\r\n             \"weight\": \"<font weight>\"   \r\n           },\r\n           \"agents_available_msg\": \"<msg>\",\r\n           \"agents_not_available_msg\": \"<msg>\",\r\n           \"out_of_hours_msg\": \"<msg>\",\r\n           \"show_ewt_out_of_hours\": true|false  \r\n         }\r\n       },\r\n\t    \"styles\":{\r\n\t\t    \"style1\":{\r\n                \"contentMargin\" : {\r\n                    \"margin\": \"\"\r\n                },\r\n                \"titleFont\" : {\r\n                    \"font-family\": \"\",\r\n                    \"font-style\": \"\",\r\n                    \"font-size\": \"\",\r\n                    \"font-weight\": \"\"\t\r\n                },\r\n                \"contactTabFont\" : {\r\n                    \"font-family\": \"\",\r\n                    \"font-style\": \"\",\r\n                    \"font-size\": \"\",\r\n                    \"font-weight\": \"\"\t\r\n                },\r\n                \"systemMessage\" : {\r\n                    \"background-color\": \"\"\r\n                },\r\n                \"agentMessage\" : {\r\n                    \"background-color\": \"\"\r\n                },\r\n                \"widgetBorder\" : {\r\n                    \"border\": \"1px solid etc...\",\r\n                    \"border-radius\": \"\"\r\n                },\r\n                \"contactTabBorder\": {\r\n                    \"border\": \"1px solid etc...\",\r\n                    \"border-radius\": \"\"\r\n                },\r\n                \"widgetBackground\" {\r\n                    \"background\": \"url(img.png) #fff repeat-y\"        \r\n                },\r\n                \"baseFont\": {\r\n                    \"font-family\": \"\",\r\n                    \"font-style\": \"\",\r\n                    \"font-size\": \"\",\r\n                    \"font-weight\": \"\",\r\n                    \"color\": \"\"\r\n                },    \r\n                \"dialogShadow\": {\r\n                    \"box-shadow\":\"\"\r\n                }    \r\n            }\r\n        } \r\n     }\r\n  ]\r\n}\r\n"}],"_postman_id":"7818889c-6690-4cd5-ac26-7db0759da8a6"}],"id":"15312ff7-753a-4093-9da1-185c6f471885","_postman_id":"15312ff7-753a-4093-9da1-185c6f471885","description":""},{"name":"Events","item":[{"name":"Client Events","item":[],"id":"bdfc43c0-539d-4733-9ebe-5950bbf1bbe7","description":"<h1 id=\"chat_session_message\">chat_session_message</h1>\n<p>chat_session_message contains a new chat message.</p>\n<h2 id=\"parameters\">Parameters</h2>\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>msg_id</td>\n<td>Unique identifier of the message in the following format (chatId:messageNumber)</td>\n</tr>\n<tr>\n<td>msg</td>\n<td>The content of the message</td>\n</tr>\n<tr>\n<td>channel</td>\n<td>The chat channel (e.g., web, Twitter, WhatsApp, etc.)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_message\",\n    \"msg_id\": \"&lt;message id&gt;\",\n    \"msg\": \"&lt;chat message&gt;\",\n    \"channel\": \"chat channel&gt;\n}\n</code></pre>\n<h1 id=\"chat_session_typing\">chat_session_typing</h1>\n<p>chat_session_typing is sent when the user of the client application starts typing.</p>\n<h2 id=\"format-1\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_typing\"\n}\n</code></pre>\n<h1 id=\"chat_session_not_typing\">chat_session_not_typing</h1>\n<p>chat_session_not_typing is sent when the user of the client application stops typing.</p>\n<h2 id=\"format-2\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_not_typing\"\n}\n</code></pre>\n<h1 id=\"chat_session_form_data\">chat_session_form_data</h1>\n<p>chat_session_form_data contains the data requested by the server via event chat_session_form_show.</p>\n<h2 id=\"format-3\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_form_data\",\n    \"form_request_id\": \"&lt;form request ID from the corresponding server event&gt;\",\n    \"form_name\": \"&lt;form name&gt;\",\n    \"data\": {\n        \"param1\": \"value1\",\n        …\n        }\n}\n</code></pre>\n<h1 id=\"chat_session_secure_form_data\">chat_session_secure_form_data</h1>\n<p>chat_session_secure_form_data contains the data requested by the server via event chat_session_secure_form_show.</p>\n<h2 id=\"format-4\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_secure_form_data\",\n    \"form_request_id\": \"&lt;form request ID from the corresponding server event&gt;\",\n    \"form_name\": \"&lt;form name&gt;\",\n    \"data\": {\n        \"param1\": \"value1\",\n        …\n        }\n}\n</code></pre>\n<h1 id=\"chat_session_secure_form_cancel\">chat_session_secure_form_cancel</h1>\n<p>chat_session_secure_form_cancel is to cancel the secure form.</p>\n<h2 id=\"format-5\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_secure_form_cancel\",\n    \"form_request_id\": \"&lt;form request ID from the corresponding server event&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_end\">chat_session_end</h1>\n<p>chat_session_end ends the chat session.</p>\n<h2 id=\"format-6\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_end\"\n}\n</code></pre>\n<h1 id=\"chat_session_disconnect\">chat_session_disconnect</h1>\n<p>chat_session_disconnect ends the current chat conversation but keeps the session open (i.e., controlled by the scenario). This message can be used instead of chat_session_end when additional information may be expected from the server (e.g., a survey form).</p>\n<h2 id=\"format-7\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_disconnect\"\n}\n</code></pre>\n<h1 id=\"chat_session_signaling\">chat_session_signaling</h1>\n<p>chat_session_signaling is a container message for WebRTC signaling messages from client to server. These messages are not stored in the chat session history.</p>\n<h2 id=\"parameters-1\">Parameters</h2>\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>msg_id</td>\n<td>Unique identifier of the message in the following format (chatId:messageNumber)</td>\n</tr>\n<tr>\n<td>chatId</td>\n<td>Unique identifier of the chat session that is returned by the server in response to client’s request for chat</td>\n</tr>\n<tr>\n<td>messageNumber</td>\n<td>Ordinal number of the given message in the chat exchange</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-8\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_signaling\",\n    \"msg_id\": \"&lt;message id&gt;\",\n    \"destination_party_id\": \"&lt;agent party id&gt;\",\n    \"data\": \"&lt;signaling message&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_file\">chat_session_file</h1>\n<p>chat_session_file provides notification that the client has uploaded a file to the server.</p>\n<h2 id=\"parameters-2\">Parameters</h2>\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>msg_id</td>\n<td>Unique identifier of the message in the following format (chatId:messageNumber)</td>\n</tr>\n<tr>\n<td>chatId</td>\n<td>Unique identifier of the chat session that is returned by the server in response to client’s request for chat</td>\n</tr>\n<tr>\n<td>messageNumber</td>\n<td>Ordinal number of the given message in the chat exchange</td>\n</tr>\n<tr>\n<td>fileId</td>\n<td>Identifies the uploaded file</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-9\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_file\",\n    \"msg_id\": \"&lt;message id&gt;\",\n    \"file_type\": \"&lt;image|attachment&gt;\",\n    \"file_id\": \"&lt;file id&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_location\">chat_session_location</h1>\n<p>chat_session_location contains a new geographical location message.</p>\n<h2 id=\"parameters-3\">Parameters</h2>\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>msg_id</td>\n<td>Unique identifier of the message in the following format (chatId:messageNumber)</td>\n</tr>\n<tr>\n<td>url</td>\n<td>Map URL (optional)</td>\n</tr>\n<tr>\n<td>latitude</td>\n<td>Latitude of the location</td>\n</tr>\n<tr>\n<td>longitude</td>\n<td>Longitude of the location</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-10\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_location\",\n    \"msg_id\": \"&lt;message id&gt;\"\n    \"url\": \"&lt;map URL (optional)&gt;\",\n    \"latitude\": \"&lt;latitude&gt;\",\n    \"longitude\": \"&lt;longitude&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_navigation\">chat_session_navigation</h1>\n<p>chat_session_navigation is sent from the client with its web page location (page name or url)</p>\n<h2 id=\"parameters-4\">Parameters</h2>\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>msg_id</td>\n<td>Unique identifier of the message in the following format (chatId:messageNumber)</td>\n</tr>\n<tr>\n<td>title</td>\n<td>Page title</td>\n</tr>\n<tr>\n<td>page</td>\n<td>Page name or page url</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-11\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_navigation\",\n    \"msg_id\": \"&lt;message id&gt;\",\n    \"title\": \"&lt;page title&gt;\",\n    \"page\": \"&lt;page name or page url&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_cobrowsing_rejected\">chat_session_cobrowsing_rejected</h1>\n<p>chat_session_cobrowsing_rejected is to notify the server that the user has rejected a co-browsing session.</p>\n<h2 id=\"format-12\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_cobrowsing_rejected\"\n}\n</code></pre>\n<h1 id=\"chat_session_cobrowsing_started\">chat_session_cobrowsing_started</h1>\n<p>chat_session_cobrowsing_started is to notify the server that the user has accepted and started a con-browsing session.</p>\n<h2 id=\"format-13\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_cobrowsing_started\",\n    \"provider_type\": \"&lt;Name of chat co-browsing provider&gt;\",\n    \"cobrowsing_url\": \"&lt;URL of the co-browsing session&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_cobrowsing_ended\">chat_session_cobrowsing_ended</h1>\n<p>chat_session_cobrowsing_ended is to notify the server that the user has ended the co-browsing session.</p>\n<h2 id=\"format-14\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_cobrowsing_ended\"\n}\n</code></pre>\n","event":[{"listen":"prerequest","script":{"id":"44eb5b92-414f-4611-b497-b7de9a42bc4b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"98e7eb5d-0e88-4442-b62d-a38195458b67","type":"text/javascript","exec":[""]}}],"_postman_id":"bdfc43c0-539d-4733-9ebe-5950bbf1bbe7"},{"name":"Server Events","item":[],"id":"f213932c-e268-4d60-a47e-084cb35723d8","description":"<h1 id=\"chat_session_status\">chat_session_status</h1>\n<p>chat_session_status updates the current state of the chat session. If the state is failed, the client application shall assume that the chat session no longer exists.</p>\n<h2 id=\"format\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_status\",\n    \"state\": \"queued|connecting|connected|failed|completed\",\n    \"ewt\": \"&lt;estimated waiting time for queued status&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_ended\">chat_session_ended</h1>\n<p>chat_session_ended indicates a normal termination of the chat session (e.g., when the chat session is closed by the agent). The client application shall assume that the chat session no longer exists.</p>\n<h2 id=\"format-1\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_ended\"\n}\n</code></pre>\n<h1 id=\"chat_session_party_joined\">chat_session_party_joined</h1>\n<p>chat_session_party_joined indicates that a new party (a new agent) has joined the chat session. </p>\n<h2 id=\"parameters\">Parameters</h2>\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>party_id</td>\n<td>Unique identifier of the chat party on the server side. A separate identifier is generated for each party (agent) that handles this chat session.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-2\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_party_joined\",\n    \"party_id\": \"&lt;party id&gt;\",\n    \"first_name\": \"&lt;party first name&gt;\",\n    \"last_name\": \"&lt;party last name&gt;\",\n    \"display_name\": \"&lt;party display name&gt;\",\n    \"type\": \"&lt;scenario|external|internal&gt;\",\n    \"timestamp\": \"&lt;UTC timestamp in milliseconds&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_party_left\">chat_session_party_left</h1>\n<p>chat_session_party_left indicates that one of the existing parties (an agent) has left the chat session.</p>\n<h2 id=\"parameters-1\">Parameters</h2>\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>party_id</td>\n<td>Unique identifier of the chat session on the server side. A separate identifier is generated for each party (agent) that handles this chat session.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-3\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_party_left\",\n    \"party_id\": \"&lt;party id&gt;\",\n    \"timestamp\": \"&lt;UTC timestamp in milliseconds&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_message\">chat_session_message</h1>\n<p>chat_session_message contains a new chat message.</p>\n<h2 id=\"parameters-2\">Parameters</h2>\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>msg_id</td>\n<td>Unique identifier of the party that sends this message</td>\n</tr>\n<tr>\n<td>party_id</td>\n<td>Unique identifier of the chat session on the server side. A separate identifier is generated for each party (agent) that handles this chat session. Note that party ID always matches the chat ID (i.e., when the event is received as part of chat session history).</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-4\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_message\",\n    \"party_id\": \"&lt;party id&gt;\",\n    \"msg_id\": \"&lt;message id&gt;\",\n    \"msg\": \"&lt;chat message&gt;\",\n    \"timestamp\": \"&lt;UTC timestamp in milliseconds&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_typing\">chat_session_typing</h1>\n<p>chat_session_typing is sent when the agent starts typing.</p>\n<h2 id=\"parameters-3\">Parameters</h2>\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>party_id</td>\n<td>Unique identifier of the chat party on the server side. A separate identifier is generated for each party (agent) that handles this chat session.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-5\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_typing\",\n    \"party_id\": \"&lt;party id&gt;\",\n    \"timestamp\": \"&lt;UTC timestamp in seconds&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_not_typing\">chat_session_not_typing</h1>\n<p>chat_session_not_typing is sent when the agent stops typing.</p>\n<h2 id=\"parameters-4\">Parameters</h2>\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>party_id</td>\n<td>Unique identifier of the chat party on the server side. A separate identifier is generated for each party (agent) that handles this chat session.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-6\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_not_typing\",\n    \"party_id\": \"&lt;party id&gt;\",\n    \"timestamp\": \"&lt;UTC timestamp in seconds&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_form_show\">chat_session_form_show</h1>\n<p>chat_session_form_show is sent to the request user’s input from the client application to be entered via a predefined form. The client application is normally supposed to display the specified form to the user and send back the entered data via event <em>chat_session_form_data</em>.</p>\n<h2 id=\"format-7\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_form_show\",\n    \"form_request_id\": \"&lt;request ID that will be used by the client application to associate the response&gt;\",\n    \"form_name\": \"&lt;predefined form name known to the client application&gt;\",\n    \"form_timeout\": \"form timeout\",\n    \"timestamp\": \"&lt;UTC timestamp in seconds&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_secure_form_show\">chat_session_secure_form_show</h1>\n<p>chat_session_secure_form_show is sent to notify the client application that it should display a secure, predefined form to the user and send back the entered data via event chat_session_secure_form_data.</p>\n<h2 id=\"format-8\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_secure_form_show\",\n    \"form_request_id\": \"&lt;request ID that will be used by the client application in chat_session_secure_form_data&gt;\",\n    \"form_id\": \"&lt;Form ID&gt;\",\n    \"timestamp\": \"&lt;UTC timestamp in seconds&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_timeout_warning\">chat_session_timeout_warning</h1>\n<p>chat_session_timeout_warning is sent to request that the specified text be displayed to the user of the client application. Typically, it is used to display an inactivity warning message.</p>\n<h2 id=\"format-9\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_timeout_warning\",\n    \"msg\": \"&lt;warning text&gt;\",\n    \"timestamp\": \"&lt;UTC timestamp in milliseconds&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_inactivity_timeout\">chat_session_inactivity_timeout</h1>\n<p>chat_session_inactvity_timeout indicates the termination of the chat session due to the user’s inactivity and provides text to be displayed to the user. The client application shall assume that the chat session no longer exists.</p>\n<h2 id=\"format-10\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_inactvity_timeout\",\n    \"msg\": \"&lt;inactivity timeout text&gt;\",\n    \"timestamp\": \"&lt;UTC timestamp in milliseconds&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_signaling\">chat_session_signaling</h1>\n<p>chat_session_signaling is a container message for WebRTC signaling messages from server to client. These messages are not stored in the chat session history.</p>\n<h2 id=\"format-11\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_signaling\",\n    \"msg_id\": \"&lt;message id&gt;\",\n    \"data\": \"&lt;signaling message&gt;\"\n    \n}\n</code></pre>\n<h1 id=\"chat_session_file\">chat_session_file</h1>\n<p>chat_session_file provides notification that a file is being sent to the client. The client can use parameter file_id to download the file.</p>\n<h2 id=\"parameters-5\">Parameters</h2>\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>party_id</td>\n<td>Unique identifier of the chat session on the server side. A separate identifier is generated for each party (agent) that handles this chat session.</td>\n</tr>\n<tr>\n<td>msg_id</td>\n<td>Unique identifier of the corresponding message</td>\n</tr>\n<tr>\n<td>partyId</td>\n<td>Unique identifier of the party that sends the message</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-12\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_file\",\n    \"party_id\": \"&lt;party id&gt;\",\n    \"msg_id\": \"&lt;message id&gt;\",\n    \"file_id\": \"&lt;file id&gt;\",\n    \"file_type\": \"&lt;image|attachment&gt;\",\n    \"timestamp\": \"&lt;event time in Unix format&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_location\">chat_session_location</h1>\n<p>chat_session_location contains a new location message.</p>\n<h2 id=\"parameters-6\">Parameters</h2>\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>msg_id</td>\n<td>Unique identifier of the message</td>\n</tr>\n<tr>\n<td>url</td>\n<td>Map url (optional)</td>\n</tr>\n<tr>\n<td>latitude</td>\n<td>Latitude of the location</td>\n</tr>\n<tr>\n<td>longitude</td>\n<td>Longitude of the location</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-13\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_location\",\n    \"msg_id\": \"&lt;message id&gt;\"\n    \"url\": \"&lt;map url (optional)&gt;”,\n    \"latitude\": “&lt;latitude&gt;”,\n    \"longitude\": “&lt;longitude&gt;”,\n    \"timestamp\": \"&lt;UTC timestamp in seconds&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_cobrowsing_requested\">chat_session_cobrowsing_requested</h1>\n<p>chat_session_cobrowsing_requested is sent to the client application to request a co-browsing session.</p>\n<h2 id=\"format-14\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_cobrowsing_requested\",\n    \"msg_id\": \"&lt;message id&gt;\"\n}\n</code></pre>\n","event":[{"listen":"prerequest","script":{"id":"2974849a-cce0-4dd7-9bec-1da5616c41db","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"3677a3fe-3ef4-40b2-afb8-ae65bcedc087","type":"text/javascript","exec":[""]}}],"_postman_id":"f213932c-e268-4d60-a47e-084cb35723d8"},{"name":"Signaling Message Types","item":[],"id":"674124f1-068d-4a8d-8c37-3d8c8c2b33fe","description":"<h1 id=\"request-call\">Request Call</h1>\n<p>This message is sent from the client to request a WebRTC call.</p>\n<h2 id=\"format\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"REQUEST_CALL”,\n    \"offerVideo\": \"true|false\"\n}\n</code></pre>\n<h1 id=\"call-rejected\">Call Rejected</h1>\n<p>This message is sent from the server to indicate that a requested call was rejected.</p>\n<h2 id=\"format-1\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"CALL_REJECTED\",\n    \"reason_code\": \"&lt;reject reason code&gt;\",\n    \"reason\": \"TBD\"\n}\n</code></pre>\n<h1 id=\"offer-call\">Offer Call</h1>\n<p>This message is sent from the server to start a WebRTC session.</p>\n<h2 id=\"format-2\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"OFFER_CALL\",\n    \"offerVideo\": \"true|false\",\n    \"sdp\": \"&lt;session description string\"\n}\n</code></pre>\n<h1 id=\"answer-call\">Answer Call</h1>\n<p>This message is sent from the client to confirm the WebRTC session started by the server.</p>\n<h2 id=\"format-3\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"ANSWER_CALL\",\n    \"sdp\": \"&lt;session description string&gt;\"\n}\n</code></pre>\n<h1 id=\"ice-candidate\">ICE Candidate</h1>\n<p>This message is sent from the client or server with ICE candidate description.</p>\n<h2 id=\"format-4\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"ICE_CANDIDATE\",\n    \"sdpMid\": \"&lt;candidate id&gt;\",\n    \"sdpMLineIndex\": \"&lt;candidate index&gt;\",\n    \"candidate\": \"&lt;candidate description&gt;\"\n}\n</code></pre>\n<h1 id=\"end-call\">End Call</h1>\n<p>This message is sent from the client or server to end the current WebRTC session.</p>\n<h2 id=\"format-5\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"END_CALL\"\n}\n</code></pre>\n","event":[{"listen":"prerequest","script":{"id":"82c3db22-1b7b-4ce0-be80-bd9340d948dc","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"0f3bd21d-fcbc-4844-bdb2-2d25d3447bd1","type":"text/javascript","exec":[""]}}],"_postman_id":"674124f1-068d-4a8d-8c37-3d8c8c2b33fe"}],"id":"cc3eb8ef-b9d1-4397-99a9-7c4ee4c0f838","_postman_id":"cc3eb8ef-b9d1-4397-99a9-7c4ee4c0f838","description":""}],"event":[{"listen":"prerequest","script":{"id":"efe5782d-9e1f-49b7-baf1-db5a1b90af80","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"53914c5e-dcf1-401b-8b70-82c65e94a6d2","type":"text/javascript","exec":[""]}}]}