GET/api/global-chatbot/demo/history
Loads the existing message history of a demo chat session — used when the demo widget is reopened so the conversation history is not lost.
`GET /api/global-chatbot/demo/history` retrieves the existing messages of a public demo-chat session. It is used when the demo widget is reopened or the page is refreshed and the browser needs to rebuild the visible conversation. The endpoint requires two query parameters: `session_id` and `visitor_id`. Both values must come from the same demo flow. Mixing identifiers from different sessions does not create a valid history request. No authentication header is required. The operation is idempotent and read-only: repeating the same valid request does not add messages or change the session state. A client should store the two identifiers locally for the duration of the demo session and call the history endpoint before rendering a previously used conversation. If the response contains messages, they should be displayed in the order returned by the server, preserving sender information and available timestamps. Missing parameters should be handled as a request error, not as an empty conversation. If the identifiers are unknown or no longer valid, the client should start a new demo session through the appropriate demo route instead of inventing replacement values. The history endpoint is not responsible for creating sessions, sending messages or polling for new asynchronous replies. A realistic flow is: the visitor opens the demo, receives a session ID and visitor ID, sends several messages and closes the browser tab. On the next visit, the frontend reads the stored values and requests `/api/global-chatbot/demo/history?session_id=...&visitor_id=...`. If the session is still available, the server returns the previous messages and the widget continues from that context. The identifiers should not be written into public analytics events or verbose browser logs. Even in a demo environment, they connect a request to a specific conversation. The response is intended for the demo interface only and does not include tenant administration, private customer records or a historical availability guarantee. Clients should also avoid aggressive repeated calls; history is loaded when needed, while new messages are handled through the dedicated poll endpoint.
Auth & Security
No authentication required
Idempotent: Yes
Parameters
session_id(query, string, required)visitor_id(query, string, required)Example Response
{"ok":true,"data":{"messages":[{"id":"f248d929-c9ce-412d-aba8-43808ca1c9f7","role":"user","text":"Hello, what does Zentor cost?","created_at":"2026-07-20T17:07:02.240Z"},{"id":"3c26b6a6-4ca6-47a9-9669-a052082007ac","role":"assistant","text":"Ich kann dir zeigen, wie das für deinen Anwendungsfall aussehen würde — ohne Verpflichtung.","created_at":"2026-07-20T17:07:02.329Z"}]}}Error Codes
400 PARAMS_REQUIRED — session_id and/or visitor_id are missing.Live Test Proof
Success (200, real message history of a session previously created via demo.chat) and negative case (400) live-verified.