GET/sms/conversation

Function


Note the distinction between this and GET/sms/conversations that returns details for all conversations of a phone line. 


The GET/sms/conversation method returns details about a particular SMS conversation for a  telephone line, displaying all the messages exchanged in the conversation. The response has the following fields of information:


  • ID- the ID of each message in the conversation. 
  • new -  a value of 1 indicates new message and a value of  0 indicates an old one.
  • direction - the direction traveled by the messages. Either "in" or "out". Blank indicates both directions.
  • sender - the number of the sender of the message.
  • receiver - the number of the receiver of the message.
  • time - the time the message was sent or received in Unix time stamp format.
  • msgdata - the actual content of an SMS message.
  • sent_by - a name or ID (such as an extension) of the user who sent the SMS.
  • read_by - a name or ID (such as an extension) of the user who read the SMS, if any.
  • seen - A Boolean response. A value of 1 indicates that the message was seen (read) by someone. A value of 0 indicates it has not.


Parameters


All parameters go in the header.


Parameter
Type
Operation
sms_line
string
The SMS line from which the list of conversations are requested.
conversation
stringThe ID for the conversation for which the details are requested - usually this is the other party's number.
 
You obtain this ID using the get/sms/conversations method.
limit
integerSpecify the number of messages to be returned by the request.
offset
integer
Specify the first message to display. For example an offset of 3 will start the list on the 3rd message. If left empty the default will be the first record.


Example


To get the details of conversation for SMS line 646-741-5360 with party with the number 1-917-580-4880 use this syntax:


HTTP method: GET


webserv.telebroad.com/api/teleconsole/rest/sms/conversation?sms_line=16467415360&conversation=19175804880


Result:


    {

        "error":null,

        "result":[{"id":"2159239",
        "new":"0",
        "direction":"in",
        "sender":"19175804880",
        "receiver":"16467415360",
        "time":"1500545016",
        "msgdata":"Hi, I got the report.",
        "sent_by":null,
        "read_by":"",
        "seen":"0"
        },{"id":"2159236",
        "new":"0",
        "direction":"in",
        "sender":"19175804880",
        "receiver":"16467415360",
        "time":"1500544816",
        "msgdata":"Would like to discuss the details",
        "sent_by":null,
        "read_by":"",
        "seen":"0"
        },{"id":"2149875",
        "new":"0",
        "direction":"out",
        "sender":"16467415360",
        "receiver":"19175804880",
        "time":"1500369461",
        "msgdata":"What time is good for you?",
        "sent_by":"13697",
        "read_by":"",
        "seen":"0"
    }]

    }{

        "error":null,

        "result":[{"id":"2159239",
        "new":"0",
        "direction":"in",
        "sender":"19177414880",
        "receiver":"16467415360",
        "time":"1500545016",4
        "msgdata":"Tommorow 11am?",
        "sent_by":null,
        "read_by":"",
        "seen":"0"
     }
     }]

}

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.