Response Bodies for Chat REST API
A request to a Chat REST API resource returns a response code. The successful execution of a resource request can also return a response body in JSON format.
The legacy chat product is scheduled for retirement on February 14, 2026, and is in maintenance mode until then. During this phase, you can continue to use chat, but we no longer recommend that you implement new chat channels. To avoid service interruptions to your customers, migrate to Messaging for In-App and Web. Messaging offers many of the chat features that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in Help.
Response Properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
results | Array of Result objects | A list of Salesforce IDs that correspond to agents and chat buttons and their respective availability to receive new chat requests. | 29.0 |
Response body
Response Properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
queuePosition | integer | The position of the chat visitor in the chat queue. | 29.0 |
geoLocation | GeoLocation object | The chat visitor’s location, based on the IP address from which the request originated. | 29.0 |
url | String | The URL that the chat visitor is visiting. | 29.0 |
oref | String | The original URL that the chat request came from. | 29.0 |
postChatUrl | String | The URL to which to redirect the chat visitor after the chat has ended. | 29.0 |
sneakPeekEnabled | Boolean | Whether Sneak Peek is enabled for the agent who accepts the chat. | 29.0 |
chatMessages | Array of TranscriptEntry objects | The chat message structure that’s synchronized across the agent.js and chasitor.js files. | 29.0 |
Response body
Response properties
| Property Name | Type | Description | Available Versions |
idleTimeoutWarningEvent | String | Informs the server when a warning is triggered or cleared. Possible values: triggered and cleared. | 35.0 |
Response properties
| Property Name | Type | Description | Available Versions |
reason | String | The reason that the chat ended. | 29.0 |
attachedRecords | String | Returns a list of record IDs mapped to the chat’s transcript object with the corresponding transcript field names containing those mappings. This mapping data is useful for enhancing your post chat implementation. Available if post-chat is enabled on the chat button. If the client uses attachedRecords post chat and a chasitor ends the chat without the client receiving the ChatEnded response, call Messages again after calling ChatEnd. | 29.0 |
Response properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
name | String | The name of the agent who is engaged in the chat. | 29.0 |
userId | String | The user ID of the agent who is engaged in the chat. | 29.0 |
sneakPeekEnabled | Boolean | Whether Sneak Peek is enabled for the agent who accepts the chat. | 29.0 |
chasitorIdletimeout | ChasitorIdleTimeoutSettings | Gives the settings for chat visitor idle time-out. | 35.0 |
Response body
Response properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
name | String | The name of the agent who is engaged in the chat. | 29.0 |
text | String | The text of the chat message that the agent sent to the chat visitor. | 29.0 |
Response body
Response properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
reason | String | The reason why the chat request failed—for example, no agents were available to chat or an internal error occurred. | 29.0 |
postChatUrl | String | The URL of the post-chat page to which to redirect the chat visitor after the chat has ended. | 29.0 |
Response body
Response properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
queuePosition | integer | The position of the chat visitor in the chat queue. | 29.0 |
estimatedWaitTime | number | The estimated wait time for the button in seconds. If the server cannot retrieve the wait time, this property returns -1. | 47.0 |
geoLocation | GeoLocation object | The chat visitor’s location, based on the IP address from which the request originated. | 29.0 |
url | String | The URL that the chat visitor is visiting. | 29.0 |
oref | String | The original URL that the chat request came from. | 29.0 |
postChatUrl | String | The URL to which to redirect the chat visitor after the chat has ended. | 29.0 |
customDetails | Array of CustomDetail objects | The custom details of the deployment from which the chat request was initiated. | 29.0 |
visitorId | String | The ID of the chat visitor. | 29.0 |
Response body
Response properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
name | String | The name of the agent to whom the chat was transferred. | 29.0 |
userId | String | The ID of the chat visitor. | 29.0 |
sneakPeekEnabled | Boolean | Whether Sneak Peek is enabled for the agent to whom the chat was transferred. | 29.0 |
chasitorIdletimeout | ChasitorIdleTimeoutSettings | Gives the settings for chat visitor idle time-out. | 35.0 |
Response body
Response properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
type | String | The type of custom event that occurred, used for adding the event listener on the chat visitor’s side. | 29.0 |
data | String | Data that’s relevant to the event that was sent to the chat visitor. | 29.0 |
Response body
Response Properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
messages | Array of Message objects | The messages that were sent over the course of a chat. | 29.0 |
offset | integer | An internal number to be used with a ReconnectSession request that tracks which messages your client has received. | 29.0 |
sequence | integer | The sequence of the message as it was received over the course of a chat. | 29.0 |
Response body
Response properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
location | String | The URL of the web page that the chat visitor is viewing. | 29.0 |
Response body
Response properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
position | integer | The updated position of the chat visitor in the chat queue. | 29.0 |
estimatedWaitTime | number | The estimated wait time for the button in seconds. If the server cannot retrieve the wait time, this property returns -1. | 47.0 |
Response body
Response properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
resetSequence | Boolean | If true, the sequence for the next request should be reset. | 37.0 |
affinityToken | String | The affinity token for the session that’s passed in the header for all future requests. | 37.0 |
Response body
Response Properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
sensitiveDataRules | SensitiveDataRule object | List of sensitive data rules and their details. | 29.0 |
Response body
Response Properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
id | String | The session ID for the new session. | 29.0 |
key | String | The session key for the new session. | 29.0 |
affinityToken | String | The affinity token for the session that’s passed in the header for all future requests. | 29.0 |
clientPollTimeout | integer | The number of seconds before you must make a Messages request before your Messages long polling loop times out and is terminated. | 29.0 |
Response body
Response Properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
pingrate | number | The rate at which the visitor must ping the server to maintain the Chat visitor session. | 29.0 |
contentServerUrl | String | The URL of the content server. | 29.0 |
buttons | Array of button objects | A list of chat buttons, along with their settings information, that were specified when you made the Settings request. | 29.0 |
Response body
This response is returned for requests to Visitor resources if the Live Agent instance URL is not correct for the Organization ID provided.
Response Properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
newUrl | String | The new Chat API endpoint for your org if your org is moved. It can be moved due to a planned org migration or during a Site Switch to a different instance. | 29.0 |
Response body
Where LIVE_AGENT_POOL is a variable.
Response Properties
| Property Name | Type | Description | Available Versions |
|---|---|---|---|
sessionId | String | The session ID for the new session. | 29.0 |
Response body
See Also