BizKitHub
DokumentacjaEksplorator APIChat/api/v1/chat/room/{id}
getdeleteChatPubliczne API v1

/api/v1/chat/room/{id}

Get a chat room with all its messages

chatgetApiV1ChatRoomById

Parametry

1 w ścieżce · 1 w query

Parametry ścieżki

· 1
idstringWymagane

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

Długość: 24
PrzykładZUiVZuKwAaXNoT4nGUbnKR75

Parametry query

· 1
apiKeystringWymagane

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

PrzykładPRODPGrFxpGEtrOZfuWhnoJohUYBXuOE

Schemat odpowiedzi

1 udokumentowany kod statusu

200Sukces
object | object
Jedna z 2 opcji:
Wariant 1
state"ok"Wymagane
roomobjectWymagane
idstringWymagane

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

Długość: 24
PrzykładZUiVZuKwAaXNoT4nGUbnKR75
kind"ai" | "internal" | "external"Wymagane
titlestringWymagane
sourcestring | nullWymagane
modelstring | nullWymagane
ownerContactExternalIdstring | nullWymagane

16-char shop__contact.external_id of the logged-in customer who owns this thread. Null for anonymous threads and member-owned (internal) threads.

ownerContactNamestring | nullWymagane

Display name of the owning contact (first_name + last_name, or company_name as fallback). Null when no owner is set or when the contact has no name fields filled.

externalUserRefstring | nullWymagane
messageCountstring | integerWymagane
Jedna z 2 opcji:
Wariant 1
stringinteger
Domyślnie: 0
Wariant 2
integer
totalTokensstring | integerWymagane
Jedna z 2 opcji:
Wariant 1
stringinteger
Domyślnie: 0
Wariant 2
integer
lastMessageDatestring | nullWymagane
isMarkedProblematicbooleanWymagane

True when the conversation is flagged as a problem case (toggleable).

hasProblematicMessagebooleanWymagane

True when at least one message in the thread is marked problematic.

insertedDatestringWymagane
updatedDatestringWymagane
metadataobjectWymagane
messagesobject[]Wymagane
Każdy element tablicy:
idstringWymagane

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

Długość: 24
positionstring | integerWymagane
Jedna z 2 opcji:
Wariant 1
stringinteger
Domyślnie: 0
Wariant 2
integer
role"user" | "assistant" | "system" | "tool" | "member"Wymagane
contentstringWymagane
modelstring | nullWymagane
inputTokensstring | integerWymagane
Jedna z 2 opcji:
Wariant 1
stringinteger
Domyślnie: 0
Wariant 2
integer
outputTokensstring | integerWymagane
Jedna z 2 opcji:
Wariant 1
stringinteger
Domyślnie: 0
Wariant 2
integer
toolCallsobject[] | nullWymagane
Każdy element tablicy:
object
isMarkedProblematicbooleanWymagane

True when this single turn is flagged problematic (permanent — no untoggle).

insertedDatestringWymagane
metadataobjectWymagane
Wariant 2
state"error"Wymagane
messagestringWymagane
code"200"Wymagane

Przykład odpowiedzi

application/json
{
  "state": "ok",
  "room": {
    "id": "ZUiVZuKwAaXNoT4nGUbnKR75",
    "title": "example_title",
    "isMarkedProblematic": false,
    "hasProblematicMessage": false,
    "insertedDate": "example_insertedDate",
    "updatedDate": "example_updatedDate",
    "metadata": {}
  },
  "messages": [
    {
      "id": "example_id",
      "content": "example_content",
      "isMarkedProblematic": false,
      "insertedDate": "example_insertedDate",
      "metadata": {}
    }
  ]
}

Przykład żądania

GET /api/v1/chat/room/{id}

get
curl -X GET "https://api.bizkithub.com/api/v1/chat/room/ZUiVZuKwAaXNoT4nGUbnKR75?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"

Potrzebujesz klucza API?

Wszystkie publiczne endpointy BizKitHub API uwierzytelniają się kluczem API.

Uzyskaj klucz API