Build your bot using ChatBot API

API Version

Introduction

Welcome to ChatBot.com developer documentation. We’re very excited you want to learn about ChatBot.

ChatBot is a natural language understanding framework that allows you to create intelligent chatbots for any service. You can easily integrate your bots with favorite messaging apps and let them serve your customers continuously.

Our main goal is to develop the process of creating conversational interfaces as simple as possible.

Basic API usage

All the requests referenced in the documentation start with https://api.chatbot.com.

Authentication

Each API request requires authentication to identify the license that is responsible for making the request. Authentication is provided by access tokens.

Where are my access tokens?

You can find the tokens in the ChatBot settings tab.

Each license has two tokens:

  • Developer access token - allows you to manage your stories, interactions, entities, webhooks and more. This is a private usage token and should never be shared as it gives full access to your account.
  • Client access token - allows only /query endpoint requests. It can be kept as part of an application which code may be read by the third person. It can be regenerated any time in ChatBot settings if necessary.

Authentication example

Include this HTTP header for each API request:

Authorization: Bearer ${ACCESS_TOKEN}

Example request

curl --request GET \
	--url https://api.chatbot.com/stories \
	--header 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}'

Error handling

Errors are returned using standard HTTP error code syntax. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error (wrong or missing parameters, insufficient authentication etc.), and codes in the 5xx range indicate an error with ChatBot servers. Any additional info is included in the status of the return call, JSON-formatted.

HTTP status codes summary

  • 400The request was incorrect. 400 – The request was incorrect. Please make sure that the passed arguments are matching format provided in the method documentation.
  • 401Unauthorized. Not Found. You attempt to request a resource that doesn’t exist.
  • 404Not Found. You attempt to request a resource that doesn’t exist.
  • 500Internal Server Error. Something unexpected happened on our end. Please try again or contact support.

Data format

ChatBot returns data in JSON format. See the following example.

{
    "timestamp": "2017-04-12T13:30:07.445Z",
    "status": {
        "code": 200,
        "type": "success"
    }
}

Start a free ChatBot trial
and build your first chatbot today!

Free 14-day trial No credit card required

Discover our text| products