Skip to main content
GET
/
chat-internal-messages
/
{chatId}
/
listen
Listen to Chat Messages (SSE)
curl --request GET \
  --url https://app.splox.io/api/v1/chat-internal-messages/{chatId}/listen \
  --header 'Authorization: Bearer <token>'
"<string>"
Streams real-time events for a chat session via Server-Sent Events (SSE). This is the recommended way to receive live updates when running a workflow through a chat.

Usage

curl -N -H "Authorization: Bearer YOUR_TOKEN" \
  https://app.splox.io/api/v1/chat-internal-messages/{chat_id}/listen

How It Works

  1. Subscribes to the chat’s Redis PubSub channel
  2. Streams workflow request status updates and node execution events
  3. Sends keepalive messages every 3 seconds
  4. Checks workflow status every 5 seconds
  5. Connection times out after 30 minutes

Response Format

Standard SSE format. Events contain workflow request and node execution updates:
data: {"workflow_request":{"id":"...","status":"in_progress",...},"node_execution":{"id":"...","status":"completed",...}}

data: keepalive

data: {"is_active":false,"type":"workflow_status"}

Event Types

EventDescription
Workflow + Node updateContains workflow_request and/or node_execution fields with current status and data
KeepaliveLiteral string keepalive sent every 3 seconds
Workflow status{"is_active":false,"type":"workflow_status"} when a workflow stops

Notes

Authentication required: Users can only listen to their own chats.
Connection timeout: SSE connections timeout after 30 minutes. Reconnect if needed.
The keepalive messages every 3 seconds prevent connection drops from proxies and load balancers.

Authorizations

Authorization
string
header
required

API token generated from your Splox account settings. Create tokens at https://app.splox.io/account?tab=settings

Path Parameters

chatId
string<uuid>
required

Chat ID

Response

200 - text/event-stream

SSE stream of chat events. Includes workflow request status updates and node execution events for the chat session.

The response is of type string.