Jump to: navigation, search

SMS Session Resource

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

Overview

The SMS session resource includes properties that describe the current state of the SMS session and the available operations given the current state. A full description of the properties included on the SMS session resource and their possible values can be found here.


Request URL /api/v2/me/smssessions?fields=*
HTTP Method GET
Required Features api-multimedia-chat

Sample Data

GET /api/v2/me/smssessions?fields=*
{
            "state": "Chatting",
            "id": "0000Na9B26EF002G",
            "uri": "http://localhost:8080/api/v2/smssessions/0000Na9B26EF002G",
            "participants": [
                {
                    "type": "Agent",
                    "nickname": "Agent1",
                    "participantId": "009052BDEE4A003E"
                },
                {
                    "type": "Customer",
                    "nickname": "PersonP",
                    "participantId": "009052BDEE39003C"
                }
            ],
           "capabilities": [
              "AttachUserData",
              "UpdateUserData",
              "DeleteUserData",
              "Leave",
              "LeaveAndComplete",
              "Transfer",
              "Invite",
              "Consult"
           ],
          "userData": {
          }
 
}

Messages

To get messages for a particular SMS session the following URI needs to be called:

Request URL /api/v2/me/smssessions/{smssessionId}/messages
HTTP Method GET
Required Features api-multimedia-chat

Optional URL parameters are startIndex and count.

Message Types

Type Description
Text Message text is placed into the text field.
ParticipantJoined A participant joined the chat. The participant's information is placed into the from field.
ParticipantLeft The participant left the chat. The participant's information is placed into the from field.
ParticipantRejoined The participant rejoined the chat. The participant's information is placed into the from field.
TypingStarted The participant started typing. If typing preview is enabled, the message text is placed into the text field.
TypingStopped The participant stopped typing.
PushUrl The participant sent a URL. The URL is placed into the url field.
Notice The notice text is placed into the text field (optional).
TranscriptSaveDone The service message type. The index field always equals -1.

Sample Data

GET /api/v2/me/smssessions/009052BDEE39003A/messages?startIndex=1&count=10
{
"messages": [
        {
            "index": 1,
            "type": "ParticipantJoined",
            "from": {
                "type": "Customer",
                "nickname": "PersonP",
                "participantId": "009052BDEE39003C"
            },
            "visibility": "All",
            "timestamp": "2013-12-27T13:16:41.000-0800"
        },
        {
            "index": 2,
            "type": "ParticipantJoined",
            "from": {
                "type": "Agent",
                "nickname": "Agent1",
                "participantId": "009052BDEE4A003E"
            },
            "visibility": "All",
            "timestamp": "2013-12-27T13:16:41.018-0800"
        },
        {
            "index": 3,
            "type": "TypingStarted",
            "from": {
                "type": "Customer",
                "nickname": "PersonP",
                "participantId": "009052BDEE39003C"
            },
            "visibility": "All",
            "timestamp": "2013-12-27T13:16:41.186-0800"
        },
        {
            "index": 4,
            "type": "Text",
            "from": {
                "type": "Customer",
                "nickname": "PersonP",
                "participantId": "009052BDEE39003C"
            },
            "text": "dddd",
            "visibility": "All",
            "timestamp": "2013-12-27T13:16:41.187-0800"
        }
    ]
}
This page was last edited on October 31, 2023, at 13:31.
Comments or questions about this documentation? Contact us for support!