MyNewsletterBuilder API
Overview Quick Start Examples Downloads
 
Subscribe < Return to Method List
struct Subscribe(structure $details, array $lists [, boolean $skip_opt_in [, boolean $update_existing]])
Subscribe a single subscriber. See also SubscribeBatch().
Parameters
struct details A keyed structure of subscriber data. Requires 'email', may contain any of these keys:

string email REQUIRED. The subscriber's email address.
string first_name first_name field data.
string middle_name middle_name field data.
string last_name last_name field data.
string full_name full_name field data.
string company_name company_name field data.
string job_title job_title field data.
string phone_work phone_work field data.
string phone_home phone_home field data.
string address_1 address_1 field data.
string address_2 address_2 field data.
string address_3 address_3 field data.
string city city field data.
string state state field data.
string zip zip field data.
string country country field data.
string Custom Fields Custom field values. The keys are either custom_X (0 - 9) or the names you have assigned to them.
array lists An array of subscriber lists to move the subscriber into.
boolean skip_opt_in OPTIONAL. If TRUE, we won't send an opt-in email. Do not abuse this option. Default = FALSE.
boolean update_existing OPTIONAL. If TRUE and the subscriber email address already exists, we update their information. Default = TRUE.
Return Value
struct Returns a keyed structure:

integer id The subscriber id.
string email The subscriber's email address.
string status The action status string .
string status_msg A brief message about the status. Usually only used for errors.
 
 
Copyright © 2003- MyNewsletterBuilder, Inc.