https://app.mojotxt.com/api/v1/{phone_number}/messages/list
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. |
| ScheduleType | S, R | Return only messages with this ScheduleType. |
| Sent | One or more Sent status values | Return only messages with these Sent status values (for example, Sent=0,2). |
| 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. The first set of results is page 1. |
| Stats | 1, 0 | Include statistical information about the message (MessagesSent, LinksClicked) |
GET https://app.mojotxt.com/api/v1/+15555550100/messages/list?ListID=173&Stats=1
{
"result": "success",
"timestamp": 1793491200,
"request": {
"ListID": "173",
"Stats": "1",
"object": "messages",
"verb": "list",
"phone": "+15555550100"
},
"record_count": 2,
"records": [
{
"MessageID": 706,
"UserID": null,
"ScheduleType": "S",
"PublishTime": 1893456000,
"SendAfter": null,
"SendAfterUnit": null,
"SendTime": null,
"SendWeekday": null,
"Type": "SMS",
"Message": "Test Message",
"URL": null,
"Media": null,
"Sent": 0,
"StatusMessage": null,
"Lists": [
173,
174
],
"MessagesSent": 0, /* Included because of */
"LinksClicked": 0 /* Stats=1 parameter. */
},
{
"MessageID": 704,
"UserID": null,
"ScheduleType": "R",
"PublishTime": 1790062099,
"SendAfter": 3,
"SendAfterUnit": "day",
"SendTime": null,
"SendWeekday": null,
"Type": "SMS",
"Message": "Thanks for subscribing three days ago!",
"URL": "https://example.com",
"Media": null,
"Sent": 1,
"StatusMessage": null,
"Lists": [
173
],
"MessagesSent": 2,
"LinksClicked": 1
}
]
}