/api/v1/chat/ai-turn
Persists both messages in cas__chat_message and returns the answer + ids. Creates the room when roomId is omitted.
chatpostApiV1ChatAi-turn
Parameters
1 query · 7 body
Query · 1
apiKeystringRequiredYour BizKitHub API key (passed as GET parameter).
Key format: A 32-character string matching: ^(PROD|DEV_|ROOT)[A-Za-z0-9]{28}$
Prefixes: PROD (production key), DEV_ (individual developer), ROOT (system key with no limits). Learn more
Body · 7
questionstringRequiredThe user prompt.
Length: 1–∞
roomIdstringChat room public id (cas__chat_room.external_id), 24 chars.
Length: 24–24
modelstringLength: 0–100
sourcestringLength: 0–32
externalUserRefstringLength: 0–64
contactExternalIdstringLength: 16–16
metadataobjectRequest
POST /api/v1/chat/ai-turn
curl -X POST "https://api.bizkithub.com/api/v1/chat/ai-turn?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"question": "example_question",
"roomId": "ZUiVZuKwAaXNoT4nGUbnKR75",
"model": "example_model",
"source": "example_source",
"externalUserRef": "example_externalUserRef",
"contactExternalId": "example_contactExternalId",
"metadata": {}
}'Response
JSON payload
{
"roomId": "ZUiVZuKwAaXNoT4nGUbnKR75",
"userMessageId": "example_userMessageId",
"assistantMessageId": "example_assistantMessageId",
"answer": "example_answer"
}All response codes
1 status code documented
Need an API key?
All BizKitHub API endpoints require authentication via API key.