Maintenance Notice - PDF Generation
Dynamic PDF generation for web-based content is temporarily unavailable. This maintenance affects dynamic PDF files that are generated from either the HTML-based page or manual that you are viewing. Links that normally allow this functionality have been hidden, and will reappear as soon as the feature is restored.


Note: Access to static files, including PDF files that are not dynamically generated from our web-based content, is unaffected.

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 November 4, 2016, at 17:54.

Feedback

Comment on this article:

blog comments powered by Disqus