Classification level: 🟢 C1-Public

Version: 1.4

Last update date: 09/03/2022

Updated by: calldesk technical team

Introduction

The Chat API allows customers or partners to integrate the agent using the chat channel. It can be useful if voice features are not needed or if an agent must be deployed on both channels.

The Chat API is designed to be stateless, which means two requests with the same payload will return the same result. It implies the API user stores and manipulates data on its side. These operations are described below.

Global overview

Chat API has to be configured to target one specific bot.

  1. The user requests the Chat API with an empty state
  2. The Chat API will respond with the conversation start sentence and the first bot question
  3. The user stores the response state, makes the bot answer available to final user, and waits for the final user response
  4. The user requests the Chat API with the previous state and the final user response

Security - API key retrievement

The API is secured thanks to an API key.

An API key can be generated for each voice agent directly from the studio settings tab.

Go in Builder > Settings > Advanced:

Capture d’écran de 2022-08-10 14-37-43.png

Then, click on “Generate a new API key” button. The API key is the same for the whole bots of the current account.

How to use the endpoint?

Start your chat

Request