AI API Reference
Use DOLU.ai AI features programmatically.
Chat
Send Message
http
POST /api/v1/ai/chatjson
{
"message": "I want to book an appointment",
"conversationId": "conv-uuid",
"history": [
{ "role": "user", "content": "Hello" },
{ "role": "assistant", "content": "Welcome! How can I help?" }
]
}Test Knowledge
http
POST /api/v1/ai/test-knowledgeTest the AI without affecting real conversations.
Knowledge Base
List Entries
http
GET /api/v1/ai/knowledgeCreate Entry
http
POST /api/v1/ai/knowledgejson
{
"type": "faq",
"question": "What are your working hours?",
"answer": "We are open Monday-Friday, 9 AM to 6 PM.",
"tags": ["hours", "general"],
"language": "en"
}Feedback
Submit Feedback
http
POST /api/v1/ai/feedbackjson
{
"messageId": "msg-uuid",
"rating": 1,
"feedbackType": "THUMBS"
}Analytics
Usage Stats
http
GET /api/v1/ai/statsKnowledge Suggestions
http
GET /api/v1/ai/suggestionsLists AI-generated knowledge suggestions based on unanswered questions.
