WebSocket (SSE)
Establishes a Server-Sent Events (SSE) connection for real-time updates. Despite the name “WebSocket”, this endpoint uses the SSE standard for unidirectional real-time data flow from server to client.
GET /api/agents/chat/websocket
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
visitor_id | string | Yes | UUID of the visitor. |
site_id | string | Yes | UUID of the site. |
agent_id | string | No | UUID of the agent (optional). |
conversation_id | string | No | UUID of an existing conversation to resume. |
Response
Returns a text/event-stream connection. Events sent include:
connected: Connection established.history: Conversation history.new_message: New message added to the conversation.ping: Keep-alive heartbeat.
Last updated on