Skip to content

AI API Reference ​

Use DOLU.ai AI features programmatically.

Chat ​

Send Message ​

http
POST /api/v1/ai/chat
json
{
  "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-knowledge

Test the AI without affecting real conversations.

Knowledge Base ​

List Entries ​

http
GET /api/v1/ai/knowledge

Create Entry ​

http
POST /api/v1/ai/knowledge
json
{
  "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/feedback
json
{
  "messageId": "msg-uuid",
  "rating": 1,
  "feedbackType": "THUMBS"
}

Analytics ​

Usage Stats ​

http
GET /api/v1/ai/stats

Knowledge Suggestions ​

http
GET /api/v1/ai/suggestions

Lists AI-generated knowledge suggestions based on unanswered questions.

DOLU.ai - AI-Powered CRM Platform