List Messages
GET https://{{axpAPIDomain}}/api/digital/channel/v1/accounts/:accountId/engagements/:engagementId/messages?dialogId={{digitalDialogId}}&sessionId={{digitalSessionId}}&pageSize=10&pageNumber=1
List messages that have been exchanged in an active engagement dialog. To receive messages of a live dialog, subscribe using Digital Notification API. Avoid calling this API in a loop
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
dialogId | string | (Required) The unique 36 character internal id that represents the dialog. | |
sessionId | string | (Required) The unique 36 character internal id that represents the session. | |
pageSize | number | The maximum number of results per page. | |
pageNumber | number | The target page of results. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
appkey | string | ||
Accept | string |
RESPONSES
status: OK
{"pagination":{"pageNumber":1,"pageSize":5,"total":7},"messages":[{"messageId":"f314569c-710b-11eb-9439-0242ac130002","accountId":"{{accountId}}","dialogId":"fc741b00-710b-11eb-9439-0242ac130002","engagementId":"d3c8400d-c44f-4451-8316-435ch8c6e3f2","status":"DELIVERED","sessionId":"10494b78-710c-11eb-9439-0242ac130002","businessAccountName":"acme@example.com","channelProviderId":"ChatConnector01","channelId":"Chat","senderParticipantId":"4dc53692-e25c-4e8c-a780-0b2f05008478","senderParticipantName":"John Doe","senderParticipantType":"CUSTOMER","body":{"elementType":"text","elementText":{"text":"I need some help to sell my car","textFormat":"PLAINTEXT"}},"customData":{"sentiment":"Neutral"},"messageIndex":1,"parentMessageId":"5963c0d619a30a2e00de36b8","providerDialogId":"616imlgwg266hjs670nl","providerSenderId":"d29c456135dcbe326e490bb2","providerMessageId":"iwrh1hfbkmj4yb36ijsm","providerParentMessageId":"bgodcec6a9kvn38g46sn","receivedAt":"2018-11-13T20:25:39.534Z","lastUpdatedAt":"2018-11-13T20:25:39.834Z"},{"messageId":"f314569c-710b-11eb-9439-0242ac130002","accountId":"{{accountId}}","dialogId":"fc741b00-710b-11eb-9439-0242ac130002","engagementId":"d3c8400d-c44f-4451-8316-435ch8c6e3f2","status":"DELIVERED","businessAccountName":"acme@example.com","channelProviderId":"ChatConnector01","channelId":"Chat","senderParticipantId":"e3c8400d-c44f-4451-8316-e75c4efb8cc7","senderParticipantName":"Joan Doe","senderParticipantType":"AGENT","body":{"elementType":"text","elementText":{"text":"Sure. How long have you been using it?","textFormat":"PLAINTEXT"}},"customData":{"sentiment":"Neutral"},"messageIndex":2,"parentMessageId":"f26c65ec-ed40-4e9e-9a96-45a089c2107c","providerDialogId":"616imlgwg266hjs670nl","receivedAt":"2018-11-13T20:25:39.534Z","lastUpdatedAt":"2018-11-13T20:25:39.834Z"}],"links":{"prev":"","next":"/api/digital/channel/v1/engagements/d3c8400d-c44f-4451-8316-435ch8c6e3f2/messages?sessionId=10494b78-710c-11eb-9439-0242ac130002\u0026dialogId=fc741b00-710b-11eb-9439-0242ac130002\u0026pageSize=2\u0026pageNumber=21\u0026pageSize=5"}}