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.

ParameterOptionsDescription
ListIDID of Subscription List objectIf 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)
EmailKnown1, 0If set to 1, only subscribers with a known email address will be returned. (Useful for adding people to an email list.)
NameKnown1, 0If set to 1, only subscribers with a known first name will be returned. (Useful to avoid exporting people with empty profiles.)
SortPhoneID, 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.
SortDirectionASC, DESCSort Ascending or Descending
LimitAny Integer (100)Limit the results to a certain number of records. If you don't send a Limit, you get the first 100 records.
PageAny IntegerIf Limit is specified, return a certain page of results. The first set of results is page 1.

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": 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
        }
    ]
}

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/+15555550100/subscribers/list

Example Result:

{
    "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
        }
    ]
}

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": 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
        }
    ]
}