curl --request POST \
--url https://api.cleartalk.ai/knowledge-base/chat \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"messages": [
{
"role": "user",
"content": "What is your refund policy?"
}
],
"knowledge_base_id": "kb_01H8X9QK5R2N7P3M6Z8N4Y1V7V",
"type": "web"
}
'curl --request POST \
--url https://api.cleartalk.ai/knowledge-base/chat \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"messages": [
{
"role": "user",
"content": "What is your refund policy?"
}
],
"knowledge_base_id": "kb_01H8X9QK5R2N7P3M6Z8N4Y1V7V",
"type": "web"
}
'API Key for authentication
Array of chat messages for conversational context
Show child attributes
[
{
"role": "user",
"content": "What is your refund policy?"
}
]The ID of the knowledge base to query against
"kb_01H8X9QK5R2N7P3M6Z8N4Y1V7V"
Type of query
"web"
Chat response generated successfully