Contents
- Introduction
- API Methods
- General Information
- Check Availability
- Expected Parameters
- Request Chat
- Get Active Chat
- Send Events
- Get Chat History
- Get New Chat Events
- Upload File
- Get File
- Get Agent Profile Photo
- API Events
- Client Events
- 1 Server Events
- 1.1 Chat Session Status
- 1.2 Chat Session Ended
- 1.3 Chat Session Party Joined
- 1.4 Chat Session Party Left
- 1.5 Chat Session Message
- 1.6 Chat Session Typing
- 1.7 Chat Session Not Typing
- 1.8 Chat Session Form Show
- 1.9 Chat Session Timeout Warning
- 1.10 Chat Session Inactivity Timeout
- 1.11 Chat Session Signaling
- 1.12 Chat Session File
- Signaling Message Types
Server Events
Chat Session Status
Description | Updates current state of the chat session. If state is failed, the client application shall assume that the chat session no longer exists. |
Format | {
“event”: “chat_session_status”, “state”: “queued|connecting|connected|failed|completed”, “ewt”: “estimated waiting time for queued status” } |
Chat Session Ended
Description | Indicates a normal termination of the chat session (e.g., when the chat session is closed by the agent). The client application shall assume that the chat session no longer exists. |
Format | {
“event”: “chat_session_ended” } |
Chat Session Party Joined
Description | Indicates that a new party (a new agent) has joined the chat session. The party_id is a unique identifier of the chat session on the server side. A separate identifier is generated for each party (agent) that handles this chat session. |
Format | {
“event”: “chat_session_party_joined”, “party_id”: “<party id>”, “first_name”: “<party first name>”, “last_name”: “<party last name>”, “display_name”: “<party display name>”, “type”: “<scenario|external|internal>”, “timestamp”: “<UTC timestamp in milliseconds>” } |
Chat Session Party Left
Description | Indicates that one of the existing parties (an agent) has left the chat session. The party_id is a unique identifier of the chat session on the server side. A separate identifier is generated for each party (agent) that handles this chat session. |
Format | {
“event”: “chat_session_party_left”, “party_id”: “<party id>”, “timestamp”: “<UTC timestamp in milliseconds >” } |
Chat Session Message
Description | Contains a new chat message. The msg_id parameter is a unique identifier of the message. The partyId is a unique identifier of the party that sends this message. A separate identifier is generated for each party (agent) that handles this chat session. |
Format | {
“event”: “chat_session_message”, “party_id”: “<party id>”, “msg_id”: “<message id>”, “msg”: “<chat message>”, “timestamp”: “<UTC timestamp in milliseconds >” } |
Chat Session Typing
Description | Sent when the agent starts typing. The party_id is a unique identifier of the chat session on the server side. A separate identifier is generated for each party (agent) that handles this chat session. |
Format | {
“event”: “chat_session_typing”, “party_id”: “<party id>” } |
Chat Session Not Typing
Description | Sent when the agent stops typing. The party_id is a unique identifier of the chat session on the server side. A separate identifier is generated for each party (agent) that handles this chat session. |
Format | {
“event”: “chat_session_not_typing”, “party_id”: “<party id>” } |
Chat Session Form Show
Description | Sent to request user’s input from the client application to be entered via a pre-defined form. The client application is normally supposed to display the specified from to the user and send back the entered data via event Chat Session Form Data. |
Format | {
“event”: “chat_session_form_show”, “form_request_id”: “<request ID that will be used by the client application to associate the response >”, “form_name”: “<predefined form name known to the client application>” “form_timeout”: “form timeout” } |
Chat Session Timeout Warning
Description | Sent to request that the specified text be displayed to the user of the client application. Typically used to display an inactivity warning message. |
Format | {
“event”: “chat_session_timeout_warning”, “msg”: “<warning text>”, “timestamp”: “<UTC timestamp in milliseconds>” } |
Chat Session Inactivity Timeout
Description | Indicates termination of the chat session due to user’s inactivity and provides text to be displayed to the user. The client application shall assume that the chat session no longer exists. |
Format | {
“event”: “chat_session_inactvity_timeout”, “msg”: “<inactivity timeout text>”, “timestamp”: “<UTC timestamp in milliseconds>” } |
Chat Session Signaling
Description | This is a container message for WebRTC signaling messages from server to client. These messages are not stored in the chat session history. |
Format | {
“event”: “chat_session_signaling”, “msg_id”: “<message id>”, “party_id”: “<party_id>”, “data”: “<signaling message>” } |
Chat Session File
Description | Notifies that a file is being sent to the client – the client can use file_id to download the file. The msg_id parameter is a unique identifier of the corresponding message. The partyId is a unique identifier of the party that sends this message. |
Format | {
“event”: “chat_session_file”, “party_id”: “<party id>”, “msg_id”: “<message id>”, “file_id”: “<file id>”, “file_type”: “<image|attachment>”, “timestamp”: “<event time in Unix format>” } |