See our other products: ChatBot.com – bot platform | KnowledgeBase – help center for website | LiveChat – award winning live chat software

Chat.io APIs

Some time ago we discussed chat.io Customer SDK and how you can use it to create a custom chat widget. But the SDK is not the only way to interact with chat.io environment. We provide chat API so that you can, for example, easily customise your chat widow, your agent app, or even set up a bot agent.

What is API?

In the article about chat.io Customer SDK I used the following definition of an API:

An API, or Application Programming Interface, is a set of functions for building software applications. It specifies how software components should work with each other: it’s an intermediary that allows two applications to communicate.

APIs have been the unsung heroes of communication since 1960s. They work quietly in the background, making the digital environment interactive.

What may be surprising is that APIs are omnipresent: there are various types for websites, applications and operating systems. In Windows, for example, if you copy a text from one application to another, it’s one of the system APIs that does the magic.

We use APIs on a daily basis, even if we are not aware of this fact. For example, let’s imagine that you want to order a takeaway lunch online. You enter a website which aggregates lunch menus from various restaurants, enter the delivery address and select the type of food that you want to eat. Upon clicking “Search”, the website communicates with the API of each restaurant and then displays a list of places that meet your criteria.

Chat API - theory and practice

Since APIs are everywhere, it’s no wonder that major live chat services provide their own interfaces to interact with their software. Chat.io is no different here. What makes it unique, though, it’s the fact that it comes with three different APIs for various use cases. For this reason, getting started may be a bit tricky, but we have you covered: there are ready-to-use snippets in JavaScript, Go and Python as well as numerous code samples.

Agent API

Chat.io Agent API gives you an option to join a chat as an agent. What does it mean? Basically, thanks to this API you can interact with a chat as a chat operator, i.e. post messages, browse chat archives or ban customers. Or, if you feel brave, you can build a custom agent app.

And do you know that chat.io’s own Agent App is powered by this API?

Chat API - Chat.io Agent App

Highlights

What is powerful about Agent API is the option to assign properties to a chat, a thread or an event. Chat.io’s Agent API uses this function, for example, for handing chat rating and for creating and storing the coloured circles on the chats list.

Another interesting feature are custom events. We saw them in action on LiveChat Hackathon #3, where one of the teams used them to build a screen-sharing function. A custom event determined the position of chat agent’s mouse cursor, which allowed for visual interaction with the customers (drawing on customers’ screens). Great!

Read more about chat.io Agent API

Customer API

As you may easily guess, if there is an API for agents (chat operators), there should be another one for customers (chat visitors). Chat.io Customer API is exactly this. It allows you to chat as a customer or to build a custom chat widget.

Similarly, chat.io’s default chat window is built with Customer API.

Chat API - Chat.io Widget

Use cases

One of our clients used this API to embed chat.io widget in their mobile app. What was awesome about this integration is that they implemented an option of having multiple chats with one visitor. It significantly augmented chat.io’s default behaviour, where each visitor has only one continuous chat.

And where can you use the “chat as a customer” option? For example, it’s great for multichannel integrations. Let’s imagine that you want to make it possible to reach out to a customer after the chat has ended and send them an email message. Then, when the customer replies to this email, you can use a bot (see bot agents below for more details!) to send this message to your chat window.

Read more about chat.io Customer API

Configuration API

Finally, we’re reaching the third of the chat.io APIs. The name and the description (“a service for storing license configuration”) may sound mysterious, but in fact the purpose of this chat API is quite straightforward. Namely, you use it to set up webhooks and create bot agents.

What are they?

Webhooks

A webhook is a method of modifying the behaviour of a website or a web app with custom callbacks. Thanks to chat.io webhooks you can be notified when a particular event occurs: for example, when a chat is started, you can get visitor’s email and chat ID.

Webhooks show their true power in two cases: when you want to send chat data to a third-party service (e.g. a CRM software) or to spice up bot agents.

Bot agents

Bot agents come in handy when you want to automate a task or set up a condition for your chat. Chat.io bot agents can react to keywords (posting a message in response) and use chat API methods.

What does it mean?

For example, let’s say that a support agent has a lunch break every day from 12pm to 1pm. To make sure that the visitors are not left unattended, it’s possible to create a bot which turns on and takes over the conversations when the agent types in a certain command. When the agent is back from the lunch break, they can turn off the bot. Or, if a company doesn’t operate on certain territories, a bot can determine the location of a customer and inform them that the service is not available in their country.

Read more about chat.io Configuration API

Moving forward

Chat.io is constantly evolving, so each chat API is being worked on an updated on regular basis. Our to-do lists are literally bursting at the seams! One of the features developed at the moment which I’m particularly excited about is a component for multichannel integrations so that you don’t have to set them up manually.

As always, however, we’re open to your suggestions and requests. Contact us if you have a feature idea, a development question or just want to say hi!

comments powered by Disqus