Skip to main content

API

In this guide, we go through the steps necessary to integrate your custom Quickchat AI Assistant with your product via an API endpoint.

Authentication

Include your API Key and scenario_id in every request.

In order to obtain your API key, upgrade your subscription to include API Access.

Chat

Initialise new conversation / new user history

curl https://chat.quickchat.ai/chat \
-H 'Content-Type: application/json' \
-d '{
"api_key": "<API_KEY>",
"scenario_id": "<SCENARIO_ID>",
"text": "Hello!"
}'

The above command returns JSON structured like this:

{
"ord_number": 2,
"conv_id": "abcd1234",
"reply": "Hey there! 🙂"
}

conv_id is an optional parameter. Request which does not contain conv_id starts a new conversation and newly-generated conv_id is returned.

Associate conv_id with your particular user to maintain conversation context across time and multiple user interactions.

This endpoint performs a single conversation exchange.

HTTP Request

POST https://chat.quickchat.ai/chat

Query Parameters

ParameterTypeDescription
api_keystringCreate an account and subscribe to obtain your API key
scenario_idTextID associated with your Quickchat API implementation.
textstringUser input message

Send message to the AI Assistant

curl https://chat.quickchat.ai/chat \
-H 'Content-Type: application/json' \
-d '{
"api_key": "<API_KEY>",
"scenario_id": "<SCENARIO_ID>",
"conv_id": "abcd1234",
"text": "Hello!"
}'

The above command returns JSON structured like this:

{
"ord_number": 236,
"reply": "Hey, great to hear from you again! 😉"
}

HTTP Request

POST https://chat.quickchat.ai/chat

Query Parameters

ParameterTypeDescription
api_keystringCreate an account and subscribe to obtain your API key
scenario_idstringID associated with your Quickchat API implementation.
conv_idstring (Optional)Identify a particular conversation/user.
textstringUser input message.
skip_replyboolIf true, AI does not provide reply. Message from user appended to conversation history.
override_aiboolIf true, message from AI appended to conversation history.

Errors

Below we have gathered the error codes which may be returned by the API, together with their description and possible solutions.

CodeDescriptionAction
400The following parameters must be provided: api_key, scenario_id, textPlease make sure all required parameters are provided.
400conv_id abcd1234 does not existPlease ensure that conv_id you are referring to is correct.
401UnauthorizedPlease make sure that your api_key and scenario_id are correct (see dashboard settings).
500Internal Server ErrorThere is an issue on our side. Please get in touch with support.
503Service UnavailableOur servers are overloaded or temporarily unavailable due to maintenance. If problem persists, please get in touch with support.