{"info":{"_postman_id":"86effd82-e98d-4bb0-917f-7ae225e49faa","name":"SB360-BotsManagement","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"6849619","collectionId":"86effd82-e98d-4bb0-917f-7ae225e49faa","publishedId":"S17m1ri4","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-03-14T22:55:45.000Z"},"item":[{"name":"Scheduling","item":[{"name":"Create Scheduling Pattern","id":"a0a32f58-4d75-4b65-91ac-c5272a6b017d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"securityToken\": \"$TOKEN\",\r\n    \"functionID\": \"CICOA\",\r\n    \"patternLabel\": \"APItest1\",\r\n    \"recurrence\": \"daily\",\r\n    \"recurrentDuration\": \"1 months\",\r\n    \"preferredTime\": \"18:00:23\",\r\n    \"activationDelay\": 0,\r\n    \"mediumID\": 376\r\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/createSchedulingPattern","description":"<p>Create a scheduling pattern. This function returns the patternLabel if the pattern is successfully created.</p>\n<h3 id=\"arguments\">Arguments</h3>\n<p>The request body must be a JSON object with the given fields (also see examples):</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>name</th>\n<th>required</th>\n<th>type</th>\n<th>doc</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>securityToken</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Security token</td>\n</tr>\n<tr>\n<td>patternLabel</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Pattern Label</td>\n</tr>\n<tr>\n<td>functionID</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Bot's function ID</td>\n</tr>\n<tr>\n<td>recurrence</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Recurrence frequency. Can only be one of \"<em>once</em>\", \"<em>daily</em>\", \"<em>weekly</em>\", \"<em>monthly</em>\" or \"<em>yearly</em>\"</td>\n</tr>\n<tr>\n<td>recurrentDuration</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Recurrence duration. In the format of \"<em>2 days</em>\", \"<em>1 months</em>\", can also be empty</td>\n</tr>\n<tr>\n<td>preferredTime</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Can be empty or in the format of \"<em>hh:mm:ss</em>\"</td>\n</tr>\n<tr>\n<td>activationDelay</td>\n<td><em>required</em></td>\n<td>integer</td>\n<td>Activation delay in seconds</td>\n</tr>\n<tr>\n<td>mediumID</td>\n<td><em>required</em></td>\n<td>integer</td>\n<td>Medium ID</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["chatapi","smartdash","public","createSchedulingPattern"],"host":["XXX","smartbot360","com"],"query":[],"variable":[]}},"response":[{"id":"f021d158-064b-4615-aca1-92fc18e1ea43","name":"Create Scheduling Pattern","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"securityToken\": \"$TOKEN\",\n    \"functionID\": \"CICOA\",\n    \"patternLabel\": \"APItest1\",\n    \"recurrence\": \"daily\",\n    \"recurrentDuration\": \"1 months\",\n    \"preferredTime\": \"18:00:23\",\n    \"activationDelay\": 0,\n    \"mediumID\": 376\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/createSchedulingPattern"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"patternLabel\": \"$patternLabel\"\n}"}],"_postman_id":"a0a32f58-4d75-4b65-91ac-c5272a6b017d"},{"name":"Create Single Message Bot","id":"dafe7db6-41a3-4863-a482-fa7aaf82b800","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"message\": \"Bot message\",\r\n    \"securityToken\": \"$TOKEN\"\r\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/createSingleMessageBot","description":"<p>Create a bot with a single message. This function returns the functionID if it successfully created the bot.</p>\n<h3 id=\"arguments\">Arguments</h3>\n<p>The request body must be a JSON object with the given fields (also see examples):</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>name</th>\n<th>required</th>\n<th>type</th>\n<th>doc</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>message</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Single bot message</td>\n</tr>\n<tr>\n<td>securityToken</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Security token</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["chatapi","smartdash","public","createSingleMessageBot"],"host":["XXX","smartbot360","com"],"query":[],"variable":[]}},"response":[{"id":"13dabb44-5e47-4e11-8cff-abbf92bd503c","name":"Create Single Message Bot","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"message\": \"Bot message\",\n    \"securityToken\": \"$TOKEN\"\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/createSingleMessageBot"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"functionID\": \"$functionID\"\n}"}],"_postman_id":"dafe7db6-41a3-4863-a482-fa7aaf82b800"}],"id":"83304f7c-5db0-4a66-a4d6-89c76872fd0e","_postman_id":"83304f7c-5db0-4a66-a4d6-89c76872fd0e","description":""},{"name":"Communication","item":[{"name":"Start Video Chat","id":"b5e33361-0c49-46ef-a217-98769e5c3155","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"securityToken\": \"$TOKEN\",\n\t\"SDFuserid\": 1649,\n\t\"adminid\": 36,\n\t\"priority\": \"interruptIfNoAgentClaim\"\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/startVideoChat","description":"<p>This request will start a video chat from an agent to a user. The agent's video link will be returned to the caller via this api. Note that there can only be one 3rd participant parameter. Phone number will override email. </p>\n<p>priority arguments: interupIfNoRecentMessages (15 min), interruptIfNoAgentClaim, interruptAlways</p>\n<h3 id=\"arguments\">Arguments</h3>\n<p>The request body must be a JSON object with the given fields if the message is text (also see examples):</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>name</th>\n<th>required</th>\n<th>type</th>\n<th>doc</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>securityToken</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Security token</td>\n</tr>\n<tr>\n<td>SDFuserid</td>\n<td><em>Requires this or userPhone</em></td>\n<td>string</td>\n<td>Id of SDF user</td>\n</tr>\n<tr>\n<td>userPhone</td>\n<td><em>Requires this or SDFuserid</em></td>\n<td>string</td>\n<td>Phone number of the SDFuser to recive invite</td>\n</tr>\n<tr>\n<td>adminid</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>id of an agent in the database</td>\n</tr>\n<tr>\n<td>priority</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>values: interruptIfNoBot, interruptIfNoAgentClaim, InterruptAlways</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>optional</td>\n<td>string</td>\n<td>phone number of 3rd participant</td>\n</tr>\n<tr>\n<td>email</td>\n<td>optional</td>\n<td>string</td>\n<td>email of 3rd participant</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["chatapi","smartdash","public","startVideoChat"],"host":["XXX","smartbot360","com"],"query":[],"variable":[]}},"response":[{"id":"9978d023-be12-4ce6-9760-56160684ef07","name":"Start Video Chat","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"securityToken\": \"$TOKEN\",\n\t\"SDFuserid\": 1649,\n\t\"adminid\": 36,\n\t\"priority\": \"interruptIfNoAgentClaim\"\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/startVideoChat"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":""}],"_postman_id":"b5e33361-0c49-46ef-a217-98769e5c3155"},{"name":"Send Single SMS","id":"beded0d8-bf4d-436f-b792-577739c4350e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/sendSMS","description":"<p>Sends an SMS using an sdfuserId or a phone number.</p>\n<h3 id=\"arguments\">Arguments</h3>\n<p>The request body must be a JSON object with the given fields (also see examples):</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>name</th>\n<th>required</th>\n<th>type</th>\n<th>doc</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>securityToken</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Security token</td>\n</tr>\n<tr>\n<td>message</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>The message to be sent to the user</td>\n</tr>\n<tr>\n<td>phonenumber</td>\n<td><em>required if sdfuserid is not provided</em></td>\n<td>string</td>\n<td>User's phone number</td>\n</tr>\n<tr>\n<td>sdfuserid</td>\n<td><em>required if phoneNumber is not provided</em></td>\n<td>integer</td>\n<td>User's sdfuserid</td>\n</tr>\n</tbody>\n</table>\n</div><p>Notes:</p>\n<ol>\n<li><p>If both phoneNumber and sdfuserid are provided, phonenumber will be used.</p>\n</li>\n<li><p>The sender number is taken from \"Default SMS Number\" set in the Dashboard in SETTINGS-&gt;Advanced</p>\n</li>\n<li><p>Phone numbers must be in the format like +12223334444, where +1 is the country code.</p>\n</li>\n</ol>\n","urlObject":{"protocol":"https","path":["chatapi","smartdash","public","sendSMS"],"host":["XXX","smartbot360","com"],"query":[],"variable":[]}},"response":[{"id":"c003f118-5019-4353-bc2c-0a96ea58781a","name":"Send single SMS using phone number","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"securityToken\": \"TOKEN\",\n    \"message\": \"Hello world!\",\n    \"phonenumber\" : \"+12223334444\"\n}","options":{"raw":{"language":"json"}}},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/sendSMS"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"cf141c13-487e-4c35-b187-766a2df83536","name":"Send single SMS using sdfuserid","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"securityToken\": \"TOKEN\",\n    \"message\": \"Hello world!\",\n    \"sdfuserid\" : 12345\n}","options":{"raw":{"language":"json"}}},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/sendSMS"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"beded0d8-bf4d-436f-b792-577739c4350e"}],"id":"be7fcc67-3ea8-439b-9ea8-d59b4293f5f0","_postman_id":"be7fcc67-3ea8-439b-9ea8-d59b4293f5f0","description":""},{"name":"User Management","item":[{"name":"Authenticate User","id":"5de28bf4-3219-4e4a-8099-af918bb59722","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"exampleUser\",\r\n    \"password\":\"examplePassword\",\r\n    \"securityToken\":\"$TOKEN\"\r\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/authenticateUser","description":"<p>This API requests authenticates a user connected with the given username and password. If authenticated, it sends a JSON Web Token which can be used to connect a webbot session to a specific user.</p>\n<h3 id=\"arguments\">Arguments</h3>\n<p>The request body must be a JSON object with the given fields:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>name</th>\n<th>required</th>\n<th>type</th>\n<th>doc</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>username</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>username of SDFuser</td>\n</tr>\n<tr>\n<td>password</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>password of SDFuser</td>\n</tr>\n<tr>\n<td>securityToken</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Security token</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["chatapi","smartdash","public","authenticateUser"],"host":["XXX","smartbot360","com"],"query":[],"variable":[]}},"response":[{"id":"70529898-3a62-4ec7-84c0-a45639edbe36","name":"Authenticate User","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"username\":\"exampleUser\",\n    \"password\":\"examplePassword\",\n    \"securityToken\":\"$TOKEN\"\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/authenticateUser"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"JWT\":\"x.x.x\"\n}"}],"_postman_id":"5de28bf4-3219-4e4a-8099-af918bb59722"},{"name":"Claim User","id":"a82bbe6f-6486-4c0b-b36d-d59d48e42a27","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/claimUser","description":"<p>Assign an agent to a user</p>\n<h3 id=\"arguments\">Arguments</h3>\n<p>The request body must be a JSON object with the given fields (also see examples):</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>name</th>\n<th>required</th>\n<th>type</th>\n<th>doc</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>agentId</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Agent's ID, can be found in dashboard</td>\n</tr>\n<tr>\n<td>SDFuserid</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>User's ID</td>\n</tr>\n<tr>\n<td>securityToken</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Security token</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["chatapi","smartdash","public","claimUser"],"host":["XXX","smartbot360","com"],"query":[],"variable":[]}},"response":[{"id":"e1f2d0b6-2809-4b7f-b068-57414b67db61","name":"Claim User","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"SDFuserid\": \"0000\",\n    \"agentId\": \"$AGENTID\",\n    \"securityToken\": \"$TOKEN\"\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/claimUser"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"Success\": \"User claimed.\"\n}"}],"_postman_id":"a82bbe6f-6486-4c0b-b36d-d59d48e42a27"}],"id":"b201cd62-858a-4909-a375-d8c4fe62c3f9","_postman_id":"b201cd62-858a-4909-a375-d8c4fe62c3f9","description":""},{"name":"Bot Management","item":[{"name":"Kick Off Bot","id":"dc5fd548-e511-4562-bb9c-52746e3b4317","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/kickOffBot","description":"<p>This API allows kicking off a bot on SMS, Facebook, or WhatsApp medium. The bot must be deployed via dashboard first.</p>\n<h3 id=\"arguments\">Arguments</h3>\n<p>The request body must be a JSON object with the given fields (also see examples):</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>name</th>\n<th>required</th>\n<th>type</th>\n<th>doc</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>medium</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Medium of the bot, only takes \"sms\", \"whatsapp\" or \"facebook\"</td>\n</tr>\n<tr>\n<td>userPhone</td>\n<td><em>see doc</em></td>\n<td>string</td>\n<td>User's phone number, required for SMS or WhatsApp</td>\n</tr>\n<tr>\n<td>userFBID</td>\n<td><em>see doc</em></td>\n<td>string</td>\n<td>User's Facebook ID, required for Facebook</td>\n</tr>\n<tr>\n<td>pageID</td>\n<td><em>see doc</em></td>\n<td>string</td>\n<td>Facebook Page ID, required for Facebook</td>\n</tr>\n<tr>\n<td>functionID</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Bot name</td>\n</tr>\n<tr>\n<td>securityToken</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Security token</td>\n</tr>\n<tr>\n<td>variableInputs</td>\n<td><em>optional</em></td>\n<td>JSON object</td>\n<td>Key value pairs of custom variables where the key has to be alpha-numeric. These are initialization parameters for the bot</td>\n</tr>\n</tbody>\n</table>\n</div><p>Notes: Phone numbers must be in the format like +12223334444, where +1 is the country code.</p>\n","urlObject":{"protocol":"https","path":["chatapi","smartdash","public","kickOffBot"],"host":["XXX","smartbot360","com"],"query":[],"variable":[]}},"response":[{"id":"21b88ee9-bb72-438e-89a8-7594b1ddbcb6","name":"Kick off Facebook bot","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"medium\": \"facebook\",\n    \"userFBID\": \"$USERFBID\",\n    \"pageID\": \"$PAGEID\",\n    \"functionID\": \"HealthBot\",\n    \"securityToken\": \"$TOKEN\"\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/kickOffBot"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"Success\": \"Bot kicked off.\"\n}"},{"id":"48d09371-5a50-44eb-bdd0-80606de73e89","name":"Kick off SMS bot with variables","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"medium\": \"sms\",\n    \"userPhone\": \"+12223334444\",\n    \"functionID\": \"HealthBot\",\n    \"securityToken\": \"$TOKEN\",\n    \"variableInputs\": {\n        \"email\": \"test@test.com\",\n        \"city\": \"Riverside\"\n    }\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/kickOffBot"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"Success\": \"Bot kicked off.\"\n}"},{"id":"68053b8c-6d3a-48c2-b64b-63752f84b460","name":"Kick off WhatsApp bot","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"medium\": \"whatsapp\",\n    \"userPhone\": \"123-456-7890\",\n    \"functionID\": \"HealthBot\",\n    \"securityToken\": \"$TOKEN\"\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/kickOffBot"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"Success\": \"Bot kicked off.\"\n}"},{"id":"85c64bf2-7356-402f-b9c0-d91d0e8c533a","name":"Kick off SMS bot","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"medium\": \"sms\",\n    \"userPhone\": \"+12223334444\",\n    \"functionID\": \"HealthBot\",\n    \"securityToken\": \"$TOKEN\"\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/kickOffBot"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"Success\": \"Bot kicked off.\"\n}"}],"_postman_id":"dc5fd548-e511-4562-bb9c-52746e3b4317"},{"name":"Generate Custom Bot Link","id":"14bcd64c-6798-4bb4-b968-7e5c1134dcbe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"functionID\": \"customBotLink\",\r\n    \"apiKey\": \"$WEBAPIKEY\",\r\n    \"url\": \"https://www.smartbot360.com/\",\r\n    \"variableInputs\": {\r\n        \"email\": \"test@test.com\"\r\n    }\r\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/generateBotLink","description":"<p>Generate a custom bot link with given parameters as customVars.</p>\n<h3 id=\"arguments\">Arguments</h3>\n<p>The request body must be a JSON object with the given fields (also see examples):</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>name</th>\n<th>required</th>\n<th>type</th>\n<th>doc</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>functionID</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Bot's ID</td>\n</tr>\n<tr>\n<td>apiKey</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Bot's apiKey</td>\n</tr>\n<tr>\n<td>url</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>URL of webbot</td>\n</tr>\n<tr>\n<td>variableInputs</td>\n<td><em>required</em></td>\n<td>JSON object</td>\n<td>Key value pairs of custom variables</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["chatapi","smartdash","generateBotLink"],"host":["XXX","smartbot360","com"],"query":[],"variable":[]}},"response":[{"id":"d1e364f6-2616-49e8-ade6-cebdf98672ef","name":"Generate Custom BotLink","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"functionID\": \"customBotLink\",\n    \"apiKey\": \"$WEBAPIKEY\",\n    \"url\": \"https://www.smartbot360.com/\",\n    \"variableInputs\": {\n        \"email\": \"test@test.com\"\n    }\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/generateBotLink"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"$url?data=$SID"}],"_postman_id":"14bcd64c-6798-4bb4-b968-7e5c1134dcbe"},{"name":"BackendOnly: Start a Bot","id":"72c9dd83-d9d3-4c15-b1e9-1cf98eb9941b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"securityToken\": \"$TOKEN\",\r\n    \"backendKey\": \"$BACKENDKEY\",\r\n    \"sessionID\": \"$SESSIONID\"\r\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/restart","description":"<p>Given bot's backend key and security token, start the bot for the user. The bot has to be deployed via dashboard first for backendOnly.</p>\n<h3 id=\"arguments\">Arguments</h3>\n<p>The request body must be a JSON object with the given fields if the message is text (also see examples):</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>name</th>\n<th>required</th>\n<th>type</th>\n<th>doc</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>securityToken</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Security token</td>\n</tr>\n<tr>\n<td>backendKey</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Backend key</td>\n</tr>\n<tr>\n<td>sessionID</td>\n<td><em>optional</em></td>\n<td>string</td>\n<td>Session ID</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["chatapi","smartdash","public","restart"],"host":["XXX","smartbot360","com"],"query":[],"variable":[]}},"response":[{"id":"a28b0fdf-b8dd-4923-84f0-3da105f55e6d","name":"Start a bot","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"securityToken\": \"$TOKEN\",\n    \"backendKey\": \"$BACKENDKEY\",\n    \"sessionID\": \"$SESSIONID\"\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/restart"},"code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"sessionid\": \"52d8a584-ecce-4450-bfa9-e3716ffc53bb\",\n    \"bot_response\": [\n        {\n            \"user\": {\n                \"SDFuserid\": 12462,\n                \"user\": {\n                    \"isRead\": false,\n                    \"isSecured\": false,\n                    \"flags\": [],\n                    \"tags\": [],\n                    \"numConnectedAdmins\": 0,\n                    \"lastMediumID\": 0,\n                    \"unreadMessages\": 0,\n                    \"handoffOriginalSDFuserid\": 0,\n                    \"handoffSDFuserid\": 0,\n                    \"defaultColumns\": [\n                        \"functionID\",\n                        \"fname\",\n                        \"lname\",\n                        \"SDFuserid\",\n                        \"phone\",\n                        \"facebookid\",\n                        \"sessionid\",\n                        \"lastMedium\",\n                        \"currentAdminID\",\n                        \"lastAdminID\",\n                        \"lastMessage\",\n                        \"lastAdminTimestamp\",\n                        \"assignedAdminID\",\n                        \"isRead\",\n                        \"assignedTime\",\n                        \"agentNotes\",\n                        \"isSecured\",\n                        \"location\",\n                        \"deviceType\",\n                        \"lastBrowser\",\n                        \"lastMediumID\",\n                        \"handoffOrifionalSDFuserid\"\n                    ],\n                    \"assignedAdminID\": 0\n                }\n            },\n            \"agent\": {\n                \"id\": 0\n            },\n            \"message\": {\n                \"text\": \"Hello! I am Betty, your dental advisor. Do you have any concerns with your teeth?\",\n                \"timestamp\": 1573762456905,\n                \"is_agent\": false,\n                \"is_user\": false,\n                \"is_bot\": true,\n                \"medium\": \"backendonly\",\n                \"quickReplies\": [\n                    \"Yes \",\n                    \"No \"\n                ],\n                \"id\": 241121,\n                \"isDisabledInput\": 0\n            },\n            \"chatbotFunction\": {\n                \"chatbotFunctionID\": \"Dentist\"\n            },\n            \"payload\": {\n                \"database\": \"CHATBOTMASTER\"\n            },\n            \"localMsgId\": 0,\n            \"flag\": {\n                \"SDFuserid\": 0,\n                \"adminid\": 0\n            }\n        }\n    ]\n}"}],"_postman_id":"72c9dd83-d9d3-4c15-b1e9-1cf98eb9941b"},{"name":"BackendOnly: Get Response From the Bot","id":"16be09ff-ef42-4993-8f82-7e4ab87eb572","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/getresponse","description":"<p>The bot will respond to user's message. The message can be text or attachment such as a picture. The user must have obtained sessionID first by \"start bot\" call. If \"isTest\" parameter is present, where the value does not matter, the chat will not show on dashboard.</p>\n<h3 id=\"arguments\">Arguments</h3>\n<p>The request body must be a JSON object with the given fields if the message is text (also see examples):</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>name</th>\n<th>required</th>\n<th>type</th>\n<th>doc</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>securityToken</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Security token</td>\n</tr>\n<tr>\n<td>backendKey</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Backend key</td>\n</tr>\n<tr>\n<td>sessionID</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Session ID, obtained from \"start bot\" call</td>\n</tr>\n<tr>\n<td>userMessage</td>\n<td><em>required</em></td>\n<td>string</td>\n<td>Message</td>\n</tr>\n<tr>\n<td>isTest</td>\n<td><em>optional</em></td>\n<td><em>see doc</em></td>\n<td>The value does not matter here</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["chatapi","smartdash","public","getresponse"],"host":["XXX","smartbot360","com"],"query":[],"variable":[]}},"response":[{"id":"2d82f2d8-5414-4849-ac05-bc55a09d6a82","name":"Get response from the bot","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"securityToken\": \"$TOKEN\",\n    \"backendKey\": \"$BACKENDKEY\",\n    \"sessionID\": \"$SESSIONID\",\n    \"userMessage\": \"$USERMESSAGE\"\n}"},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/getresponse"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"sessionid\": \"52d8a584-ecce-4450-bfa9-e3716ffc53bb\",\n    \"bot_response\": [\n        {\n            \"user\": {\n                \"SDFuserid\": 12462,\n                \"user\": {\n                    \"isRead\": false,\n                    \"isSecured\": false,\n                    \"flags\": [],\n                    \"tags\": [],\n                    \"numConnectedAdmins\": 0,\n                    \"lastMediumID\": 0,\n                    \"unreadMessages\": 0,\n                    \"handoffOriginalSDFuserid\": 0,\n                    \"handoffSDFuserid\": 0,\n                    \"defaultColumns\": [\n                        \"functionID\",\n                        \"fname\",\n                        \"lname\",\n                        \"SDFuserid\",\n                        \"phone\",\n                        \"facebookid\",\n                        \"sessionid\",\n                        \"lastMedium\",\n                        \"currentAdminID\",\n                        \"lastAdminID\",\n                        \"lastMessage\",\n                        \"lastAdminTimestamp\",\n                        \"assignedAdminID\",\n                        \"isRead\",\n                        \"assignedTime\",\n                        \"agentNotes\",\n                        \"isSecured\",\n                        \"location\",\n                        \"deviceType\",\n                        \"lastBrowser\",\n                        \"lastMediumID\",\n                        \"handoffOrifionalSDFuserid\"\n                    ],\n                    \"assignedAdminID\": 0\n                }\n            },\n            \"agent\": {\n                \"id\": 0\n            },\n            \"message\": {\n                \"text\": \"Hello! I am Betty, your dental advisor. Do you have any concerns with your teeth?\",\n                \"timestamp\": 1573762456905,\n                \"is_agent\": false,\n                \"is_user\": false,\n                \"is_bot\": true,\n                \"medium\": \"backendonly\",\n                \"quickReplies\": [\n                    \"Yes \",\n                    \"No \"\n                ],\n                \"id\": 241121,\n                \"isDisabledInput\": 0\n            },\n            \"chatbotFunction\": {\n                \"chatbotFunctionID\": \"Dentist\"\n            },\n            \"payload\": {\n                \"database\": \"CHATBOTMASTER\"\n            },\n            \"localMsgId\": 0,\n            \"flag\": {\n                \"SDFuserid\": 0,\n                \"adminid\": 0\n            }\n        }\n    ]\n}"},{"id":"b6539574-dda8-4558-83c3-a51bf0625290","name":"Get response from the bot by attachment","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"description":"Optional. Use it to upload files/images to S3.","key":"attachment","type":"file","value":null}]},"url":"https://XXX.smartbot360.com/chatapi/smartdash/public/getresponse"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"16be09ff-ef42-4993-8f82-7e4ab87eb572"}],"id":"60aeae24-01c4-48d8-8425-0dc94c609b05","_postman_id":"60aeae24-01c4-48d8-8425-0dc94c609b05","description":""}],"event":[{"listen":"prerequest","script":{"id":"e53dcd27-f278-40e9-9b84-1be3398ccc73","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"f40c13a8-1ed9-4b0f-b66c-36ebe3540d62","type":"text/javascript","exec":[""]}}]}