SmartIVR - ChatBot API connector

This document describres the expected API interface to connect our SmartIVR to any external ChatBot service.

Our SmartIVR will perform the following POST request each time it has the user input in text form and expects the specified JSON format containing one of the possible response types.

The SmartIVR will add with each request an Authorization header containing a security token so it can be identified by the API.


Request

In each request the SmartIVR will send an ID to identify the conversation, with a format of PHONE-CALLTIMESTAMP, and a text containing the user's input.

Headers

Header Value
Authorization Bearer TOKEN
Content-Type application/json

Body

Field Value
id Identification of the conversation
text Transcription of the user speech

Example

{
    "id": "666555444-1784037502",
    "text": "I need help with my new account"
}

Response

There are four different kind of supported actions that the SmartIVR can perform based on the ChatBot's reasoning:

Field Required Value
type yes Type of the action to perform, must be one of "ask|info|transfer|hangup"
lang only if field text exists Language code of the text to play. It must follow the BCP 47 format (e.g. en-US, es-ES)
text only in ask or info responses Text to play to the user
dest only in transfer responses DDI or extension to transfer the call to

Examples

Ask example

{   
    "type": "ask",
    "text": "How can I help you?",
    "lang": "en-US"
}

Info example

{   
    "type": "info",
    "text": "For your security I inform you that this call may be recorded.",
    "lang": "en-US"
}

Transfer example

{   
    "type": "transfer",
    "dest": "0012025550147"
}

Hangup example

{   
    "type": "hangup"
}