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.
Returns the chatbot configuration and customization options
{- "name": "string",
- "description": "string",
- "bearerToken": "string",
- "assistant": {
- "name": "string",
- "avatar": "string"
}, - "customization": {
- "popup_style": "bubble",
- "button_style": "box",
- "chatbot_style": "classic",
- "main_color": "string",
- "company_logo": "string",
- "chat_logo": "string",
- "chat_logo_size": 0,
- "chat_logo_text": "string",
- "chat_logo_overtext": "string",
- "notification_bubble_color": "string",
- "color_palette": {
- "background": "string",
- "background_gradient": "string",
- "foreground": "string",
- "avatar_background": "string",
- "close_background": "string",
- "close_foreground": "string",
- "badge_background": "string",
- "badge_foreground": "string"
}, - "chat_autostart": true,
- "chat_autostart_time": 0,
- "mobile_chat_autostart": true,
- "mobile_chat_autostart_time": 0,
- "position": "string",
- "lateral_distance": 0,
- "bottom_distance": 0,
- "custom_font_name": "string",
- "custom_regular_font_woff": "string",
- "custom_regular_font_woff2": "string",
- "custom_bold_font_woff": "string",
- "custom_bold_font_woff2": "string"
}, - "initialVideo": {
- "initialVideoEnabled": true,
- "initialVideoUrl": "string",
- "initialVideoIconUrl": "string"
}
}{- "id": "string",
- "initialMessage": {
- "suggestionOpenInputCTA": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "sender": "ai",
- "text": "string",
- "rationale": "string",
- "attachments": {
- "embedTitle": "string",
- "embedUrl": "string",
- "videoUrl": "string",
- "embedType": "external-iframe"
}, - "suggestions": [
- "string"
], - "inputType": "email",
- "metadata": {
- "fulfilledProperties": [
- "string"
], - "generativeModelName": "string"
}
}, - "bearerToken": "string"
}Get the conversation messages
| conversationId required | string |
{- "createdAt": "2019-08-24T14:15:22Z",
- "sender": "ai",
- "text": "string",
- "rationale": "string",
- "attachments": {
- "embedTitle": "string",
- "embedUrl": "string",
- "videoUrl": "string",
- "embedType": "external-iframe"
}, - "suggestions": [
- "string"
], - "inputType": "email",
- "metadata": {
- "fulfilledProperties": [
- "string"
], - "generativeModelName": "string"
}
}Send a message to a conversation
| conversationId required | string |
| text required | string |
{- "text": "string"
}{- "createdAt": "2019-08-24T14:15:22Z",
- "sender": "ai",
- "text": "string",
- "rationale": "string",
- "attachments": {
- "embedTitle": "string",
- "embedUrl": "string",
- "videoUrl": "string",
- "embedType": "external-iframe"
}, - "suggestions": [
- "string"
], - "inputType": "email",
- "metadata": {
- "fulfilledProperties": [
- "string"
], - "generativeModelName": "string"
}
}{- "id": "string",
- "initialMessage": {
- "suggestionOpenInputCTA": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "sender": "ai",
- "text": "string",
- "rationale": "string",
- "attachments": {
- "embedTitle": "string",
- "embedUrl": "string",
- "videoUrl": "string",
- "embedType": "external-iframe"
}, - "suggestions": [
- "string"
], - "inputType": "email",
- "metadata": {
- "fulfilledProperties": [
- "string"
], - "generativeModelName": "string"
}
}
}Get the conversation messages
| conversationId required | string |
{- "createdAt": "2019-08-24T14:15:22Z",
- "sender": "ai",
- "text": "string",
- "rationale": "string",
- "attachments": {
- "embedTitle": "string",
- "embedUrl": "string",
- "videoUrl": "string",
- "embedType": "external-iframe"
}, - "suggestions": [
- "string"
], - "inputType": "email",
- "metadata": {
- "fulfilledProperties": [
- "string"
], - "generativeModelName": "string"
}
}Send a message to a conversation
| conversationId required | string |
| text required | string |
{- "text": "string"
}{- "createdAt": "2019-08-24T14:15:22Z",
- "sender": "ai",
- "text": "string",
- "rationale": "string",
- "attachments": {
- "embedTitle": "string",
- "embedUrl": "string",
- "videoUrl": "string",
- "embedType": "external-iframe"
}, - "suggestions": [
- "string"
], - "inputType": "email",
- "metadata": {
- "fulfilledProperties": [
- "string"
], - "generativeModelName": "string"
}
}