The HTTP API allows you to manage and find contact records and subscriptions.
Commands
API Commands for Contact management include:
- Subscribe (sub)
- Update Contact (update)
- Change Email Address (change)
- Unsubscribe (unsub)
- Delete Contact (delete)
- Find Contact (find)
- Find Contact in List (findinlist)
- Contact Details (detail)
Data Fields
The Data argument in Contact Management commands requires additional fields to identify specific contact details, such as email and first name.
The Contact Data fields include:
|
|
|
|
|
|
|
|
|
|
|
|
Two Contact Data fields are used for special values to indicate the contact selected email format and if this is a duplicate record for this email address:
duplicate |
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 (*). |
format |
To specify the format of the email messages your contact 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.
Identity Field
The Identity field is a special designator allowing you to lookup a contact by any field. It is used in commands where it is necessary to find an exact, unique contact. For example, if you wish to change a contact’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 contact. You could not use ‘custom_age’, since multiple contacts can have the same age value. However, you may have a field called ‘custom_user_id’, where each contact would have a unique user id.
Duplicate Contact Records
You may encounter instances where multiple Contact Records share the same email address, such as a family with one email address shared among multiple customers. 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 contacts.