GET/api/public/widget/history
Loads the message history of an ongoing widget conversation, e.g. after a page reload.
Auth & Security
Widget embed token (X-Widget-Token header) + origin allowlist
Idempotent: Yes
Parameters
widget_code(query, string, required)session_id(query, string, required)visitor_id(query, string, required)Example Response
{"ok":true,"data":{"messages":[{"role":"user","text":"Hello...","created_at":"..."},{"role":"assistant","text":"...","created_at":"..."}]}}Error Codes
400 PARAMS_REQUIRED — session_id and/or visitor_id is missing.Live Test Proof
Success (200, real message history) and negative case (400) verified live.