Function call:
add_contact
Purpose:
This function will add a new contact with the option to add the contact to one or more autoresponder lists.
Parameters:
email_address - Email address of new contact api_key
Optional field values:
first_name last_name full_name company lists format_preference next_message datecode_subscribe subscribe_ip_address subscribe_user_agent subscribe_method status data fields - (optional) Any data field / name pairs from the list in Appendix custom fields - (optional) Any existing custom field pair
Return:
Status ok or error Details
Example:
http://example.com/a.php/api/add_contact?api_key=0c6839f&email_address=test@example.com&first_name=John&last_name=Smith&full_name=John+Smith&company=Acme Holdings&lists=[{"list":"Sales","status":0,"next_message":0,"subscribe_ip_address":"1.2.3.4"}]
Note: the URL would normally be one line but may have been separated in this example due to page formatting.
Notes:
api_key=0c6839f
email_address= test@example.com
first_name=John
last_name=Smith
full_name=John Smith
company=Acme Holdings
datecode_subscribe – format yyyymmddhh
status – A number – 0 – Active, 1 – Paused, 2 – Cancelled, 3 – Dropped, 4 – Finished, 5 – Failed
lists= [{“list”:”Sales”,”status”:0,”next_message”:0,”subscribe_ip_address”:”1.2.3.4″}] – – A JSON string with details of lists. Each list can contain key / value pairs of: “list”: list name
next_message – # number of next message
The subscribe_ip_address value must be added to the lists array as the subscribe IP address relates to the autoresponder list joined not the main contact record