URL | Verbs | Fields | Error Codes
Use this API to work with subscription lists.
https://app.mojotxt.com/api/v1/{phone_number}/lists/{verb}/{ListID or Keyword}
| Verb | Description |
|---|---|
| list | List all subscription lists associated with this phone number. |
| get | Get a specific list by its ID or keyword. |
| add | Add a new subscription list. |
| update | Update a subscription list's settings. |
| delete | Delete a subscription list. |
| subscribe | Add a person to a subscription list. |
| Field | Type (Limit) | Required | Notes |
|---|---|---|---|
| ListID | Integer | N/A | Read-Only - A unique identifier for this subscription list. |
| KeywordID | Integer | N/A | Read-Only - A unique identifier for this list's keyword. |
| Keyword | String (20) | Yes | A unique keyword for this subscription list. Letters and numbers only. Returned in uppercase. |
| ListName | String | Yes | The descriptive name of the subscription list. (May be shown to the user.) |
| WelcomeMessage | String | No | The 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. |
| Listed | Integer | No | 1 = Listed (Default) 0 = Hidden |
| SendLastMessage | Integer | No | Send the subscriber the last sent message upon joining the list. 0 = No (Default) 1 = Yes |
| SubscriberCount | Integer | N/A | Read-Only - The number of subscribers to this list. (Returned by the get verb.) |
| AutomationCount | Integer | N/A | Read-Only - The number of automated (Relative) messages on this list. (Returned by the get verb.) |
| Error Code | Endpoint | Description | Notes |
|---|---|---|---|
| 1000-1099 | API Core | (Multiple) | See API Error Codes |
| 1100-1199 | Keywords | (Multiple) | See API Error Codes |
| 1300 | Lists | No list object specified. | A list id is required for this request (i.e. /api/v1/+15555550100/lists/get/100) |
| 1301 | Lists | List 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.) |
| 1302 | Lists | No list name specified. | A ListName is required for each list object. It cannot be blank. |