Lists

URL | Verbs | Fields | Error Codes

Use this API to work with subscription lists.

URL Scheme

https://app.mojotxt.com/api/v1/{phone_number}/lists/{verb}/{ListID or Keyword}

Available Verbs

VerbDescription
listList all subscription lists associated with this phone number.
getGet a specific list by its ID or keyword.
addAdd a new subscription list.
updateUpdate a subscription list's settings.
deleteDelete a subscription list.
subscribeAdd a person to a subscription list.

Subscription List Object Fields

FieldType (Limit)RequiredNotes
ListIDIntegerN/ARead-Only - A unique identifier for this subscription list.
KeywordIDIntegerN/ARead-Only - A unique identifier for this list's keyword.
KeywordString (20)YesA unique keyword for this subscription list. Letters and numbers only. Returned in uppercase.
ListNameStringYesThe descriptive name of the subscription list. (May be shown to the user.)
WelcomeMessageStringNoThe message sent to the user upon joining the list. It should contain instructions on how to unsubscribe. If left empty when adding a list, a default message will be generated using the ListName and Keyword.
ListedIntegerNo1 = Listed (Default)
0 = Hidden
SendLastMessageIntegerNoSend the subscriber the last sent message upon joining the list.
0 = No (Default)
1 = Yes
SubscriberCountIntegerN/ARead-Only - The number of subscribers to this list. (Returned by the get verb.)
AutomationCountIntegerN/ARead-Only - The number of automated (Relative) messages on this list. (Returned by the get verb.)

Error Codes

Error CodeEndpointDescriptionNotes
1000-1099API Core(Multiple)See API Error Codes
1100-1199Keywords(Multiple)See API Error Codes
1300ListsNo list object specified.A list id is required for this request (i.e. /api/v1/+15555550100/lists/get/100)
1301ListsList object does not exist.The list ID you specified doesn't exist, or belongs to a different phone number. (An unknown Keyword returns error 1105.)
1302ListsNo list name specified.A ListName is required for each list object. It cannot be blank.