List Subscribers

Return a list of all subscribers in an account.

https://app.mojotxt.com/api/v1/subscribers/list

Return only the subscribers who have interacted (sent or received a message) with a specific phone number.

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

Parameters:

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

Parameter Options Description
ListID ID of Subscription List object If set, only people who have subscribed to the specified Subscription List will be returned. (Note: Specifying a ListID overrides the {phone_number} parameter in the URL)
EmailKnown 1, 0 If set to 1, only subscribers with a known email address will be returned. (Useful for adding people to an email list.)
NameKnown 1, 0 If set to 1, only subscribers with a known first name will be returned. (Useful to avoid exporting people with empty profiles.)
Sort PhoneID, PhoneNumber, FirstName, LastName, Email, Address, City, State, Zip, Subscribed*, FirstUsage**, LastUsage** Sort the list by a field.
* Subscribed only available if the ListID parameter is used
** FirstUsage & LastUsage only available if a phone number is used in the URL and the ListID parameter is not set.
SortDirection ASC, DESC Sort Ascending or Descending
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.

Example Request:

Get a list of all the subscribers in your account.

GET https://app.mojotxt.com/api/v1/subscribers/list

Example Result:

{
"result": "success",
"timestamp": 1486074163,
"request": {
"object": "subscribers",
"verb": "list"
},
"record_count": 72,
"records": [
{
"id": 6024,
"PhoneNumber": "+12165551234",
"FirstName": "Bob",
"LastName": "Parsons",
"Email": "bob@me.com",
"Address": "123 Main St.",
"City": "Cleveland",
"State": "OH",
"Zip": "43562"
},
{
"id": 6025,
"PhoneNumber": "+12165554444",
"FirstName": null,
"LastName": null,
"Email": null,
"Address": null,
"City": null,
"State": null,
"Zip": null
} /*...*/ ] }

Example Request:

If including a phone number, the API will get a list of all the subscribers who have interacted with that specific phone number.

GET https://app.mojotxt.com/api/v1/+18443116859/subscribers/list

Example Result:

{
"result": "success",
"timestamp": 1486130808,
"request": {
"phone": "+18443116859",
"object": "subscribers",
"verb": "list"
},
"record_count": 2,
"records": [ {
"id": 6024,
"PhoneNumber": "+12165551234",
"FirstName": "Bob",
"LastName": "Parsons",
"Email": "bob@me.com",
"Address": "123 Main St.",
"City": "Cleveland",
"State": "OH",
"Zip": "43562", "FirstUsage": 1485527390, /* The first time this user interacted with this phone number. */
"LastUsage": 1485527641 /* The most recent time this user interacted with this phone number. */
},
{
"id": 6025,
"PhoneNumber": "+12165554444",
"FirstName": null,
"LastName": null,
"Email": null,
"Address": null,
"City": null,
"State": null,
"Zip": null, "FirstUsage": 1485525424,
"LastUsage": 14855236932
}
]
}

Example Request:

Get a list of subscribers who have joined a particular subscription list. Order the subscribers by the time they subscribed, with the most recent subscribers first.

GET https://app.mojotxt.com/api/v1/subscribers/list?ListID=172&Sort=Subscribed&SortDirection=DESC

Example Result:

{
"result": "success",
"timestamp": 1486132008,
"request": {
"object": "subscribers",
"verb": "list",
"ListID": "179",
"Sort": "Subscribed",
"SortDirection": "DESC"
},
"record_count": 3,
"records": [
{
"id": 22009,
"PhoneNumber": "+12525553624",
"FirstName": "Another",
"LastName": "Person",
"Email": null,
"Address": null,
"City": null,
"State": null,
"Zip": null,
"Subscribed": 1486131527 /*the time this person subscribed to the list*/
},
{
"id": 6092,
"PhoneNumber": "+13308836292",
"FirstName": null,
"LastName": null,
"Email": null,
"Address": null,
"City": null,
"State": null,
"Zip": null,
"Subscribed": 1486068760
},
{
"id": 738,
"PhoneNumber": "+13303071183",
"FirstName": "Joe",
"LastName": "Hohman",
"Email": "jhohman@gmail.com",
"Address": "159 Stockard Loop",
"City": "Delaware",
"State": "OH",
"Zip": "43015",
"Subscribed": 1485527365
}
]
}