https://app.mojotxt.com/api/v1/subscribers/list
https://app.mojotxt.com/api/v1/{phone_number}/subscribers/list
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 (100) | Limit the results to a certain number of records. If you don't send a Limit, you get the first 100 records. |
| Page | Any Integer | If Limit is specified, return a certain page of results. The first set of results is page 1. |
Get a list of all the subscribers in your account.
GET https://app.mojotxt.com/api/v1/subscribers/list
{
"result": "success",
"timestamp": 1793491200,
"request": {
"object": "subscribers",
"verb": "list"
},
"record_count": 2,
"records": [
{
"id": 6024,
"PhoneNumber": "+15555550101",
"FirstName": "Jane",
"LastName": "Example",
"Email": "jane@example.com",
"Address": "123 Main St.",
"City": "Anytown",
"State": "OH",
"Zip": "12345"
},
{
"id": 6025,
"PhoneNumber": "+15555550102",
"FirstName": null,
"LastName": null,
"Email": null,
"Address": null,
"City": null,
"State": null,
"Zip": null
}
]
}
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/+15555550100/subscribers/list
{
"result": "success",
"timestamp": 1793491200,
"request": {
"object": "subscribers",
"verb": "list",
"phone": "+15555550100"
},
"record_count": 2,
"records": [
{
"id": 6024,
"PhoneNumber": "+15555550101",
"FirstName": "Jane",
"LastName": "Example",
"Email": "jane@example.com",
"Address": "123 Main St.",
"City": "Anytown",
"State": "OH",
"Zip": "12345",
"FirstUsage": 1785527390, /* The first time this user interacted with this phone number. */
"LastUsage": 1785527641 /* The most recent time this user interacted with this phone number. */
},
{
"id": 6025,
"PhoneNumber": "+15555550102",
"FirstName": null,
"LastName": null,
"Email": null,
"Address": null,
"City": null,
"State": null,
"Zip": null,
"FirstUsage": 1785525424,
"LastUsage": 1785536932
}
]
}
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
{
"result": "success",
"timestamp": 1793491200,
"request": {
"ListID": "172",
"Sort": "Subscribed",
"SortDirection": "DESC",
"object": "subscribers",
"verb": "list"
},
"record_count": 2,
"records": [
{
"id": 6025,
"PhoneNumber": "+15555550102",
"FirstName": null,
"LastName": null,
"Email": null,
"Address": null,
"City": null,
"State": null,
"Zip": null,
"Subscribed": 1786131527 /* The time this person subscribed to the list. */
},
{
"id": 6024,
"PhoneNumber": "+15555550101",
"FirstName": "Jane",
"LastName": "Example",
"Email": "jane@example.com",
"Address": "123 Main St.",
"City": "Anytown",
"State": "OH",
"Zip": "12345",
"Subscribed": 1785527365
}
]
}