optional - merges for the email (FNAME, LNAME, etc.) (see examples below for handling "blank" arrays). Note that a merge field can only hold up to 255 bytes. Also, there are a few "special" keys:

string

EMAIL

set this to change the email address. This is only respected on calls using update_existing or when passed to listUpdateMember()

string

NEW-EMAIL

set this to change the email address. This is only respected on calls using update_existing or when passed to listUpdateMember(). Required to change via listBatchSubscribe() - EMAIL takes precedence on other calls, though either will work.

array

GROUPINGS

Set Interest Groups by Grouping. Each element in this array should be an array containing the "groups" parameter which contains a comma delimited list of Interest Groups to add. Commas in Interest Group names should be escaped with a backslash. ie, "," => "\," and either an "id" or "name" parameter to specify the Grouping - get from listInterestGroupings()

string

OPTIN_IP

Set the Opt-in IP field. Abusing this may cause your account to be suspended. We do validate this and it must not be a private IP address.

string

OPTIN_TIME

Set the Opt-in Time field. Abusing this may cause your account to be suspended. We do validate this and it must be a valid date. Use - 24 hour format in GMT, eg "2013-12-30 20:30:00" to be safe. Generally, though, anything strtotime() understands we'll understand - http://us2.php.net/strtotime

array

MC_LOCATION

Set the member's geographic location. By default if this merge field exists, we'll update using the optin_ip if it exists. If the array contains LATITUDE and LONGITUDE keys, they will be used. NOTE - this will slow down each subscribe call a bit, especially for lat/lng pairs in sparsely populated areas. Currently our automated background processes can and will overwrite this based on opens and clicks.

string

MC_LANGUAGE

Set the member's language preference. Supported codes are fully case-sensitive and can be found here.

array

MC_NOTES

Add, update, or delete notes associated with a member. The array must contain either a "note" key (the note to set) or an "id" key (the note id to modify). If the "id" key exists and is valid, an "update" key may be set to "append" (default), "prepend", "replace", or "delete" to handle how we should update existing notes. If a "note" key is passed and the "id" key is not passed or is not valid, a new note will be added. "delete", obviously, will only work with a valid "id" - passing that along with "note" and an invalid "id" is wrong and will be ignored. If this is not an array, it will silently be ignored.

Handling Field Data Types - most fields you can just pass a string and all is well. For some, though, that is not the case...

Field values should be formatted as follows:

string

address

For the string version of an Address, the fields should be delimited by 2 spaces. Address 2 can be skipped. The Country should be a 2 character ISO-3166-1 code and will default to your default country if not set

array

address

For the array version of an Address, the requirements for Address 2 and Country are the same as with the string version. Then simply pass us an array with the keys addr1, addr2, city, state, zip, country and appropriate values for each

string

birthday

the month and day of birth, passed as MM/DD

array

birthday

the month and day of birth, passed in an array using the keys month and day

can be a normal string - we will validate that the value is a valid option

string

image

must be a valid, existing url. we will check its existence

string

multi_choice

can be a normal string - we will validate that the value is a valid option

double

number

pass in a valid number - anything else will turn in to zero (0). Note, this will be rounded to 2 decimal places

string

phone

If your account has the US Phone numbers option set, this must be in the form of NPA-NXX-LINE (404-555-1212). If not, we assume an International number and will simply set the field with what ever number is passed in.

string

website

This is a standard string, but we will verify that it looks like a valid URL

optional - flag to control whether a double opt-in confirmation message is sent, defaults to true. Abusing this may cause your account to be suspended.

update_existing

optional - flag to control whether existing subscribers should be updated instead of throwing an error, defaults to false

replace_interests

optional - flag to determine whether we replace the interest groups with the groups provided or we add the provided groups to the member's interest groups (optional, defaults to true)

send_welcome

optional - if your double_optin is false and this is true, we will send your lists Welcome Email if this subscribe succeeds - this will *not* fire if we end up updating an existing subscriber. If double_optin is true, this has no effect. defaults to false.

Returns

boolean

true on success, false on failure. When using MCAPI.class.php, the value can be tested and error messages pulled from the MCAPI object (see below)