Jump to: navigation, search

GetMessages

This operation is part of the SMS Session API portion of the Web Services API.

Overview

The request returns SMS session messages from the specified interaction.

Request URL /api/v2/me/smsessions/{interactionId}/messages?startIndex={startIndex}&count={count}
HTTP Method GET
Required Features api-multimedia

Parameters

Parameter Value
startIndex This optional parameter specifies the index of the first returned message. Valid values: any positive integer, 0 has the same effect as 1. Default value: 1.
count This optional parameter specifies the count of messages that should be returned. Valid values: any positive integer, 0 means that all messages should be returned. Default value: 0.

Sample

GET api/v2/me/smsessions/00016aB9HMKK0027/messages?startIndex=0&count=4
<source lang="text">

HTTP Response

 {
     "statusCode": 0,
     "messages": [
         {
             "from": {
                 "id": "0093569F7C6A0067",
                 "nickname": "FirstStep",
                 "participantId": "0093569F7C6A0067",
                 "type": "Customer",
                 "visibility": "All"
             },
             "index": 1,
             "timestamp": "2016-01-20 14:24:10.000+0200",
             "timestampSeconds": 1453292650000L,
             "type": "ParticipantJoined",
             "visibility": "All"
         },
         {
             "from": {
                 "id": "0093569F7C6E0069",
                 "nickname": "PoD service",
                 "participantId": "0093569F7C6E0069",
                 "type": "External",
                 "visibility": "All"
             },
             "index": 2,
             "timestamp": "2016-01-20 14:24:14.000+0200",
             "timestampSeconds": 1453292654000L,
             "type": "ParticipantJoined",
             "visibility": "All"
         },
         {
             "from": {
                 "id": "0093569F7C6E0069",
                 "nickname": "PoD service",
                 "participantId": "0093569F7C6E0069",
                 "type": "External",
                 "visibility": "All"
             },
             "index": 3,
             "text": "agent will be with you shortly ...",
             "timestamp": "2016-01-20 14:24:14.000+0200",
             "timestampSeconds": 1453292654000L,
             "type": "Text",
             "visibility": "All"
         },
         {
             "from": {
                 "id": "0093569F7C72006A",
                 "nickname": "TestName",
                 "participantId": "0093569F7C72006A",
                 "path": "/users/2a6c3acf44d1493b92f731db7246b39d",
                 "type": "Agent",
                 "uri": "http://localhost:8090/api/v2/users/2a6c3acf44d1493b92f731db7246b39d",
                 "visibility": "All"
             }, 
             "index": 4,
             "timestamp": "2016-01-20 14:24:18.000+0200",
             "timestampSeconds": 1453292658000L,
             "type": "ParticipantJoined",
             "visibility": "All"
         }
     ] 
 }
This page was last edited on November 4, 2016, at 17:53.
Comments or questions about this documentation? Contact us for support!