Send a message to the chatbot and receive the assistant reply, grounded in the selected Knowledge Base.
Send a message to the chatbot and receive the assistant reply, grounded in the selected Knowledge Base.
POST
https://app.softsolz.uk/api/v1/services/smart-chat/messagesRecent Requests
Kept only in this browserTimeStatusTook
Send a request with Try it to see it here.
Headers
AuthorizationstringrequiredBearer token: `Bearer sk_live_...` (or `sk_test_...` for sandbox). A login token will not work here.
Idempotency-KeystringOptional idempotency key for safe retries.
Body Params
messagestringrequiredThe user message / question.
historyarray of objectsPrior turns as { role, content } pairs.
collection_idsarray of stringsKB collection ids to ground in. Falls back to the API key config when omitted.
kb_onlybooleanWhen true (the default), answer strictly from the KB.
include_citationsbooleanWhether to return page-level citations.
Response
Response Body
replystringThe assistant reply text.citationsarray of objectsPage-level KB citations.usageobjectModel token usage.modelstring | nullModel that produced the reply.Request
curl --request POST \ --url https://app.softsolz.uk/api/v1/services/smart-chat/messages \ --header 'Authorization: Bearer sk_live_your_key' \ --header 'Content-Type: application/json' \ --data '{ "message": "What is my total overdue AR?", "history": [], "kb_only": true, "include_citations": true}'Credentials
Sent as a Bearer token and used in the samples above and in Try it. Kept only in this browser tab until you close it. Use an sk_test_ key to stay in your sandbox.
Response · 201
{ "data": { "reply": "Your total overdue AR is GBP 1,240.", "citations": [], "usage": { "prompt_tokens": 540, "completion_tokens": 48, "total_tokens": 588 }, "model": "gpt-4o-mini" }}