MyNewsletterBuilder API
Overview Quick Start Examples Downloads
 
SubscribeBatch < Return to Method List
struct SubscribeBatch(array $subscribers, array $lists [, boolean $skip_opt_in [, boolean $update_existing]])
Batch add subscribers to your lists. Cannot be used to re-add subscribers that are unsubscribed. See also Subscribe().
NOTE: If working in version 1.0 gives you a 502 Error message, please try version 1.0.2.
Parameters
array subscribers An array of keyed structures of subscriber data. Requires 'email', may contain:

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:

struct meta Data about the operation, with keys:

integer total Total subscription attempts.
integer success The total number of successful attempts (add or update).
integer errors The number of failed attempts.
array subscribers An array of keyed strutures:

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.