Overview
Socket.IO enables real-time bidirectional communication between your application and the Helpdesk system. This allows instant messaging, voice calls, live notifications, and seamless customer support experiences.Connection
Authentication
Connect to the Socket.IO server using your API key:Connection Response
Upon successful connection, you’ll receive:status_code 400 or 401.
Response Envelope
All event responses follow this envelope:Event Flow
Enter Customer Room
Call
enter_customer_support with the customer’s session ID immediately after connecting. This subscribes the customer to their personal room so they can receive messages from agents even before a conversation starts.Send & Receive Messages
Use
support to send customer messages. Listen on support for SATE (AI) replies and on customer_support for agent replies.Join Conversation Room
After the first message returns a
ticket_chat_id, call enter_support to subscribe to that conversation room for all subsequent broadcasts.Voice Calls (optional)
Use
call_support to start a voice call with SATE and close_call_support to end it.Events Reference
Emitting Events (Client → Server)
Enter Customer Room
Subscribe the customer to their personal room. Call this immediately after connecting so the customer can receive agent messages (customer_support) and auto-close notifications (customer_support_closed) regardless of which conversation is active.
Event Name: enter_customer_support
Request Schema
Unique identifier for the customer — use the same value you send in the
support eventExample Request
Response Schema
Enter Conversation Room
Join a specific conversation room to receive real-time updates for that conversation. Event Name:enter_support
Call this after the first
support response returns a ticket_chat_id. You only need to call it once per conversation.Request Schema
The conversation ID returned from the first
support responseExample Request
Response Schema
Leave Conversation Room
Unsubscribe from a conversation room. Event Name:leave_support
Request Schema
The conversation ID to leave
Example Request
Response Schema
Send Message
The primary event for sending customer messages. SATE (AI) replies come back on thesupport event; agent replies come on customer_support.
Event Name: support
Request Schema
Unique identifier for the customer
The message content to send
Whether this message includes an attachment
Conversation ID. Set to
null for the first message in a new conversation; use the returned ID for all follow-ups.Attachment details. Required when
attachment is true.Example Request
Response Schema
After sending, the server emits two separate events: 1.support_echo — Acknowledges that your message was received and queued:
support — The AI or agent reply, broadcast to the conversation room:
200 for success
Session identifier
Status message
Response data
data object:
The reply message from SATE or an agent
Conversation ID — store this from the first response to continue the conversation
Who sent the reply:
"sate" or "agent"Whether the reply includes an attachment
Attachment details if present
true when SATE signals that the issue appears resolved and the conversation can be closedtrue when the conversation has been confirmed closedISO 8601 timestamp
ISO 8601 timestamp
Example Response
When
close_support is true but closed_support is false, SATE is suggesting the issue looks resolved. Ask the customer to confirm, then call close_support if they agree.Important Notes
- New conversations: Set
ticket_chat_idtonull. Save theticket_chat_idfrom the response — you need it for every follow-up message. - Conversation limit: Each customer session can have a maximum of 3 open conversations at a time.
- Attachments: Only available when the responder is
"agent". SATE does not send attachments.
Mark Conversation Read
Mark all messages in a conversation as read by the customer. Event Name:mark_conversation_read
Request Schema
The conversation ID to mark as read
Who is marking as read. Always use
"customer" for customer-side integrations.Example Request
Response Schema
Start Voice Call
Initiate a voice call with SATE. The server responds with a LiveKit token you use to join the audio room. Event Name:call_support
Request Schema
Unique identifier for the customer
Existing conversation ID. Set to
null to start a new conversation via call.Example Request
Response Schema
The server broadcasts acall_support event to the conversation room with the call details:
LiveKit access token — use this with the LiveKit SDK to join the voice room
LiveKit room name (matches the
ticket_chat_id)Conversation ID
Unique ID for this call
ISO 8601 timestamp of when the call started
Example Response
Important Notes
- Availability: Voice calls are only available while SATE is the active responder and no other call is in progress.
- Voice room: Pass the
tokento the LiveKit client SDK to connect to the audio room. - Room name: The LiveKit room name is the same as
ticket_chat_id.
End Voice Call
End an active voice call. Event Name:close_call_support
Request Schema
The conversation ID for the active call
Example Request
Response Schema
The server broadcasts aclose_call_support event to the conversation room:
LiveKit room name
Conversation ID
Call ID —
null if no active call was foundISO 8601 call start timestamp
ISO 8601 call end timestamp
Example Response
Close Conversation
End a conversation when the issue is resolved. Event Name:close_support
Call this only after SATE sets
close_support: true in a message and the customer confirms they want to end the conversation.Request Schema
The conversation ID to close
Example Request
Response Schema
Review Support
Collect customer feedback after a conversation ends. Event Name:review_support
Request Schema
The conversation ID to review
Customer rating:
"1", "2", "3", "4", or "5"Optional customer feedback text
Example Request
Response Schema
Server Broadcasts (Server → Client)
These are events the server pushes to your client. Set up listeners for them to handle real-time updates.Agent Message Received
Fired when a human agent sends a reply. Agent messages arrive on this event — not onsupport — so you must listen on both.
Listen On: customer_support
This event is delivered to the customer’s personal room (set up via
enter_customer_support), so it works even before the customer has joined a specific conversation room.Response Schema
Agent’s reply message
Conversation ID
Always
"agent" for this eventWhether the message includes an attachment
Attachment details if present
Whether the agent is suggesting closure
Whether the conversation is closed
ISO 8601 timestamp
ISO 8601 timestamp
Example
Conversation Auto-Closed
Fired when SATE closes a conversation automatically — without waiting for the customer to confirm. Update your UI to reflect the closed state. Listen On:customer_support_closed
Response Schema
The parent ticket ID
The conversation ID that was closed
Updated ticket status
Example
Handler Changed
Fired when a human agent takes over a conversation from SATE. Use this to show a notification like “You are now chatting with a human agent.” Listen On:support_handler_changed
Response Schema
The conversation ID
The new handler type:
"agent"Details of the agent who took over
agent object:
Agent’s unique ID
Agent’s display name
Example
SATE Left Call
Fired when SATE disconnects from an active voice call. Handle this to update your call UI and give the customer the option to end or wait. Listen On:sate_left_call
Response Schema
The conversation ID
The call ID
Example
Implementation Example
A complete example showing the full conversation and call flow:Next Steps
- Complete API Reference for HTTP endpoints
- SDK Integration for easier implementation