DearDoc AI Chat API (1.16.2)

Download OpenAPI specification:

Documentation on the API endpoints for the DearDoc AI Chat.

The first step is to retrieve the configuration of a chatbot, for that, we will be using API Keys, included in the Authorization Header. This API Key will be provided by DearDoc.

Afterwards, a conversations needs to be created, this will also be authorized with a valid API Key for a single chatbot. If the API Key is valid, the conversation will be created, along with a conversation id and a JWT token, that will be used for further calls related to this session or conversation.

Get the configuration of a chatbot

Returns the chatbot configuration and customization options

Authorizations:
apiKey

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "bearerToken": "string",
  • "assistant": {
    },
  • "customization": {
    },
  • "initialVideo": {
    }
}

Create a new conversation

Creates a new conversation for a chatbot

Authorizations:
apiKey

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "initialMessage": {
    },
  • "bearerToken": "string"
}

Retrieve all the messages of a conversation

Get the conversation messages

Authorizations:
jwt
path Parameters
conversationId
required
string

Responses

Response samples

Content type
application/json
{
  • "createdAt": "2019-08-24T14:15:22Z",
  • "sender": "ai",
  • "text": "string",
  • "rationale": "string",
  • "attachments": {
    },
  • "suggestions": [
    ],
  • "inputType": "email",
  • "metadata": {
    }
}

Send a message and get a response

Send a message to a conversation

Authorizations:
jwt
path Parameters
conversationId
required
string
Request Body schema: application/json
required
text
required
string

Responses

Request samples

Content type
application/json
{
  • "text": "string"
}

Response samples

Content type
application/json
{
  • "createdAt": "2019-08-24T14:15:22Z",
  • "sender": "ai",
  • "text": "string",
  • "rationale": "string",
  • "attachments": {
    },
  • "suggestions": [
    ],
  • "inputType": "email",
  • "metadata": {
    }
}

Notify when a chat is opened

Notify when a chat is opened

Authorizations:
jwt

Responses

Response samples

Content type
application/json
{
  • "message": "Ok"
}

Create a new conversation

Creates a new conversation for a chatbot

Authorizations:
jwt

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "initialMessage": {
    }
}

Retrieve all the messages of a conversation

Get the conversation messages

Authorizations:
jwt
path Parameters
conversationId
required
string

Responses

Response samples

Content type
application/json
{
  • "createdAt": "2019-08-24T14:15:22Z",
  • "sender": "ai",
  • "text": "string",
  • "rationale": "string",
  • "attachments": {
    },
  • "suggestions": [
    ],
  • "inputType": "email",
  • "metadata": {
    }
}

Send a message and get a response

Send a message to a conversation

Authorizations:
jwt
path Parameters
conversationId
required
string
Request Body schema: application/json
required
text
required
string

Responses

Request samples

Content type
application/json
{
  • "text": "string"
}

Response samples

Content type
application/json
{
  • "createdAt": "2019-08-24T14:15:22Z",
  • "sender": "ai",
  • "text": "string",
  • "rationale": "string",
  • "attachments": {
    },
  • "suggestions": [
    ],
  • "inputType": "email",
  • "metadata": {
    }
}

Notify when a chat is opened

Notify when a chat is opened

Authorizations:
jwt

Responses

Response samples

Content type
application/json
{
  • "message": "Ok"
}

Get Health Status of the system

Returns the health status of the database and llm service

Responses

Response samples

Content type
application/json
{
  • "timestamp": 0,
  • "database": "operational",
  • "llm": "operational"
}