API Reference

With Cubebot, you can use a wide variety of programming languages to make HTTP requests for our API.

Sending Messages

Once you have generated your first project, it will receive an associated Project ID. This will be your key to sending a message to your Project via our API.

Creating a Conversation

First, you must create a Conversation within the Project. Below, replace 'projectID' with the Project ID of your new Project, and 'APIKey_Here' with your actual API key.

curl --request POST
--url 'https://cubebotcorewebapi.azurewebsites.net/ChatbotLive/GetResponseFromBot?chatbotUuid=xxxxxxxxxxx&conversationUuid=xxxxxxxxxxx'
--header 'accept: application/json'
--header 'authorization: Bearer XXXXXXXXXXXXXXXXXXX'
--header 'content-type: application/json'
--data '
{
"chatText": "what is cubebot"
}
'

Sending a Message to the Conversation

Once you have created a Conversation, you can get started by sending a message in that Conversation. In the below example, replace 'projectID' with the Project ID of your new Project, 'sessionID' with the session ID of the Conversation created, and 'APIKey_Here' with your actual API key.

curl --request POST
--url 'https://cubebotcorewebapi.azurewebsites.net/ChatbotLive/GetResponseFromBot?chatbotUuid=xxxxxxxxxxxxxxxx&conversationUuid=xxxxxxxxxxxxxxx'
--header 'accept: application/json'
--header 'authorization: Bearer ET_8ZrGcXD7oIBic5-U5QOIbVmK6z-Ihr'
--header 'content-type: application/json'
--data '
{
"chatText": "whare is cubebot main office situated"
}
'

Here's what a sample streaming output would look like:

{
"result": "OK",
"botMessageResponse": {
"idchatmessage": xxxxxxx,
"message_date_time": "2024-06-10T09:32:12.310869",
"result": "xxxxx x xxxxxxx xxxxxx xxxxxxx",
"message_written": "Yes",
"request_code": "Anand.kumar_040206",
"idChatConversation": xxxx,
"chat_conversation_uuid": "4A49635D-6F31-47CF-BEF6-432A0AAD31C9",
"status": 200,
"apicitid": xxxxxxxxx,
"time_duration": null
}
}