List Messages

Return a list of messages.

https://app.mojotxt.com/api/v1/{phone_number}/messages/list

Parameters:

Parameters can be sent in the URL querystring or as POST variables.

Parameter Options Description
Sort MessageID, PublishTime, Sent Sort the list by a field.
SortDirection ASC, DESC Sort Ascending or Descending
ListID Any existing ListID Return messages that were sent to a specific list.
Limit Any Integer Limit the results to a certain number of records.
Page Any Integer If Limit is specified, return a certain page of results.
Stats 1, 0 Include statistical information about the message (MessagesSent, LinksClicked)

Example Request:

GET https://app.mojotxt.com/api/v1/+16147052760/messages/list?ListID=173&Stats=1

Example Result:

{
"result": "success",
"timestamp": 1460128901,
"request": {
"phone": "+16147052760",
"object": "messages",
"verb": "list",
"ListID": "173",
"Stats": "1"
},
"record_count": 2,
"records": [
{
"MessageID": 706,
"ScheduleType": "S"
"PublishTime": 1460128835, "SendAfter": null, "SendAfterUnit": null,
"Message": "Test Message",
"URL": null,
"Sent": 0,
"Lists": [
"173",
"174"
],
"MessagesSent": 0, /* Included because of */
"LinksClicked": 0 /* Stats=1 parameter. */
},
{
"MessageID": 704,
"PublishTime": 1460062099, "SendAfter": 3, "SendAfterUnit": "day", "ScheduleType": "R",
"Message": "Thanks for subscribing three days ago!",
"URL": "http:\/\/amazon.com",
"Sent": 1,
"Lists": [
"173"
],
"MessagesSent": 2,
"LinksClicked": 1
}
]
}