The HTTP API allows you to manage and find subscriber records and subscriptions.
API Commands for Subscriber management include:
- Subscribe (sub)
- Update Subscriber (update)
- Change Email Address (change)
- Unsubscribe (unsub)
- Delete Subscriber (delete)
- Find Subscriber (find)
- Find Subscriber in List (findinlist)
- Subscriber Details (detail)
The Data argument in Subscriber Management commands requires additional fields to identify specific subscriber details, such as email and first name.
The Subscriber Data fields include:
| || || || |
| || || || |
| || || || |
Two Subscriber Data fields are used for special values to indicate the subscriber selected email format and if this is a duplicate record for this email address:
To force duplicates, a unique first name must be identified, and the duplicate field must be set to 1. Duplicates can also be forced by pre-pending the email address with an asterisk (*).
To specify the format of the email messages your subscriber will receive, you can set the format in the Data fields.
1 = plain text 2 = HTML 99 = Multi-part MIME
Custom fields can be specified by appending the string “custom_” to the field name. For example, if your realm has a custom field named “age”, specify it as a data field using “custom_age”. If you are attempting to import custom data and the data remains blank in the database, check that the custom field has been properly identified in the data file preceded by “custom_”. Please note that custom fields are case sensitive and long names or names with spaces are prone to error.
The Identity field is a special designator allowing you to lookup a subscriber by any field. It is used in commands where it is necessary to find an exact, unique subscriber. For example, if you wish to change a subscriber’s email address, you would use an Identity field other than ‘email’.
The Identity field defined in the Data argument must contain a unique value for each subscriber. You could not use ‘custom_age’, since multiple subscribers can have the same age value. However, you may have a field called ‘custom_user_id’, where each subscriber would have a unique user id.
Duplicate Subscriber Records
You may encounter instances where multiple Subscriber Records share the same email address, such as a family with one email address shared among multiple account holders. To force subscribe or manage a duplicate record, pre-pend an asterisk (*) to the email address (*mailbox@ domain.com), or add the duplicate argument to the Data Fields, and ensure each record has a unique first name. This works to subscribe, update, unsubscribe, and delete duplicate subscribers.