Conversation Widget
Get a specific Web Chat
GET /api/web-chats/{id}/
Parameters
id
✅
string
A UUID string identifying this web chat.
Code Examples
# API Call Example (Shell)
curl -X GET "https://api.maiagent.ai/api/web-chats/550e8400-e29b-41d4-a716-446655440000/" \
-H "Authorization: Api-Key YOUR_API_KEY"
# Please make sure to replace YOUR_API_KEY and verify the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
axios.get("https://api.maiagent.ai/api/web-chats/550e8400-e29b-41d4-a716-446655440000/", config)
.then(response => {
console.log('Successfully retrieved response:');
console.log(response.data);
})
.catch(error => {
console.error('An error occurred with the request:');
console.error(error.response?.data || error.message);
});Response Body
Status Code: 200
Response Schema Example
{
"id": string (uuid)
"name": string
"avatar"?: string (uri) // optional
"logo"?: string (uri) // optional
"description"?: string // optional
"cover"?: string (uri) // optional
"backUrl"?: string // optional
"isActive"?: boolean // optional
"enableSpeech": boolean
"displayGreeting": string
"displayConversationStarters": [
string
]
"theme": {
{
"primaryColor"?: string // optional
"navbarTextColor"?: string // optional
"conversationBackgroundColor"?: string // optional
"chatbotMessageTextColor"?: string // optional
"userMessageTextColor"?: string // optional
"chatbotMessageBackgroundColor"?: string // optional
"userMessageBackgroundColor"?: string // optional
"chatbotMessageBackgroundShadowEnabled"?: boolean // optional
"userMessageBackgroundShadowEnabled"?: boolean // optional
}
}
"darkTheme": {
{
"primaryColor"?: string // optional
"navbarTextColor"?: string // optional
"conversationBackgroundColor"?: string // optional
"chatbotMessageTextColor"?: string // optional
"userMessageTextColor"?: string // optional
"chatbotMessageBackgroundColor"?: string // optional
"userMessageBackgroundColor"?: string // optional
"chatbotMessageBackgroundShadowEnabled"?: boolean // optional
"userMessageBackgroundShadowEnabled"?: boolean // optional
}
}
"enableFileUpload"?: boolean // optional
"enableDisplayCitations"?: boolean // optional
"enableDisplayToolResults"?: boolean // optional
"enableShareConversation"?: boolean // optional
"enableLocation"?: boolean // optional
"enableShowPoweredBy"?: boolean // optional
"poweredByLogo"?: string (uri) // optional
"enableAnonymous"?: boolean // optional
"accessType":
{
}
"enableThemeModeToggle"?: boolean // optional
"defaultThemeMode"?: // optional
{
}
"enableDownloadCitations"?: boolean // optional
"customDomain"?: // optional
{
"id": string (uuid)
"domain": string
"status":
{
}
}
"enableDisplayChatbotAvatar"?: boolean // optional
"enableDisplayChatbotName"?: boolean // optional
"inbox": object
}Response Example Value
Get LLM Usage Statistics
GET /api/chatbots/{chatbotPk}/llm-usage-statistics/
Parameters
chatbotPk
✅
string
A UUID string identifying this Chatbot ID
endDate
❌
string
End date, format: YYYY-MM-DD
startDate
✅
string
Start date, format: YYYY-MM-DD
timeGranularity
✅
string
Time granularity (day/month)
Code Examples
Response Body
Status Code: 200
Response Schema Example
Response Example Value
Status Code: 400
Response Schema Example
Response Example Value
Get AI Assistant Statistics
GET /api/chatbots/{chatbotPk}/statistics/
Parameters
chatbotPk
✅
string
A UUID string identifying this Chatbot ID
datetimeFrom
❌
string
Start time
datetimeTo
❌
string
End time
timeGranularity
❌
string
Time granularity (hour/day/month)
Code Examples
Response Body
Status Code: 200
Response Schema Example
Response Example Value
Enable or Disable Evaluation for a Specific AI Assistant
PATCH /api/chatbots/{id}/enable-evaluation/
Parameters
id
✅
string
A UUID string identifying this Chatbot.
Request Body
Request Parameters
enableEvaluation
boolean
No
Request Structure Example
Request Example Value
Code Examples
Response Body
Status Code: 200
Response Schema Example
Response Example Value
Last updated
Was this helpful?
