BizKitHub
DocsAPI ReferenceChat/bff/chat/persist-turn
postChatAdmin BFF

/bff/chat/persist-turn

Use this when the AI answer was generated client-side (e.g. via SSE streaming) and you only need to write the audit trail without re-calling the model.

ChatpostBffChatPersist-turn

Parameters

JSON body

Request body

application/json
questionstringRequired
Length: 1
answerstringRequired
Length: 1
roomIdstringOptional
Length: 2424
modelstringOptional
Length: 0100
sourcestringOptional
Length: 032
externalUserRefstringOptional
Length: 064
inputTokensstring | integerOptional
One of 2:
Variant 1
stringinteger
Default: 0
Variant 2
integer
Range: 0
outputTokensstring | integerOptional
One of 2:
Variant 1
stringinteger
Default: 0
Variant 2
integer
Range: 0
toolCallsobject[]Optional

Optional tool-call trace to attach to the assistant message. Each item is a flexible object; the /conversation UI expects at least {toolCallId, toolName, args?, result?, state?} shape.

Each array item:
object
metadataobjectOptional

Response schema

1 status code documented

200Success
roomIdstringRequired
Length: 2424
userMessageIdstringRequired
Length: 2424
assistantMessageIdstringRequired
Length: 2424

Response example

application/json
{
  "roomId": "example_roomId",
  "userMessageId": "example_userMessageId",
  "assistantMessageId": "example_assistantMessageId"
}

Request example

POST /bff/chat/persist-turn

post
curl -X POST "https://api.bizkithub.com/bff/chat/persist-turn" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "question": "example_question",
  "answer": "example_answer",
  "roomId": "example_roomId",
  "model": "example_model",
  "source": "example_source",
  "externalUserRef": "example_externalUserRef",
  "toolCalls": [
    {}
  ],
  "metadata": {}
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key