{"info":{"_postman_id":"99782afa-b5be-402f-bc11-d45f6cd68339","name":"BPCC Mobile/Web Messaging API v2","description":"<html><head></head><body><p>The Bright Pattern Contact Center (BPCC) Mobile/Web Messaging API v2 is a RESTful API that allows developers to integrate chat and voice interactions with mobile devices or third-party applications. The BPCC Mobile/Web Messaging API v2 expands on our existing <a href=\"https://documenter.getpostman.com/view/6735877/T1LHGpBY\">Mobile/Web Messaging API v1</a>, and can be used for development of rich contact applications, such as customer-facing mobile, web, and messaging applications for advanced chat, voice, and video communications with Bright Pattern Contact Center-based contact centers.</p>\n<h2 id=\"features\">Features</h2>\n<p>In addition to all the methods and events included in the v1 API, the Mobile/Web Messaging API v2 includes the following:</p>\n<ul>\n<li><p>Support for the Apple Push Notification service (iOS) and Firebase Cloud Messaging push notifications (Android and iOS) with the <strong>Mobile Notification Subscription</strong> method</p>\n</li>\n<li><p>The <strong>Get Case History</strong> method, which returns the combined transcripts of all chat sessions linked to a specific CRM Case object</p>\n</li>\n<li><p>The <strong>Close Case</strong> method, which allows a client application request to close the case associated with the chat session</p>\n</li>\n<li><p>The <strong>Get Version</strong> method, which returns the version of Bright Pattern Contact Center used on the server.</p>\n</li>\n<li><p>Server and client events indicating that a chat session message was delivered or read</p>\n</li>\n<li><p>A server event indicating if a chat session case was set</p>\n</li>\n</ul>\n<h2 id=\"note\">Note</h2>\n<p>The BPCC Mobile/Web Messaging API v2 endpoint prefix is as follows:</p>\n<p><strong>https://[tenant_url]/clientweb/api/v2/</strong></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/MessagingChat\">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":"6735878","collectionId":"99782afa-b5be-402f-bc11-d45f6cd68339","publishedId":"TzXwFJFP","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-05-25T23:12:43.000Z"},"item":[{"name":"General Information","item":[],"id":"4485aab9-cb91-4597-a705-8474cc90a18f","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://yourcompany.brightpattern.com/clientweb/api/v2/chats?tenantUrl=yourcompany.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 <strong>MobileClient</strong>.</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><strong>Note</strong>: 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<tr>\n<td>5601</td>\n<td>No case is specified for this session.</td>\n</tr>\n<tr>\n<td>5602</td>\n<td>CRM server responded with error.</td>\n</tr>\n<tr>\n<td>5603</td>\n<td>Too many parameters.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"d1cc90b6-0ba9-4be7-90d0-f24a8d7dd67b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"35750d2b-5d25-4070-885f-1410bca28a72","type":"text/javascript","exec":[""]}}],"_postman_id":"4485aab9-cb91-4597-a705-8474cc90a18f"},{"name":"Methods","item":[{"name":"Check Availability","id":"c8ba5507-80e9-4407-b2eb-92ddcb8032d6","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","type":"text","value":"MobileClient"}],"url":"https://<tenant_url>/clientweb/api/v2/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<tr>\n<td>503</td>\n<td>Service Unavailable</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v2","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":"58d74166-b379-49a4-b9a3-331789ca9c48","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/v2/availability?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v2","availability"],"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\": \"available\",\n    \"ewt\": \"3\"\n}"}],"_postman_id":"c8ba5507-80e9-4407-b2eb-92ddcb8032d6"},{"name":"Expected Parameters","id":"6406fca1-894a-4b9b-82a9-284135e63d73","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/v2/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","v2","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":"83b717d6-79cf-48ae-9871-a9347056b868","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/v2/parameters?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v2","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":"6406fca1-894a-4b9b-82a9-284135e63d73"},{"name":"Request Chat","id":"2a1a1db7-a7d6-4404-a9f1-3d87f3a2c1e2","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/v2/chats?tenantUrl=<tenantUrl>","description":"<p>This method initiates a chat session. It provides values of all or some of the <a href=\"https://documenter.getpostman.com/view/6735878/TzXwFJFP?version=latest#6406fca1-894a-4b9b-82a9-284135e63d73\">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>403</td>\n<td>Forbidden</td>\n</tr>\n<tr>\n<td>503</td>\n<td>Service Unavailable</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v2","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":"cca3a7b7-dfe8-4045-8ae4-44861084ed75","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","name":"Content-Type","value":"application/json","type":"text"},{"key":"User-Agent","value":"MobileClient","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"phone_number\": \"16508888888\",\r\n    \"from\": \"51.18.205.152\",\r\n    \"parameters\": {\r\n        \"FIRST_NAME\": \"Aiden\",\r\n        \"LAST_NAME\": \"Bookbinder\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v2/chats?tenantUrl=yourcompany","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v2","chats"],"query":[{"key":"tenantUrl","value":"yourcompany"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"state\": \"ivr\",\n    \"ewt\": \"0\",\n    \"chat_id\": \"d6c1adc2-385b-42e5-9e0a-1883c2bc5f81\",\n    \"is_new_chat\": true,\n    \"phone_number\": \"16508888888\"\n}"}],"_postman_id":"2a1a1db7-a7d6-4404-a9f1-3d87f3a2c1e2"},{"name":"Mobile Notification Subscription","id":"ea3bfe36-8fc2-4104-bdd1-f8dad930b319","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"content-type":true,"user-agent":true}},"request":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"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=\"<Unique app identifier>\", clientId=\"<Unique client ID>\" "},{"key":"User-Agent","type":"text","value":"MobileClient"}],"body":{"mode":"raw","raw":"// For Apple Push Notification service (APNs):\r\n{\r\n    \"ios_apns_device_token\": \"<iOS APNs device token>\",\r\n    \"ios_app_bundle_id\": \"<iOS app ID>\"\r\n}\r\n// For Apple Firebase:\r\n{\r\n    \"ios_firebase_device_token\": \"<Firebase token>\"\r\n}\r\n//For Android Firebase:\r\n{\r\n    \"android_firebase_device_token\": \"<Firebase token>\"\r\n}"},"url":"https://<tenant_url>/clientweb/api/v2/chats/:chatId/notifications?tenantUrl=<tenant URL>","description":"<p>This method is a client application request for either subscribing to or canceling mobile notifications for a chat session.</p>\n<h1 id=\"notes\">Notes</h1>\n<ul>\n<li><p>This method should be invoked <strong>after</strong> invoking the <strong>Request Chat</strong> method (i.e., the <em>chatId</em> value required for this method is returned in the Request Chat method).</p>\n</li>\n<li><p>Additionally, this method should be invoked when its device token is changed.</p>\n</li>\n<li><p>The client application may also opt to stop receiving mobile notifications by using this API method\nwith an empty JSON body: {}</p>\n</li>\n</ul>\n<h1 id=\"request-parameters\">Request Parameters</h1>\n<p>The mobile application will specify one of the following parameters, depending on the application’s\noperating system and used notification framework.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>ios_apns_device_token</td>\n<td>The iOS application using native APNs</td>\n</tr>\n<tr>\n<td>ios_app_bundle_id</td>\n<td>For iOS devices using native APNs, this parameter is required and is used as the APNs topic</td>\n</tr>\n<tr>\n<td>ios_firebase_device_token</td>\n<td>The iOS application using Firebase notifications</td>\n</tr>\n<tr>\n<td>android_firebase_device_token</td>\n<td>The android application using Firebase notifications</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>Names of configured services with current status</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>406</td>\n<td>Not acceptable: Too many parameters/corresponding notifications are not configured for the Messaging/Chat entry</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v2","chats",":chatId","notifications"],"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":"<tenant URL>"}],"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":"<chat ID>","key":"chatId"}]}},"response":[{"id":"b204b1f5-6a62-4165-9fbf-bd42597c41fd","name":"Mobile Notification Subscription","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","type":"text","value":"MOBILE-API-140-327-PLAIN appId=\"1a2c26b0-b065-4f27-8696-cbac8f03bb57\", clientId=\"WebChat\""},{"key":"User-Agent","type":"text","value":"MobileClient"}],"body":{"mode":"raw","raw":"{\r\n    \"ios_apns_device_token\": \"<iOS APNs device token>\",\r\n    \"ios_app_bundle_id\": \"<iOS app ID>\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v2/chats/:chatId/notifications?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v2","chats",":chatId","notifications"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com","type":"text"}],"variable":[{"key":"chatId","value":"f5f68c35-ffec-4dcb-8f7f-755b6395a6dc"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{}"}],"_postman_id":"ea3bfe36-8fc2-4104-bdd1-f8dad930b319"},{"name":"Get Active Chat","id":"3cbebd3b-56f0-4aa9-ba0e-71bae91089f7","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/v2/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","v2","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":"ac7bb004-0b86-46c7-a293-17b7ab276ddb","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/v2/chats/active?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v2","chats","active"],"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_id\":\"<chat ID>\",\r\n    \"state\":\"<queued|connected|ivr>\",\r\n    \"ewt\":\"<estimated wait time for a chat in state queued>\",\r\n    \"phone_number\":\"<phone number that will be used for callback>\"\r\n}"}],"_postman_id":"3cbebd3b-56f0-4aa9-ba0e-71bae91089f7"},{"name":"Send Events","id":"add61ff3-641b-4f34-9b0d-17974a76ccc4","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":"{\n    \"events\":[\n        \"<array of new chat events from server>\"\n    ]\n}"},"url":"https://<tenant_url>/clientweb/api/v2/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>Success</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","v2","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":"60699c15-539c-4784-8f66-d7f212caf222","name":"Send Events Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"MOBILE-API-140-327-PLAIN appId=\"1a2c26b0-b065-4f27-8696-cbac8f03bb57\", clientId=\"WebChat\""},{"key":"User-Agent","type":"text","value":"MobileClient"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n “events”: [<array of chat events>\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v2/chats/:chatId/events?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v2","chats",":chatId","events"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com"}],"variable":[{"key":"chatId","value":"f5f68c35-ffec-4dcb-8f7f-755b6395a6dc"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"add61ff3-641b-4f34-9b0d-17974a76ccc4"},{"name":"Get Chat History","id":"1ea53655-6976-4c1c-aaa2-d12ed81908a5","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/v2/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","v2","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":"a1565388-2d45-4460-8e11-a2075f0656f5","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/v2/chats/:chatId/history?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v2","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":"1ea53655-6976-4c1c-aaa2-d12ed81908a5"},{"name":"Get New Chat Events","id":"7e427669-f094-428a-b27e-71a84f645f73","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/v2/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>403</td>\n<td>Forbidden</td>\n</tr>\n<tr>\n<td>404</td>\n<td>Not Found</td>\n</tr>\n<tr>\n<td>429</td>\n<td>Too many requests</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v2","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":"83305bb7-90b5-47b8-8f64-6152c998ef1d","name":"Get New Chat Events Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","type":"text","value":"MOBILE-API-140-327-PLAIN appId=\"1a2c26b0-b065-4f27-8696-cbac8f03bb57\", clientId=\"WebChat\""},{"key":"User-Agent","value":"MobileClient","type":"text"}],"url":{"raw":"https://yourcompany.brightpattern.com/clientweb/api/v2/chats/:chatId/events?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v2","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":"7e427669-f094-428a-b27e-71a84f645f73"},{"name":"Upload File","id":"e2c2f3c5-3ad1-462a-a24c-0853c9b7e5fe","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/v2/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>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","v2","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":"0e7c9a65-a164-4f0f-865a-ea8125e24444","name":"Upload File Example","originalRequest":{"method":"POST","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"},{"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/v2/files?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v2","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 to use in chat_session_file message\"\r\n}"}],"_postman_id":"e2c2f3c5-3ad1-462a-a24c-0853c9b7e5fe"},{"name":"Get File","id":"5c771d1f-1d12-4b77-9597-dffc1e3937eb","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{}},"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/v2/chats/:chatId/files/:fileId","description":"<p>This method downloads a file from the server using the received file ID. See server event Chat Session File.</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","v2","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":"ea723ed5-4523-4d73-a4e8-25c5019fe527","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/v2/chats/:chatId/files/:fileId","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v2","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":"5c771d1f-1d12-4b77-9597-dffc1e3937eb"},{"name":"Get Agent Profile Photo","id":"dedd0d48-096a-4934-937b-ef6224551997","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/v2/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","v2","chats",":chatId","profilephotos",":partyId"],"host":["<tenant_url>"],"query":[],"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 party ID of the agent for the current chat session</p>\n","type":"text/plain"},"type":"any","value":"","key":"partyId"}]}},"response":[{"id":"31c992c1-9c68-4389-91eb-0170ca2be3d3","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/v2/chats/:chatId/profilephotos/:partyId","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v2","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":"dedd0d48-096a-4934-937b-ef6224551997"},{"name":"Get ICE servers","id":"e1aa5b22-9f9a-4571-9e7c-e8c759826aee","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","type":"text","value":"MobileClient"}],"url":"https://<tenant_url>/clientweb/api/v2/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","v2","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":"e9b2bded-6233-45aa-a0c4-09c3e162ff90","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/v2/iceservers?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["<tenant_url>"],"path":["clientweb","api","v2","iceservers"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com"}]}},"status":"OK","code":200,"_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":"e1aa5b22-9f9a-4571-9e7c-e8c759826aee"},{"name":"Get Chat Widget Configuration","id":"cdce4cdd-b132-479f-bdd3-03fc87377465","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","type":"text","value":"MobileClient"}],"url":"https://<tenant_url>/clientweb/api/v2/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","v2","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":"4f576cd4-944f-4e2a-a83b-b2cb85979404","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://yourcontactcenter.brightpattern.com/clientweb/api/v2/configuration?tenantUrl=yourcontactcenter.brightpattern.com","protocol":"https","host":["yourcontactcenter","brightpattern","com"],"path":["clientweb","api","v2","configuration"],"query":[{"key":"tenantUrl","value":"yourcontactcenter.brightpattern.com"}]}},"status":"OK","code":200,"_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":"cdce4cdd-b132-479f-bdd3-03fc87377465"},{"name":"Get Case History","id":"92c829b0-7dfc-4d6b-b4df-e3009cba9193","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=\"<Unique app identifier>\", clientId=\"<Unique client ID>\" "},{"key":"User","type":"text","value":"MobileClient"}],"url":"https://<tenant_url>/clientweb/api/v2/casehistory?tenantUrl=<tenant URL>","description":"<p>This method returns the combined transcripts of all chat sessions (i.e., the chat thread) linked to the specific CRM case object. Note that this request should be made only after the <em>chat_session_case_set</em> server event is received; if the scenario has not specified a case, the request will return an error.</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: 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<tr>\n<td>406</td>\n<td>Not acceptable: If the scenario did not specify a case</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v2","casehistory"],"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":"<tenant URL>"}],"variable":[]}},"response":[{"id":"2523f88d-507b-40ba-a52d-e93121de64f3","name":"Get Case History","originalRequest":{"method":"GET","header":[{"key":"Authorization","type":"text","value":"MOBILE-API-140-327-PLAIN appId=\"1a2c26b0-b065-4f27-8696-cbac8f03bb57\", clientId=\"WebChat\""},{"key":"User","type":"text","value":"MobileClient"}],"url":{"raw":"https://yourcontactcenter.brightpattern.com/clientweb/api/v2/casehistory?tenantUrl=yourcontactcenter.brightpattern.com","protocol":"https","host":["yourcontactcenter","brightpattern","com"],"path":["clientweb","api","v2","casehistory"],"query":[{"key":"tenantUrl","value":"yourcontactcenter.brightpattern.com"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"sessions\": [\r\n        {\r\n            \"chat_id\":\"<session 1 ID>\",\r\n            \"created_time\":<Unix timestamp in seconds>,\r\n            \"events\":<array of events from this chat session>\r\n        },\r\n        ...\r\n        {\r\n            \"chat_id\":\"<session 4 ID>\",\r\n            \"created_time\":<Unix timestamp in seconds>,\r\n            \"events\":<array of events from this chat session>\r\n        },\r\n        ...     \r\n    ]\r\n}"}],"_postman_id":"92c829b0-7dfc-4d6b-b4df-e3009cba9193"},{"name":"Close Case","id":"e866bde6-39db-498b-925d-e1469d1d4f68","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=\"<Unique app identifier>\", clientId=\"<Unique client ID>\" "},{"key":"User-Agent","type":"text","value":"MobileClient"}],"url":"https://<tenant_url>/clientweb/api/v2/closecase?tenantUrl=<tenant URL>","description":"<p>This method invokes a client application request to close the case associated with the chat session. Note that this request should be made only after the <em>chat_session_case_set</em> server event is received; if the scenario has not specified a case, the request will return an error.</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>Case successfully closed</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<tr>\n<td>406</td>\n<td>Not acceptable: If scenario did not specify a case</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Server error: Case is specified but cannot be closed (i.e., the CRM server responded with an error)</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v2","closecase"],"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":"<tenant URL>"}],"variable":[]}},"response":[{"id":"061df7d3-d2e5-4722-a95e-5db001de4e3b","name":"Close Case","originalRequest":{"method":"POST","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/v2/closecase?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v2","closecase"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{}"}],"_postman_id":"e866bde6-39db-498b-925d-e1469d1d4f68"},{"name":"Get Version","id":"b8b98621-8a04-48c3-a1d4-0cf7a331eab0","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"user-agent":true}},"request":{"method":"GET","header":[{"key":"Authorization","value":"MOBILE-API-140-327-PLAIN appId=\"<Unique app identifier>\", clientId=\"<Unique client ID>\" ","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/v2/version?tenantUrl=<tenantUrl>","description":"<p>This method returns the Bright Pattern Contact Center software version of the server. It may be used for informational purposes (e.g., adding the version number to the bottom of an application window or in an informational dialog window, as well as seeing the server version in the client application logs). Note that this method is not available in the Mobile/Web Messaging API v1.</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>OK: success</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>404</td>\n<td>Not found: For example, if the existing Mobile/Web Messaging API v1 endpoint is called instead of the v2 endpoint</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["clientweb","api","v2","version"],"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":"3b2b191f-59f9-46ac-9697-9c4811374d23","name":"Get Version","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/v2/version?tenantUrl=yourcompany.brightpattern.com","protocol":"https","host":["yourcompany","brightpattern","com"],"path":["clientweb","api","v2","version"],"query":[{"key":"tenantUrl","value":"yourcompany.brightpattern.com"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"server_version\": \"5.5.6.12345 (Stable)\"\n}"}],"_postman_id":"b8b98621-8a04-48c3-a1d4-0cf7a331eab0"}],"id":"b991f520-ed93-4bd1-bf44-2fdca0bcce7b","_postman_id":"b991f520-ed93-4bd1-bf44-2fdca0bcce7b","description":""},{"name":"Events","item":[{"name":"Client Events","item":[],"id":"9b14ea0f-603d-4322-98d4-00e920f0a064","description":"<h1 id=\"chat_session_message\">chat_session_message</h1>\n<p>This event 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_message_delivered\">chat_session_message_delivered</h1>\n<p>The mobile application sends this event when it receives the message from another party.</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>ref_msg_id</td>\n<td>Unique identifier of the message that has been delivered</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-1\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_message_delivered\",\n    \"ref_msg_id\": \"&lt;message id&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_message_read\">chat_session_message_read</h1>\n<p>The mobile application sends this event when the user reads the 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>ref_msg_id</td>\n<td>Unique identifier of the message that has been read</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_message_read\",\n    \"ref_msg_id\": \"&lt;message id&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_typing\">chat_session_typing</h1>\n<p>This event is sent when the user of the client application starts typing.</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_typing\"\n}\n</code></pre>\n<h1 id=\"chat_session_not_typing\">chat_session_not_typing</h1>\n<p>This event is sent when the user of the client application stops typing.</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_not_typing\"\n}\n</code></pre>\n<h1 id=\"chat_session_form_data\">chat_session_form_data</h1>\n<p>This event contains the data requested by the server via the <em>event chat_session_form_show</em>.</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_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>This event contains the data requested by the server via the event <em>chat_session_secure_form_show</em>.</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_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>This event is sent from or to the server to notify that the secure form was canceled.</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_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>This event ends the chat session.</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_end\"\n}\n</code></pre>\n<h1 id=\"chat_session_disconnect\">chat_session_disconnect</h1>\n<p>This event ends the current chat conversation but keeps the session open (i.e., controlled by the scenario). This message can be used instead of <em>chat_session_end</em> when additional information may be expected from the server (e.g., a survey form).</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_disconnect\"\n}\n</code></pre>\n<h1 id=\"chat_session_signaling\">chat_session_signaling</h1>\n<p>This event 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-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>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-10\">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>This event provides notification that the client has uploaded a file to the server.</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>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-11\">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>This event contains a new geographical location message.</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>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-12\">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>This event is sent from the client with its web page location (i.e., the page name or the URL).</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 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-13\">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>This event notifies the server that the user has rejected 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_rejected\"\n}\n</code></pre>\n<h1 id=\"chat_session_cobrowsing_started\">chat_session_cobrowsing_started</h1>\n<p>This event notifies the server that the user has accepted and started a co-browsing session.</p>\n<h2 id=\"format-15\">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>This event notifies the server that the user has ended the co-browsing session.</p>\n<h2 id=\"format-16\">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":"d72c9c06-5477-40dc-99cb-ec0b9b6e444c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"96a44854-e3ec-400c-96bc-5a8a784a4db4","type":"text/javascript","exec":[""]}}],"_postman_id":"9b14ea0f-603d-4322-98d4-00e920f0a064"},{"name":"Server Events","item":[],"id":"2a2450d4-0558-4b2f-a1bc-968ac64a6f6c","description":"<h1 id=\"chat_session_status\">chat_session_status</h1>\n<p>This event updates the current state of the chat session. If the state is failed, the client application will 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>This event indicates a normal termination of the chat session (e.g., when the chat session is closed by the agent). The client application will 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>This event indicates that a new party (i.e., 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>This event indicates that one of the existing parties (e.g., 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 (e.g., an 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>This event 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 (e.g., an 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_message_delivered\">chat_session_message_delivered</h1>\n<p>The mobile application will receive this event when an agent or another party in the chat receives the message sent by the client application.</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>ref_msg_id</td>\n<td>Unique identifier of the message that has been sent</td>\n</tr>\n<tr>\n<td>party_id</td>\n<td>Unique identifier of the party that the message was delivered to</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_message_delivered\",\n    \"party_id\": \"&lt;party id&gt;\",\n    \"ref_msg_id\": \"&lt;message id&gt;\",\n    \"timestamp\": \"&lt;UTC timestamp in seconds&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_message_read\">chat_session_message_read</h1>\n<p>The mobile application will receive this event when an agent or another party in the chat reads the message sent by the client application.</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>ref_msg_id</td>\n<td>Unique identifier of the message that has been read</td>\n</tr>\n<tr>\n<td>party_id</td>\n<td>Unique identifier of the party that read the message</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_message_read\",\n    \"party_id\": \"&lt;party id&gt;\",\n    \"ref_msg_id\": \"&lt;message id&gt;\",\n    \"timestamp\": \"&lt;UTC timestamp in seconds&gt;\"\n}\n</code></pre>\n<h1 id=\"chat_session_typing\">chat_session_typing</h1>\n<p>This event is sent when the agent starts typing.</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 party on the server side. A separate identifier is generated for each party (e.g., an agent) that handles this chat session.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-7\">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>This event is sent when the agent stops typing.</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>party_id</td>\n<td>Unique identifier of the chat party on the server side. A separate identifier is generated for each party (e.g., an agent) that handles this chat session.</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_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>This event 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 the event <em>chat_session_form_data</em>.</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_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>This event 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 the event <em>chat_session_secure_form_data</em>.</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_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>This event 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-11\">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>This event 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 will assume that the chat session no longer exists.</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_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>This event is a container message for WebRTC signaling messages from the server to the client. These messages are not stored in the chat session history.</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_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>This event provides notification that a file is being sent to the client. The client can use the parameter <em>file_id</em> to download the file.</p>\n<h2 id=\"parameters-7\">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-14\">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>This event contains a new location message.</p>\n<h2 id=\"parameters-8\">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-15\">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>This event is sent to the client application to request a co-browsing session.</p>\n<h2 id=\"format-16\">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<h1 id=\"chat_session_case_set\">chat_session_case_set</h1>\n<p>The mobile application will receive this event when the scenario specifies the CRM Case ID for the chat session. Once a case is set, the mobile application may use the <strong>Get Case History</strong> method and the <strong>Close Case</strong> method.</p>\n<h2 id=\"parameters-9\">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>case_id</td>\n<td>ID of the CRM case</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"format-17\">Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": \"chat_session_case_set\",\n    \"case_id\": \"&lt;message id&gt;\",\n    \"timestamp\": \"&lt;UTC timestamp in seconds&gt;\"\n}\n</code></pre>\n","event":[{"listen":"prerequest","script":{"id":"74c849cc-8ae0-4a9b-a06a-13cb0c6808f2","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5fde3b8e-ea0e-4835-b73a-eed8dc565869","type":"text/javascript","exec":[""]}}],"_postman_id":"2a2450d4-0558-4b2f-a1bc-968ac64a6f6c"},{"name":"Signaling Message Types","item":[],"id":"c087f3f0-f189-400a-ac11-420a66306c8a","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":"3c7d9f11-fb79-410e-bf4c-10a40256a510","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"b3ae99e1-3474-415a-b397-907c5d5363af","type":"text/javascript","exec":[""]}}],"_postman_id":"c087f3f0-f189-400a-ac11-420a66306c8a"}],"id":"9e4c42db-300c-464f-880e-cbe55649c2e9","_postman_id":"9e4c42db-300c-464f-880e-cbe55649c2e9","description":""}],"event":[{"listen":"prerequest","script":{"id":"42861ac3-c1e1-4150-99b4-abb75c0edf6c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"c81a7100-fa8d-458b-99e2-edeb82a4f26a","type":"text/javascript","exec":[""]}}]}