To start the communication with Userbot, an apiLogin [apikey] command is necessary, using the apikey received from Userbot. Then, a sitekey undefined [bot_argument] command, in order to use the other APIs for the specific bot. The who command is important to get information about the logged user, especially the id of the user, that is used in the robin commands, for chat information
Once the socket is open and you are autenthicated you can subscribe to a public channel by sending a subscribe request message.
Get Bot variables' list
Accepts the following message:
Accepts the following message:
{
"command": "string",
"status": 200,
"variables": [
{
"id": 0,
"name": "string",
"type": "text",
"bot_id": 0,
"uuid": "string"
}
]
}
Send messages to the API
Accepts the following message:
Ask a list of chat users
Client can ask to the server the list of users that interacted with a given bot, based on offset and limit parameters. This is because there is infinite scrolling on the dash USERS and the data needs to be limited
{
"offset": 0,
"limit": 25,
"orderBy": [
{
"mode": "ASC",
"field": "string"
}
],
"search": "",
"anonymous": false,
"filters": [
{
"entity": "string",
"operator": "is",
"type": "variable",
"value": "string"
}
],
"tags": false
}
Messages that you receive from the API
Accepts the following message:
List the chat users of a single bot
{
"users": [
{
"id": 0,
"name": "string",
"surname": "string",
"email": "string",
"phone": "string",
"firstChat": "2019-08-24T14:15:22Z",
"lastChat": "2019-08-24T14:15:22Z",
"language": "string",
"browser": "string",
"source": "string",
"tags": [
"string"
]
}
],
"total": 0,
"anonymous": 0,
"namedUsers": 0,
"filteredCounter": 0
}
Save an array of new ChatUsers
Accepts the following message:
[
{
"firstname": "string",
"lastname": "string",
"email": "string",
"phone": "string",
"consentConfirmation": true,
"userid": 0
}
]
The array of ChatUsers saved
Accepts the following message:
{
"command": "string",
"status": 200
}
Send list of chat users id to delete
Accepts the following message:
{
"all": true,
"usersId": [
0
],
"exceptUsersId": []
}
Messages that you receive from the API when you delete one or more chat users
Accepts the following message:
{
"command": "string",
"status": 200,
"usersId": [
0
]
}
Ask for some analytics of ChatUsers
Accepts the following message:
{
"startFrom": 0,
"endTo": 0,
"all": true,
"newChatUsers": true,
"averageMessagesPerSession": true,
"averageDurationSession": true
}
Return some analytics of ChatUsers
Accepts the following message:
{
"command": "string",
"status": 200,
"all": 0,
"newChatUsers": 0,
"averageMessagesPerSession": 0,
"averageDurationSession": 0
}
Send a CSV file to create new ChatUsers, already existing ChatUsers are gonna be updated.
Accepts the following message:
{
"file": "string"
}
Get operation status
Accepts the following message:
{
"command": "string",
"status": 200,
"notInsertedUsers": [
[]
]
}
Get list of feedback leaved by ChatUsers during conversation
Accepts the following message:
{
"offset": 0,
"limit": 25,
"startFrom": "string",
"endTo": "string"
}
Accepts the following message:
{
"command": "string",
"status": 200,
"feedbacks": [
{
"vote": 0,
"text": "string",
"sessionId": "string",
"userId": 0,
"name": "string",
"surname": "string",
"email": "string",
"createdAt": "string",
"updatedAt": "string"
}
]
}
Send a CSV file to create new ChatUsers, already existing ChatUsers are gonna be updated.
Accepts the following message:
{
"name": "string",
"filters": [
{
"value": "string",
"entity": "string",
"type": "variable",
"operator": "is"
}
]
}
Get operation status
Accepts the following message:
{
"command": "string",
"status": 200
}
Remove segment related to ChatUsers
Accepts the following message:
[
"string"
]
Accepts the following message:
[]
Edit segment related to ChatUsers
Accepts the following message:
{
"id": "string",
"name": "string"
}
Accepts the following message:
{
"command": "string",
"status": 200
}
Get Bot Segments' list related to ChatUsers
Accepts the following message:
Accepts the following message:
{
"command": "string",
"status": 200,
"segments": [
{
"id": 0,
"name": "string",
"filters": [
{
"value": "string",
"entity": "string",
"type": "variable",
"operator": "is"
}
]
}
]
}
Get Bot Tags' list related to ChatUsers
Accepts the following message:
Accepts the following message:
{
"command": "string",
"status": 200,
"tags": [
{
"id": 0,
"name": "string"
}
]
}
Add a Tag to a ChatUser
Accepts the following message:
{
"name": "string",
"usersId": [
0
]
}
addTag response method
Accepts the following message:
{
"command": "string",
"status": 200
}
Remove a Tag from a list of ChatUsers
Accepts the following message:
{
"name": "string",
"usersId": [
0
],
"deleteAll": true
}
removeTag response method
Accepts the following message:
{
"command": "string",
"status": 200
}
Send messages to the API
Accepts the following message:
Ask variables assigned to a Chat User
Client can ask to the server the list of pair name-value variables assigned to a Chat User
{
"userId": 0
}
Messages that you receive from the API
Accepts the following message:
Return variables assigned to a Chat User
{
"variables": [
{
"value": "string",
"name": "string",
"type": "string"
}
]
}
Add a Variable to a ChatUser
Accepts the following message:
When is passed a variable_id an update will occur. If the variable object is passed a new variable will be created.
{
"variable": {
"name": "string",
"value": "string",
"type": "text"
},
"usersId": [
0
]
}
Accepts the following message:
{
"command": "string",
"status": 200
}
Remove a Variable from a ChatUsers
Accepts the following message:
{
"name": "string",
"usersId": 0
}
removeVariable response method
Accepts the following message:
{
"command": "string",
"status": 200
}
Send messages to the API
Accepts the following message:
Start the communication with Userbot
This command is used to start the communication with Userbot. Example is "sitekey undefined bbfad81389103ba06485d07bfedb4036"
no payload is sent with this command at all
{}
Messages that you receive from the API
Accepts the following message:
Validates sitekey
{
"command": "sitekey",
"text": "string",
"status": 200,
"chatLimitReport": {
"alerts": {
"alert50": true,
"alert80": true,
"limitReached": true,
"type": "fair-use"
}
},
"sessions": {
"unique": 0,
"limit": 0
},
"customer": {
"nome": "string",
"base_mail": "string",
"chats_start_interval": 0,
"chats_end_interval": 0,
"chat_limits": 0,
"ownerUserId": 0,
"agentsLimit": 0,
"activeAgents": 0
},
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": "string"
}
A special login to Userbot that allows to use APIs
Accepts the following message:
Send the login request to Userbot
This command is used to authenticate the user with Userbot. Example is "apiLogin 123456789wasd"
No payload is sent with this command
{}
Messages that you receive from the API
Accepts the following message:
Authenticate
{
"text": "apiKey setted",
"structure": {
"command": "apiLogin",
"text": "apiKey setted",
"status": 200
}
}
Get Bot stats
Accepts the following message:
Get bot stats
This command is used to get bot stats
{
"type": "all"
}
Accepts the following message:
Sends all the stats for the bots of the user
{
"command": "string",
"subcommand": "string",
"text": "string",
"status": 200,
"data": {
"stats": [
null
]
}
}
Send messages to the API
Accepts the following message:
Ask data about the logged user
This command is used to get information about the logged user, in particular the user.id is needed to use chat commands (robin)
who
Messages that you receive from the API
Accepts the following message:
Returns information about the logged user
{
"command": "who",
"text": "You are:user.username(display_username)",
"user": {
"username": "string",
"customer_id": 0,
"userLevel": 0,
"userData": {
"id": 0,
"nickname": "string",
"email": "string",
"md5_email": "string",
"phone": "string",
"password": "string",
"nome": "string",
"cognome": "string",
"birth": "string",
"pic": "string",
"points": 0,
"user_level": 0,
"customer_id": 0,
"newsletter": 0,
"hash": 0,
"last_session": 0,
"json_stats": "string",
"notes": "string",
"confirm": 0,
"created_user": "2021-01-12T17:03:08.000Z",
"owner_name": "string",
"autocreate": 0,
"group_id": 0,
"chat_user": true
},
"display_username": "Mario_Rossi",
"key": "string"
},
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": "string"
}
Send messages to the API
Accepts the following message:
Ask data about chats
This command returns the information about the chats on a bot
The [user.id] is the value that can be get by the command who. Limit and offset (integers) are used to limit the amount of chat sessions to be returned.
robin sv [user.id] get sessions [limit] [offset]
Messages that you receive from the API
Accepts the following message:
Returns information about chats
{
"command": "robin",
"subcommand": "get",
"region": "sessions",
"subject": "op",
"status": "200",
"sessions": [
{
"robin_email": "string",
"counter": 0,
"id": 0,
"quando": "string",
"test_chat": true,
"bot_id": 0,
"user": "string",
"userid": 0,
"chat": 0,
"muted": true,
"vision": 0,
"wspath": "string",
"client_number": 0,
"last_status": 0,
"breaked": "string",
"ticket_status": "string",
"ticket_assigned": "string",
"robin_op": 0,
"json_trace": "string",
"last_message": "string",
"source": "string",
"last_payload": "string",
"vars": "string",
"last_chat_text": "string",
"last_chat_username": "string",
"user_id": 0,
"nickname": "string",
"email": "string",
"phone": "string",
"nome": "string",
"cognome": "string",
"birth": "string",
"pic": "string",
"customer_id": 0,
"last_session": "string",
"json_stats": "string",
"notes": "string"
}
],
"robinStats": {
"online": 0,
"away": 0,
"deposit": 0,
"total": 0,
"notifications": 0,
"onlineOps": [],
"awayOps": [],
"deposit_sessions": []
},
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": "string"
}
Send messages to the API
Accepts the following message:
Ask data about a single chat by session id
This command returns the information about the single chat identified by session.id
The [user.id] is the value that can be get by the command who. The [session.id] is obtained by robin.sv.[user.id].get.sessions.[limit].[offset] command
robin sv [user.id] get [session.id]
Messages that you receive from the API
Accepts the following message:
Returns information about a single chat, identified by session.id
{
"command": "robin",
"subcommand": "get",
"region": "session.id",
"subject": "op",
"status": "200",
"sessions": [
{
"id": 0,
"bot_id": 0,
"session": 0,
"message_uuid": "string",
"userid": 0,
"username": "string",
"chat": "string",
"qea_id": 0,
"status": 0,
"quando_chat": "2022-05-19T09:24:25.000Z",
"sentiment": "string",
"hbo": "h",
"kpi_processed": true,
"like_dislike": 0,
"thumbs": 0,
"ai_score": 0,
"robin_op": 0,
"ticket_assigned": "string",
"robin_email": "string",
"canBeTrained": true
}
],
"robinStats": {
"online": 0,
"away": 0,
"deposit": 0,
"total": 0,
"notifications": 0,
"onlineOps": [],
"awayOps": [],
"deposit_sessions": []
},
"source": "webchat",
"source_urlweb": "http://127.0.0.1:5500/index-1634.html",
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": "string"
}
Send messages to the API
Accepts the following message:
Ask to assign a chat to an agent
This command returns the information about the single chat identified by session.id
Used to ask to assign a chat to an agent
{
"session": 0,
"agent": "agent-email@userbot.ai"
}
Messages that you receive from the API
Accepts the following message:
Assigns the chat to an agent
{
"command": "chat-assign-to-agent",
"subcommand": "{\"session\":123456,\"agent\":\"agent-email@userbot.ai\"}",
"text": "Assigned to \"agent-email@userbot.ai\"",
"status": "200",
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": "string"
}
Send messages to the API
Accepts the following message:
Ask to assign a chat to the Bot
This command returns the information about the single chat identified by session.id
Used to ask to assign a chat to the Bot
{
"session": 0
}
Messages that you receive from the API
Accepts the following message:
Assigns the chat to the Bot
{
"command": "chat-assign-to-bot",
"subcommand": "{\"session\":123456}",
"text": "Reassigned to bot",
"status": "200",
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": "string"
}
Send messages to the API
Accepts the following message:
Send a chat message by agent in the chat session with id [session.id]
The wspath is in the payload of robin.sv.[user.id].get.sessions
wspath can be get by robin.sv.[user.id].get.sessions. chat_message is the actual message that is sent in the chat
say.[wspath].[-100].[session.id].[chat_message]
Messages that you receive from the API
Accepts the following message:
Response is information about the current chat message
{
"command": "chat-notification",
"robin_stats": {
"online": 0,
"away": 0,
"deposit": 0,
"total": 0,
"notifications": 0,
"onlineOps": [],
"awayOps": [],
"deposit_sessions": []
},
"notificationId": 0,
"session": {
"id": 0,
"quando": "string",
"test_chat": true,
"bot_id": 0,
"user": "string",
"userid": 0,
"chat": 0,
"muted": true,
"vision": 0,
"wspath": "string",
"client_number": 0,
"last_status": "string",
"breaked": "string",
"ticket_status": 0,
"ticket_assigned": "string",
"robin_op": "string",
"json_trace": "string",
"last_message": "string",
"source": "string",
"last_payload": "string",
"vars": "string",
"isHumanMessage": true,
"humanMessage": "string",
"counter": 0
},
"data": {
"nfrom": 0,
"nto": 0,
"session_id": 0,
"bot_argument": "string",
"customer_id": 0,
"user_id": 0,
"message": {
"id": 0,
"bot_id": 0,
"session": 0,
"message_uuid": "string",
"userid": 0,
"username": "string",
"chat": "string",
"qea_id": 0,
"status": 0,
"quando_chat": "string",
"sentiment": "string",
"hbo": "string",
"kpi_processed": true,
"like_dislike": true,
"thumbs": true,
"ai_score": 0
}
}
}
Get list of interactions for the bot
Accepts the following message:
Get interactions
This command is used to get the list of interactions. qeafilter search {[payload]}
{
"created_from_date": "string",
"created_to_date": "string",
"text": "string",
"ai": [
1
],
"groups": [
{
"name": "string",
"counter": 0,
"selected": true,
"id": 0
}
],
"limit_from": 0,
"limit_to": 0
}
Accepts the following message:
Returns the information about the interactions
{
"command": "qeafilter",
"subcommand": "search",
"token": "page-db-ai",
"result": [
{
"ai": 0,
"label": "string",
"quando": 0,
"fallback": 0,
"flows_startingPoint": 0,
"groups": [
{
"name": "string",
"counter": 0,
"selected": true,
"id": 0
}
],
"flows_id": 0,
"flows_step": true,
"flows_block_order": 0,
"flows_name": "string",
"answer_nl": [
"bot answer {\\\"buttons\\\":[{\\\"key\\\":\\\"button-id-80\\\",\\\"title\\\":\\\"Click\\\",\\\"action\\\":\\\"text\\\",\\\"content\\\":\\\"Clicked\\\",\\\"dirty\\\":true}]}"
],
"topics_text": "string",
"topics_log": true,
"intent": "string"
}
],
"ai_1_pending": 0,
"ai_1_trained": 0,
"count": 0,
"countFiltered": 0,
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
}
}
Save an interaction with a chosen label (name)
Accepts the following message:
Save an interaction
This command is used to save an interaction
{
"label": "string",
"name": "string",
"groups": [
{
"name": "string",
"counter": 0,
"selected": true,
"id": 0
}
],
"questions": [
{
"name": "string",
"id": 0,
"deep_learning": true
}
],
"answers": [
{
"name": "string"
}
],
"flows_id": 0,
"fallback-team": "string",
"buttons": [
{
"key": "string",
"title": "string",
"action": " \"buttons\": [ { \"key\": \"button-id-41\", \"title\": \"link\", \"action\": \"url\", \"content\": \"https://userbot.ai\", \"dirty\": true }], \"buttons\": [ { \"action\": \"goto\", \"title\": \"Click\", \"key\": \"button-id-34\", \"content\": \"Ciao\", \"dirty\": false, \"label\": \"Greeting\" }], \"buttons\": [ { \"action\": \"goto\", \"title\": \"Click\", \"flows_id\": 2409, \"key\": \"button-id-34\", \"content\": \"Flusso di benvenuto\", \"dirty\": false, \"flows_startMessageLabel\": \"2409-operator1-0-0\" }], \"buttons\": [ { \"key\": \"button-id-41\", \"title\": \"click\", \"action\": \"text\", \"content\": \"ciaoo\", \"dirty\": true }]",
"content": "string",
"dirty": true,
"label": "string",
"flows_startMessageLabel": "string"
}
]
}
Accepts the following message:
Returns the information about the interaction saved
{
"command": "qeafilter",
"subcommand": "save",
"token": "",
"text": "qeafilter command",
"result": "OK",
"insertedCount": 0,
"insertedRecord": {
"ai": 2,
"label": "string",
"quando": 0,
"fallback": 0,
"flows_startingPoint": "string",
"groups": {
"name": "string",
"counter": 0,
"selected": true,
"id": 0
},
"flows_id": 0,
"flows_step": 0,
"flows_block_order": 0,
"flows_name": "string",
"answer_nl": [
"bot answer {\\\"buttons\\\":[{\\\"key\\\":\\\"button-id-80\\\",\\\"title\\\":\\\"Click\\\",\\\"action\\\":\\\"text\\\",\\\"content\\\":\\\"Clicked\\\",\\\"dirty\\\":true}]}"
],
"records": [
{
"id": 0,
"question_nl": "string",
"deep_learning": true
}
],
"topics_text": "string",
"topics_log": true
},
"engine-notify": [
0
],
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": "string"
}
Update an interaction
Accepts the following message:
Update an interaction
This command is used to save an interaction. The token is the interaction label, it is sent between "<" and ">"
{
"label": "string",
"name": "string",
"groups": [
{
"name": "string",
"counter": 0,
"selected": true,
"id": 0
}
],
"questions": [
{
"name": "string",
"id": 0,
"deep_learning": true
}
],
"answers": [
{
"name": "string"
}
],
"flows_id": 0,
"flows_startMessageLabel": "string",
"fallback-team": "string",
"buttons": [
{
"key": "string",
"title": "string",
"action": " \"buttons\": [ { \"key\": \"button-id-41\", \"title\": \"link\", \"action\": \"url\", \"content\": \"https://userbot.ai\", \"dirty\": true }], \"buttons\": [ { \"action\": \"goto\", \"title\": \"Click\", \"key\": \"button-id-34\", \"content\": \"Ciao\", \"dirty\": false, \"label\": \"Greeting\" }], \"buttons\": [ { \"action\": \"goto\", \"title\": \"Click\", \"flows_id\": 2409, \"key\": \"button-id-34\", \"content\": \"Flusso di benvenuto\", \"dirty\": false, \"flows_startMessageLabel\": \"2409-operator1-0-0\" }], \"buttons\": [ { \"key\": \"button-id-41\", \"title\": \"click\", \"action\": \"text\", \"content\": \"ciaoo\", \"dirty\": true }]",
"content": "string",
"dirty": true,
"label": "string",
"flows_startMessageLabel": "string"
}
]
}
Accepts the following message:
Returns the information about the interaction updated
{
"command": "qeafilter",
"subcommand": "save",
"token": "interactionName",
"text": "qeafilter command",
"result": "OK",
"insertedCount": 0,
"insertedRecord": {
"ai": 2,
"label": "string",
"quando": 0,
"fallback": 0,
"flows_startingPoint": "string",
"groups": {
"name": "string",
"counter": 0,
"selected": true,
"id": 0
},
"flows_id": 0,
"flows_step": 0,
"flows_block_order": 0,
"flows_name": "string",
"answer_nl": [
"bot answer {\\\"buttons\\\":[{\\\"key\\\":\\\"button-id-80\\\",\\\"title\\\":\\\"Click\\\",\\\"action\\\":\\\"text\\\",\\\"content\\\":\\\"Clicked\\\",\\\"dirty\\\":true}]}"
],
"records": [
{
"id": 0,
"question_nl": "string",
"deep_learning": true
}
],
"topics_text": "string",
"topics_log": true
},
"engine-notify": [
0
],
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": "string"
}
Delete an interaction
Accepts the following message:
Delete an interaction
This command is used to delete an existing interaction
{
"data": [
"interactionLabel"
]
}
Accepts the following message:
Returns the information about the interaction deleted and the status of the operation
{
"command": "qeafilter",
"subcommand": "delete",
"token": null,
"text": "qeafilter command",
"result": "success",
"data": [
"string"
],
"bulk": true,
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": null
}
Ask list of automated messages created on the Bot
Accepts the following message:
Ask a list of automated messages on a Bot
Retrieve list of automated messages from Bot
Accepts the following message:
List of automated messages on a Bot
{
"messages": [
{
"id": 0,
"name": "string",
"order": 0,
"answer": {
"text": "string",
"flows_id": 0,
"flows_step": "string",
"created_at": 0,
"updated_at": 0
},
"conditions": [
{
"id": 0,
"entity": "page_url",
"operator": "is",
"value": "string",
"created_at": 0,
"updated_at": 0
}
],
"created_at": 0,
"updated_at": 0
}
]
}
Request deletion of an Automated Message
Accepts the following message:
{
"messagesId": [
0
]
}
Messages that you receive from the API when you delete one or more automated messages
Accepts the following message:
{
"command": "string",
"status": 200,
"messagesId": [
0
]
}
Save or update an Automated Message
Accepts the following message:
{
"messages": [
{
"name": "string",
"order": 0,
"answer": {
"text": "string",
"flows_id": 0,
"flows_step": "string"
},
"conditions": [
{
"entity": "string",
"operator": "string",
"value": "string"
}
]
}
]
}
Automated Message created or updated
Accepts the following message:
{
"command": "string",
"status": 200,
"messages": [
{
"id": 0,
"name": "string",
"order": 0,
"answer": {
"text": "string",
"flows_id": 0,
"flows_step": "string",
"created_at": 0,
"updated_at": 0
},
"conditions": [
{
"id": 0,
"entity": "page_url",
"operator": "is",
"value": "string",
"created_at": 0,
"updated_at": 0
}
],
"created_at": 0,
"updated_at": 0
}
]
}
Request for all the stored leads
Accepts the following message:
Obtain the list of all the leads that visited the site
Accepts the following message:
The List of leads
Carries an array of objects describing the lead companies that have visited the Userbot's customer site
[
{
"id": 0,
"name": "string",
"logo": "string",
"city": "string",
"industry": "string",
"description": "string",
"size": 0,
"legalAddress": "string",
"url": "string",
"temperature": 0,
"visits": 0,
"timeOnPages": 0,
"lastVisit": "string"
}
]
Request the list of pages visited by the lead
Accepts the following message:
Request the list of visited pages and times
Query for all the user navigation record stored
{
"id": 0
}
Obtain the list of pages visited by the lead
Accepts the following message:
Receive of visited pages and times
Carries an array of objects consisting in the page url, the ISO UTC date in which the user landed and the one in which he left the Userbot's customer site
[
{
"url": "string",
"enter": "string",
"leave": "string",
"session": 0
}
]
Request the list of the lead's key people
Accepts the following message:
The List of key people
Query for an array of key people's contacts in a company
{
"id": 0
}
Obtain a list of contacts of the company's key people
Accepts the following message:
The List of key people
Carries the array of objects consisting in the name, surname and contacts of the key people in a company
[
{
"fullname": "string",
"photo": "string",
"Linkedin": "string",
"role": "string"
}
]
Adds a tag
Accepts the following message:
Adds a tag for a company
Carries the array of objects consisting in the name, surname and contacts of the key people in a company
{
"company": 0,
"customer": 0,
"tagname": "string"
}
Read status code in order to know if a tag was added
Accepts the following message:
Removes a tag
Accepts the following message:
Adds a tag for a company
Carries the array of objects consisting in the name, surname and contacts of the key people in a company
{
"company": 0,
"customer": 0,
"tagname": "string"
}
Read status code in order to know if a tag was removed
Accepts the following message:
Get NPS values
Accepts the following message:
Ask NPS in a period
This command is used to get NPS stats in a period [from]-[to]
{
"from": "2022-05-23T22:00:00.000Z",
"to": "2022-05-25T21:59:59.999Z"
}
Messages that you receive from the API
Accepts the following message:
Ask NPS values between dates
Client can ask for NPS values get from Webchat during conversation. Values are divided in negative, positive, neutral
{
"command": "rawstats",
"subcommand": "count-nps",
"response": "OK",
"data": {
"positive": 0,
"neutral": 0,
"negative": 0
},
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": null
}
Rawstats all returns the insights for the bot divided per day, in the range from-to
Accepts the following message:
Ask insights for the bot
This command is used to get insights
{
"from": "2022-05-23T22:00:00.000Z",
"to": "2022-05-25T21:59:59.999Z"
}
Accepts the following message:
Returns the insights for the bot in the range from-to, divided per day
{
"command": "rawstats",
"subcommand": "all",
"response": "OK",
"statuscode": "200",
"data": {
"dates": [
{
"messages": 0,
"resolved": 0,
"resolvedByHuman": 0,
"resolvedByBot": 0,
"resolvedByBotWithHints": 0,
"notManagedByBot": 0,
"avgResponseHuman": 0,
"avgResponseBot": 0,
"messages_human": 0,
"messages_user": 0,
"conversations_bot": 0,
"conversations_human": 0,
"sessions": 0,
"day": "2022-05-24"
}
],
"totals": {
"messages": {
"resolvedByHumans": 0,
"upscaledToHumans": 0,
"resolvedByBot": 0,
"resolvedByBotWithHints": 0,
"count": 0,
"notManagedByBot": 0
},
"sessions": {
"upscaled": 0,
"resolvedByBot": 0,
"count": 0
},
"avgResponseHuman": 0
}
},
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": null
}
Total amount of messages in a period
Accepts the following message:
Ask total messages in a period
This command is used to get the total amount of messages in a period
{
"from": "2022-05-23T22:00:00.000Z",
"to": "2022-05-25T21:59:59.999Z"
}
Accepts the following message:
Return total messages in a period
{
"command": "rawstats",
"subcommand": "count-messages",
"response": "OK",
"statuscode": "200",
"data": {
"count": 0
},
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": null
}
Total amount of sessions in a period
Accepts the following message:
Ask total sessions in a period
This command is used to get the total amount of sessions in a period
{
"from": "2022-05-23T22:00:00.000Z",
"to": "2022-05-25T21:59:59.999Z"
}
Accepts the following message:
Return total sessions in a period
{
"command": "rawstats",
"subcommand": "count-sessions",
"response": "OK",
"statuscode": "200",
"data": {
"count": 0
},
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": null
}
Sales Stats
Accepts the following message:
Ask sales stats in a period
This command is used to get the sales stats in a period
{
"startFrom": "2022-05-23T22:00:00.000Z",
"endTo": "2022-05-25T21:59:59.999Z"
}
Accepts the following message:
Return sales stats in a period
{
"command": "rawstats",
"subcommand": "get",
"response": "OK",
"statuscode": "200",
"data": {
"companies": {
"totalCompanies": 0,
"newCompanies": 0,
"size": []
},
"conversations": {
"totalConversations": 0
},
"industries": {
"industryPercentage": []
},
"email": {
"totalEmailsCaptured": 0
},
"meetings": {
"totalMeetingsScheduled": 0
}
},
"plugins": {
"botID": [
{
"id": 0,
"name": "obfuscate",
"bot_id": 0,
"backend": true,
"dashboard": true,
"widgetchat": true,
"parameters": {
"key": "string",
"projectId": "string"
}
}
]
},
"dashboard_token": null
}
Save a new meetings scheduled using Calendly
Accepts the following message:
{
"eventUrl": "https://api.calendly.com/scheduled_events/c1deba23-dbcb-4b34-890e-f5d8d908091c",
"inviteeUrl": "https://api.calendly.com/scheduled_events/c1deba23-dbcb-4b34-890e-f5d8d908091c/invitees/f2bcd809-d909-4082-9876-a20e93d03b1f"
}
Submit a not scheduled meeting using Calendly
Accepts the following message:
Ask data about the logged user
This command is used to get information about the logged user, in particular the user.id is needed to use chat commands (robin)
Returns information about the logged user
Ask data about chats
This command returns the information about the chats on a bot
The [user.id] is the value that can be get by the command who. Limit and offset (integers) are used to limit the amount of chat sessions to be returned.
Returns information about chats
Ask data about a single chat by session id
This command returns the information about the single chat identified by session.id
The [user.id] is the value that can be get by the command who. The [session.id] is obtained by robin.sv.[user.id].get.sessions.[limit].[offset] command
Returns information about a single chat, identified by session.id
Ask to assign a chat to an agent
This command returns the information about the single chat identified by session.id
Used to ask to assign a chat to an agent
Assigns the chat to an agent
Ask to assign a chat to the Bot
This command returns the information about the single chat identified by session.id
Used to ask to assign a chat to the Bot
Assigns the chat to the Bot
Send a chat message by agent in the chat session with id [session.id]
The wspath is in the payload of robin.sv.[user.id].get.sessions
wspath can be get by robin.sv.[user.id].get.sessions. chat_message is the actual message that is sent in the chat
Response is information about the current chat message
Ask a list of chat users
Client can ask to the server the list of users that interacted with a given bot, based on offset and limit parameters. This is because there is infinite scrolling on the dash USERS and the data needs to be limited
List the chat users of a single bot
Ask variables assigned to a Chat User
Client can ask to the server the list of pair name-value variables assigned to a Chat User
Return variables assigned to a Chat User
When is passed a variable_id an update will occur. If the variable object is passed a new variable will be created.
Start the communication with Userbot
This command is used to start the communication with Userbot. Example is "sitekey undefined bbfad81389103ba06485d07bfedb4036"
no payload is sent with this command at all
Validates sitekey
Send the login request to Userbot
This command is used to authenticate the user with Userbot. Example is "apiLogin 123456789wasd"
No payload is sent with this command
Authenticate
Get bot stats
This command is used to get bot stats
Sends all the stats for the bots of the user
Get interactions
This command is used to get the list of interactions. qeafilter search {[payload]}
Returns the information about the interactions
Save an interaction
This command is used to save an interaction
Returns the information about the interaction saved
Update an interaction
This command is used to save an interaction. The token is the interaction label, it is sent between "<" and ">"
Returns the information about the interaction updated
Delete an interaction
This command is used to delete an existing interaction
Returns the information about the interaction deleted and the status of the operation
Ask a list of automated messages on a Bot
List of automated messages on a Bot
Ask NPS in a period
This command is used to get NPS stats in a period [from]-[to]
Ask NPS values between dates
Client can ask for NPS values get from Webchat during conversation. Values are divided in negative, positive, neutral
Ask insights for the bot
This command is used to get insights
Returns the insights for the bot in the range from-to, divided per day
Ask total messages in a period
This command is used to get the total amount of messages in a period
Return total messages in a period
Ask total sessions in a period
This command is used to get the total amount of sessions in a period
Return total sessions in a period
Ask sales stats in a period
This command is used to get the sales stats in a period
Return sales stats in a period
The List of leads
Carries an array of objects describing the lead companies that have visited the Userbot's customer site
Request the list of visited pages and times
Query for all the user navigation record stored
Receive of visited pages and times
Carries an array of objects consisting in the page url, the ISO UTC date in which the user landed and the one in which he left the Userbot's customer site
The List of key people
Query for an array of key people's contacts in a company
The List of key people
Carries the array of objects consisting in the name, surname and contacts of the key people in a company
Adds a tag for a company
Carries the array of objects consisting in the name, surname and contacts of the key people in a company
Adds a tag for a company
Carries the array of objects consisting in the name, surname and contacts of the key people in a company
The [user.id] is the value that can be get by the command who. Limit and offset (integers) are used to limit the amount of chat sessions to be returned.
The [user.id] is the value that can be get by the command who. The [session.id] is obtained by robin.sv.[user.id].get.sessions.[limit].[offset] command
Used to ask to assign a chat to an agent
Used to ask to assign a chat to the Bot
wspath can be get by robin.sv.[user.id].get.sessions. chat_message is the actual message that is sent in the chat
When is passed a variable_id an update will occur. If the variable object is passed a new variable will be created.
no payload is sent with this command at all
No payload is sent with this command