SoftSolzSoftSolz
HomeAPI GuideAPI ReferenceWidget Tester
Knowledge Hub

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.

POSThttps://app.softsolz.uk/api/v1/services/smart-chat/messages

Recent Requests

Kept only in this browser
TimeStatusTook
Send a request with Try it to see it here.

Headers

Authorizationstringrequired

Bearer token: `Bearer sk_live_...` (or `sk_test_...` for sandbox). A login token will not work here.

Idempotency-Keystring

Optional idempotency key for safe retries.

Body Params

messagestringrequired

The user message / question.

historyarray of objects

Prior turns as { role, content } pairs.

collection_idsarray of strings

KB collection ids to ground in. Falls back to the API key config when omitted.

kb_onlyboolean

When true (the default), answer strictly from the KB.

include_citationsboolean

Whether 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"
}
}