Start Chatbot

Create Chatbot

You can create and train your chatbot within few moments.

Go to your portal and click the + button at Train new chatbot in few seconds. Configure basic settings and click save chatbot

Basic settings include:

  • Chatbot logo: Choose brand logo for your chat interface
  • Chatbot name: Choose a descriptive name for your chatbot
  • Chatbot color: Select brand colors for your chat interface
  • AI model: Choose the AI model that powers your chatbot
  • Chatbot role: Define your chatbot's purpose and personality
  • Chatbot instructions: Define conversation style, tone, and specific response guidelines
  • Knowledge base: Add information sources for your chatbot
  • Friendly File Name: Set a friendly name for your uploaded file
Tip: For the knowledge base, include your most frequently asked questions and product documentation to help your chatbot provide accurate answers.
Tip: When writing instructions, be specific about how your chatbot should respond to different types of queries and include examples of ideal responses.

Preview Chatbot

There are many ways you can see your chatbot in action.

  • Preview Page: Go to your portal and click on your chatbot name to open the preview page. You can see the chatbot in both preview modes: Page preview and Widget preview.
  • Embed Page: Go to your portal and click on the icon next to your chatbot name to open the embed page. You can edit the embed code to customize the layout and interface of your chatbot.
  • Chatbot url: Go to your portal and click on the icon next to your chatbot name to copy your chatbot url. This url contains the chatbot id, and it can be shared with your users.

Chatbot Settings

General Settings

You can customize your chatbot with additional settings:

  • Chatbot logo: Choose brand logo for your chat interface
  • Chatbot name: Choose a descriptive name for your chatbot
  • Chatbot color: Select brand colors for your chat interface
  • AI model: Choose the AI model that powers your chatbot
  • Chatbot role: Define your chatbot's purpose and personality
  • Chatbot instructions: Define conversation style, tone, and specific response guidelines
  • Welcome Message: This is the first message that the chatbot will send when starting a conversation with a user
  • Fallback Message: The chatbot will send this message as a fallback if it fails to answer a user's query many times.
  • Cite URL sources: If enabled, the chatbot will mention the source url of the answer if exists.
  • Optional: Session cookies: Set cookies in case your website requires session cookies to be provided.

Knowledge base

Your knowledge base can constitude of 3 types of sources.

  • Regular File (Recommended): File formats can be of the following: TXT, PDF, CSV, RTF, DOCX, DOC, JSON, XML, XLSX, XLS, PPTX, PPT, ODT, ODP, ODG, ODS, EPUB, in addition to other file formats that can be considered as text.
  • Website: You can choose to parse a single page, the entire website, a subdirectory (recursively or no) , or parse the urls from the Sitemap.
  • Audio/Video: Almost all common audio/video file formats are supported.
Tip: Make the audio/video concise and short to reach the ultimate performance.
Tip: Regular files are recommended because the chatbot will be instantly ready after upload.

Chatbot Flow

Each chatbot can have a custom flow to create rich user interaction and guide conversations in a structured way. The custom flow feature allows you to design interactive conversation paths that enhance user experience beyond simple text exchanges.

Flow can be created using 6 types of interactive actions:

  • Text Message: Send predefined message to inform or guide users
  • Text Message + URL Button: Provide information with a clickable link to external resource or page
  • Text Message + Reply Buttons: Present multiple choice options to streamline user navigation
  • Location Message: Display location based on latittude and longtitude
  • Reset Button: When clicked, the flow will start from the beginning
  • Api Request: Call an external API to fetch responses in real time
Property Description
API URL The url of the API
Method GET, POST, PUT, or DELETE
Parameters Add parameters to the request: name, method, type, and value.

API Response should be in json format

Response type can be:

  • Text Message: Display returned text from your API
  • Text Message + URL Button: Show API response with actionable link
  • Background Task: The chatbot will neglect this response, it can be empty but it has to be json response
  • Response Example: Text message
Json
 {
    "response_type": "text_message",
    "record_type": "text_message",
    "record_type_value": {
        "type": "text_message",
        "details": {
            "message": "Message to display in chat interface from the chatbot"
        },
        "has_children": false
    },
    "role": "assistant"
}

  • Response Example: Text Message + URL Button
Json
 {
    "response_type": "message_with_url_button",
    "record_type": "message_with_url_button",
    "record_type_value": {
        "type": "message_with_url_button",
        "details": {
            "header": "Message Header",
            "body_text": "Message body",
            "footer": "Message footer",
            "button": {
                "display_text": "Button text",
                "link": "https://instantchatbots.ai"
            },
            "instructions": ""
        },
        "has_children": false
    },
    "role": "assistant"
}
Tip: Make sure to test all possible responses from your API
Tip: Make sure to test all paths of the chatbot flow

Leads Collection

Enable the chatbot to automatically collect and manage leads.

Set the number of user messages sent before collection starts.

Collected leads can be emailed to the admin user, or added automatically to your enabled customer support tool.

Note: It's your responsibility to comply with GDPR and other privacy regulations when collecting user data.

Create Tickets

Enable chatbot to automatically create support tickets from conversations.

If enabled, the chatbot will automatically create tickets when requested by the user, or when the chatbot fails to answer a user's query many times.

Tickets will be created at the enabled platforms, and notifications will be handled by each platform's settings.

API Reference

Ask Chatbot

POST /api/v1/ask_chatbot

Parameter Type Required Description
chatbot_id string Yes Unique identifier of the chatbot to query
user_query string Yes The user's message or question to the chatbot
session_id string No Optional session identifier to maintain conversation context
live_instruction string No Optional instructions to modify chatbot behavior for this query
JavaScript
Python
PHP
cURL
JavaScript Example
const response = await fetch('https://instantchatbots.ai/api/v1/ask_chatbot', {
                        method: 'POST',
                        headers: {
                            'X-API-Key': apiKey,
                            'Content-Type': 'application/json'
                        },
                        body: JSON.stringify({
                            chatbot_id: "cb_123456",
                            user_query: "What are your business hours?",
                            session_id: "session_uuid", // Optional
                            live_instruction: "Today is May 9, 2025" // Optional
                        })
                    });
                    
                    const data = await response.json();
                    console.log(data);
Python Example
import requests
                    
                    url = "https://instantchatbots.ai/api/v1/ask_chatbot"
                    headers = {
                        "X-API-Key": api_key,
                        "Content-Type": "application/json"
                    }
                    data = {
                        "chatbot_id": "cb_123456",
                        "user_query": "What are your business hours?",
                        "session_id": "session_uuid",  # Optional
                        "live_instruction": "Today is May 9, 2025"  # Optional
                    }
                    
                    response = requests.post(url, headers=headers, json=data)
                    print(response.json())
PHP Example
$url = "https://instantchatbots.ai/api/v1/ask_chatbot";
                    $data = array(
                        "chatbot_id" => "cb_123456",
                        "user_query" => "What are your business hours?",
                        "session_id" => "session_uuid", // Optional
                        "live_instruction" => "Today is May 9, 2025" // Optional
                    );
                    
                    $options = array(
                        'http' => array(
                            'header'  => array(
                                "X-API-Key: $api_key",
                                "Content-Type: application/json"
                            ),
                            'method'  => 'POST',
                            'content' => json_encode($data)
                        )
                    );
                    
                    $context = stream_context_create($options);
                    $result = file_get_contents($url, false, $context);
                    $response = json_decode($result, true);
cURL Example
curl -X POST https://instantchatbots.ai/api/v1/ask_chatbot \
                      -H "X-API-Key: $API_KEY" \
                      -H "Content-Type: application/json" \
                      -d '{
                        "chatbot_id": "cb_123456",
                        "user_query": "What are your business hours?",
                        "session_id": "session_uuid",
                        "live_instruction": "Today is May 9, 2025"
                      }'

Response Format

Field Type Description
response_type string Indicates the type of response returned by the chatbot. Common values include "chat_message", "url_button", or "reply_buttons".
response_info string The actual text response from the chatbot.
confidence_level integer A value between 0-100 indicating how confident the chatbot is in its response.
  • Response Example: chat_message response type
JSON Response
{
                         "response_type": "chat_message",
                         "response_info": "Message returned by the chatbot",
                         "confidence_level": 80
}
  • Response Example: create_ticket response type
JSON Response
{
                         "response_type": "create_ticket",
                         "response_info": "Message returned by the chatbot containing explanation for ticket creation",
                         "confidence_level": 100
}
  • Response Example: human_handover response type
JSON Response
{
                         "response_type": "human_handover",
                         "response_info": "Message returned by the chatbot containing important information for human handover",
                         "confidence_level": 100
}

Fetch Chatbots

POST /api/v1/fetch_chatbots

Parameter Type Required Description
action string Yes The action to perform. Must be "get_chatbots".
JavaScript
Python
PHP
cURL
JavaScript Example
const response = await fetch('https://api.instantchatbots.ai/api/v1/fetch_chatbots', {
    method: 'POST',
    headers: {
        'X-API-Key': apiKey,
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        action: 'get_chatbots'
    })
});

const chatbots = await response.json();
console.log(chatbots);
Python Example
import requests

url = "https://api.instantchatbots.ai/api/v1/fetch_chatbots"
headers = {
    "X-API-Key": api_key,
    "Content-Type": "application/json"
}
data = {
    "action": "get_chatbots"
}

response = requests.post(url, headers=headers, json=data)
chatbots = response.json()
print(chatbots)
PHP Example
$url = "https://api.instantchatbots.ai/api/v1/fetch_chatbots";
$data = array(
    "action" => "get_chatbots"
);

$options = array(
    'http' => array(
        'header'  => array(
            "X-API-Key: $api_key",
            "Content-Type: application/json"
        ),
        'method'  => 'POST',
        'content' => json_encode($data)
    )
);

$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$chatbots = json_decode($result, true);
cURL Example
curl -X POST https://api.instantchatbots.ai/api/v1/fetch_chatbots \
          -H "X-API-Key: $API_KEY" \
          -H "Content-Type: application/json" \
          -d '{
            "action": "get_chatbots"
          }'

Response Format

JSON Response
{
              "status": "success",
              "chatbots": [
                {
                  "uuid": "8ba4c76b-cc33-4dec-b217-f534e736a0e8",
                  "name": "bot_vpn",
                  "chatbot_color": "#5777a8",
                  "logo_url": "https://instantchatbots.ai/static/img/mylogo.png",
                  "chatbot_model": 1,
                  "chatbot_language": 1,
                  "is_private": 0,
                  "date_created": "2025-04-10 07:23:18"
                },
                {
                  "uuid": "7533c5aa-d3a1-4792-85c8-526af49b836d",
                  "name": "test bot 2",
                  "chatbot_color": "#5777a8",
                  "logo_url": "https://instantchatbots.ai/static/img/mylogo.png",
                  "chatbot_model": 1,
                  "chatbot_language": 1,
                  "is_private": 0,
                  "date_created": "2025-04-10 20:04:18"
                }
              ]
}

Integrations

Automation Platforms

Connect your chatbot with automation tools to automate workflows across 5000+ apps.

Business Tools

Sync chatbot conversations with your CRM, customer support platform, and your chat channels.

E-commerce & CMS

Seamlissly add the chatbot to e-commerce & CMS sites.