For developers who want to communicate with their chatbot through HTTPS POST requests, check the details below.
REST API Specs:
API V4.0 and above (Recommended): https://robomatic.ai:22003/api
API V3.9 and below: https://robomatic.ai/api.php
Method: POST
Form content type: form-data (multipart/form-data)
Mandatory Form Parameters
cbid
A number that indicates which chatbot ID to connect to.
key
A 30 characters secret API key to allow communicating with the selected chatbot.
Chatbot ID and API Key can be found from Manage Chatbots section, click "Manage" button next to the selected chatbot you want to connect to, Chatbot ID and API Key can be found as indicated below:
op
Sets the operation type to communicate with chatbot, it could be as below:
in | Sending user input for processing. |
censorin | Sending user input for processing without saving the input. |
out | Requesting chatbot output. |
intro | Requesting chatbot suitable response from output group Conversation intros - specific events or Conversation intros - normal beginnings. |
timed | Requesting chatbot suitable response from output group Periodical automatic responses or Conversation intros - specific events |
Optional Form Parameters
cbot
If this parameter is set with a value equals to 1, it will make the chatbot get suitable response for user's input. This parameter should be set if you are not forcing the chatbot towards certain responses.
in
A value contains user's input string. You might need this parameter, if you've set
op parameter equals to
in or
censor in.
IIDs
A value contains numbers separated with commas. Each number represents a user input record. This will force the chatbot to look only in these records for a possible match with user's input. You might need this parameter, if you've set
op parameter equals to
in.
out
A value contains chatbot's output string. Setting this variable will force the chatbot to output specific string. You might need this parameter, if you've set
op parameter equals to
out.
OID
A value contains numbers separated with commas. Each number represents a chatbot output record. This will force the chatbot to look only in these records randomly for a possible response. If you used this parameter, you must set
op parameter equals to
out.
OGID
A value contains numbers separated with commas. Each number number represents a chatbot output group record. This will force the chatbot to look only for output records that belong to the specified output groups. Output group records are checked randomly. If you used this parameter, you must set
op parameter equals to
out.
respective
If this parameter is set with a value equals to 1, it will force the chatbot to check the output records or the output group records in a respective order. This parameter is only used when
OID or
OGID parameters are used.
AtoTlk
If this parameter is set with a value equals to 1, it will make the chatbot get suitable response from output group
Periodical automatic responses only if it didn't find a suitable response from output group
Conversation intros - specific events. You might need this parameter, if you've set
op parameter equals to
timed.
SessionID
A value set to force the chatbot remember specific user and conversation in case this value used before. If it wasn't used before, the chatbot will start a new session with this value.
Without this parameter, the chatbot will generate a random value that indicates the current session.
ChatSource
A string value set to categorize the conversations (sessions) between the chatbot and its users. It's used to identify the source of the conversations. Such as: web, desktop, mobile, website A, website B, mobile app A, mobile app B ...etc
Reference
A string value representing the entry point where the conversation started. It's mainly used for marketing purposes.
timezone
A string value setting the timezone of the conversation. Usually used for time based chatbot responses. Check
The List of Supported Timezones. If not set, the chatbot's default settings is used.
webhook
A string value setting a URL to be called if the chatbot sending a follow up message to the user.
STMemory
An associate array value containing items representing short-term memory variables (e.g. ["Name" => "Ehab", "Age" => 30]) that can be injected to the chatbot thoughts or to modify existing variables. These are typically used to update chatbot thoughts about certain dynamic topics.
duration
If this parameter is set with a value equals to 1, the chatbot will return the time it took to respond in seconds.
JSON Output
out
A string value contains the response of the Chatbot mostly in a raw text format.
who
A value represent the party that responded, in most cases it's the current chatbot. Sometimes, it can be different chatbot or human.
script
A string value contains Javascript included with the chatbot response if there is any.
html
A string value contains HTML included with the chatbot response if there is any.
duration
A value represent the time it took the chatbot to respond in seconds, this value will only show up if
duration parameter is set.