Newer Version Available
Messages
Returns all messages that were sent between agents and
chat visitors during a chat session.
For a complete list of responses for the Messages resource, see Live Agent REST API Messages Response Objects.
Syntax
- URI
- https://hostname/chat/rest/System/Messages
- Available since release
- This resource is available in API versions 29.0 and later.
- Formats
- JSON
- HTTP methods
- GET
- Request headers
- X-LIVEAGENT-API-VERSION
- X-LIVEAGENT-AFFINITY
- X-LIVEAGENT-SESSION-KEY
- Request parameters
- None
- Query parameters
- ack—The ack query parameter is a sequencing mechanism that allows you to poll for messages on the Live Agent server. The first time you make the Messages request, the ack parameter is set to –1. To guarantee that you receive the messages from the server in the correct order, update the ack value in the next request with the sequence value from the preceding response. You receive a sequence value only if the response code is 200, which is the response if there are new messages. If the response code is 204, there are no messages and the client doesn't provide a sequence value. In this case, run the Messages request with the same ack value as the previous request.
- Request body
- None
- Response body
- Messages response