API to interact with chatbots

ChatBot API for text and voice

The ChatCompose API offers the possibility of creating a text or voice chatbot with machine learning, entity detection and natural language processing, so you can connect or develop your own chatbot in your applications or platforms.

API for Text conversations

Create a chatbot and interact with it through an open API. You can use the chabot inside your messaging applications or to offer quick answers to your clients.

Just enter the information you want the chatbot to respond and receive a response with metadata of language and intention.

API for Voice conversations

Interact with your chabot by voice and receive the answer in sound. All you need to do is send your recording encoded in base64 or the url where the file was saved, and the chatbot will respond by sending you a response in sound format.

You can check our voicebot to see how voice conversation works.

Add a chatbot to your application

Adding bots to an application or conversation plug-in allows people to ask questions, execute commands, etc. without interrupting what is being done.

In the back-end, a bot can access other systems, acting as an intermediary for several applications.

This ability to provide access to a wide range of resources and tools, while maintaining the current experience, can provide excellent support for many types of applications, such as:

  • Workflow management
  • Configuration and customization
  • Place orders
  • Search
  • Data collection

Why use an API?

Imagine the following scenario: Your application or platform wants to access the data or functionality of another application. Maybe you are developing a video game or an application where you need quick information without having to use the keyboard or having to open another program. You simply make a call to your chatbot's API and you will get a voice response without having to stop what you're doing.

How to use the API?

To integrate your chatbot with another platform (including CRM), you will have to query the API of your bot.

The API accepts the following as POST parameters ('Content-Type' == 'application/json'):

            {
              "user":"Your User",
              "lang":"EN",
              "sessionid":"unique session id", // (optional)
              "message":"the message to be answered"
            }  

The API will return a json object with the fields:

  1. response (the bot response and the 0-1 confidence)
  2. meta (NLP data)
  3. alt (alternative responses)

API for Voice use

The API accepts the following as POST parameters ('Content-Type' == 'application/json'):

            {
              "user":"Your user",
              "lang":"EN",
              "fileurl":"https://www.....", // optional
              "message":"a Base64 string"
            }  

In the answer you will receive the object "response", where response[0] will include a string in base64 format that you can decode to reproduce the sound of the response of the bot.

If you prefer to send a url with a sound file instead of a message, you can leave "message" empty and include the url inside the "fileurl" field.

Write a message to test the API

Test the API

        
Would you like to know more?

Get more information