GET/sms/conversations

Function


Note the distinction between this and GET/sms/conversation that returns elaborate details for a single conversation.


The GET/sms/conversations method returns a list of all SMS conversations for a particular telephone line with each conversation containing the following fields of information:


  • ID- the ID of the conversation - based on the other party's phone number. This is important for the get/sms/conversation method.
  • new -  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 - name of the sender of the message.
  • receiver - name of the receiver of the message.
  • time - the time the message was sent or received in Unix time stamp format.
  • msgdata - the first message of the conversation (to see all messages you get/sms/conversation)

Parameters


All parameters go in the header.


Parameter
Type
Operation
sms_line
string
The SMS  line from which the list of conversations are requested.
limit
integer
Specify the number of conversations to be returned by the request.
offset
integer
Specify the first record to display. For example an offset of 3 will start the list on the 3rd conversation. If left empty the default will be the first record.


Example


To get the list of conversations for SMS line 646-741-5360 use this syntax:


HTTP method: GET


webserv.telebroad.com/api/teleconsole/rest/sms/conversations?sms_line=16467415360


Response:


{

        "error":null,

        "result":[{"id":"19178775270",
        "idx":"3",
        "new":"0",
        "direction":"in",
        "sender":"19178775270",
        "receiver":"16467415360",
        "time":"1500545016",
        "msgdata":"hey, call me when you have time",
        "sent_by":null,
        "read_by":"",
        "seen":"0",
        "lid":"2159239"
    }]

    }{

        "error":null,

        "result":[{"id":"13108614410",
        "idx":"3",
        "new":"0",
        "direction":"in",
        "sender":"13108614410",
        "receiver":"16467415360",
        "time":"1500545016",
        "msgdata":"Report is ready for you.",
        "sent_by":null,
        "read_by":"",
        "seen":"0",
        "lid":"2159239"
    }]

Did you find it helpful? Yes No

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