BizKitHub
DokumentationAPI-ExplorerChat/api/v1/chat/ai-turn
postChatÖffentliche API v1

/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

Parameter

1 in der Query · JSON-Body

Query-Parameter

· 1
apiKeystringPflicht

Your 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

BeispielPRODPGrFxpGEtrOZfuWhnoJohUYBXuOE

Request-Body

application/json
questionstringPflicht

The user prompt.

Länge: 1–∞
roomIdstringOptional

Chat room public id (cas__chat_room.external_id), 24 chars.

Länge: 24
BeispielZUiVZuKwAaXNoT4nGUbnKR75
modelstringOptional
Länge: 0–100
sourcestringOptional
Länge: 0–32
externalUserRefstringOptional
Länge: 0–64
contactExternalIdstringOptional
Länge: 16
metadataobjectOptional

Antwortschema

1 dokumentierter Statuscode

200Erfolg
roomIdstringPflicht

Chat room public id (cas__chat_room.external_id), 24 chars.

Länge: 24
BeispielZUiVZuKwAaXNoT4nGUbnKR75
userMessageIdstringPflicht

Chat message public id (cas__chat_message.external_id), 24 chars.

Länge: 24
assistantMessageIdstringPflicht

Chat message public id (cas__chat_message.external_id), 24 chars.

Länge: 24
answerstringPflicht

Antwortbeispiel

application/json
{
  "roomId": "ZUiVZuKwAaXNoT4nGUbnKR75",
  "userMessageId": "example_userMessageId",
  "assistantMessageId": "example_assistantMessageId",
  "answer": "example_answer"
}

Anfragebeispiel

POST /api/v1/chat/ai-turn

post
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": {}
}'

Sie brauchen einen API-Schlüssel?

Alle öffentlichen Endpunkte der BizKitHub-API authentifizieren per API-Schlüssel.

API-Schlüssel erhalten