PingBack’s real-time layer is built on Socket.IO with a Redis backplane. All live features — new messages, typing indicators, delivery receipts, and agent status — flow through this connection.Documentation Index
Fetch the complete documentation index at: https://docs.pingback.live/llms.txt
Use this file to discover all available pages before exploring further.
Socket.IO supports both WebSocket and long-polling transports. PingBack uses WebSocket by default and falls back to polling automatically when WebSocket is unavailable.
Connect
Connect tohttps://api.pingback.live and pass your business_id in the auth handshake object. PingBack rejects connections that do not include a business_id.
Room system
PingBack uses rooms to scope events to the right audience. Join a room to start receiving its events.| Room | Purpose |
|---|---|
business_{business_id} | Org-wide events for your entire workspace. |
conversation_{conversation_id} | Events scoped to a single conversation. |
join_conversation:
Events to listen for (server → client)
These events are emitted by the server. Listen for them in your client.new_message
Fires when any participant in the conversation sends a message.
Payload:
| Field | Type | Description |
|---|---|---|
id | number | Message ID. |
content | string | Message text (or file URL for attachments). |
sender_type | string | "customer" or "agent". |
conversation_id | number | The conversation this message belongs to. |
created_at | string | ISO 8601 timestamp. |
typing
Fires when a participant starts or stops typing.
Payload: { conversation_id, user_id, is_typing }
delivered
Fires when a message is marked as delivered.
Payload: { message_id, delivered_at }
read
Fires when a message is marked as read.
Payload: { message_id, read_at }
agent_status_changed
Fires when an agent’s online status changes.
Payload: { agent_id, status }
conversation_assigned
Fires when a conversation is assigned to an agent.
Payload: { conversation_id, assigned_by }
Events to emit (client → server)
These events are sent from your client to PingBack.join_conversation
Join a conversation room to receive its events.
Payload: { conversation_id: number }
client_message
Send a message from the customer widget. PingBack creates a new conversation automatically if conversation_id is omitted.
Payload:
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | The message text. |
conversation_id | number | No | Include to continue an existing conversation. |
customer_data | object | Yes | { name: string, email: string } — identifies the customer. |
typing
Broadcast a typing indicator to all participants in the conversation.
Payload: { conversation_id: number, user_id: number, is_typing: boolean }