Back to Documentation Overview
listUpdateMember
public static listUpdateMember(string apikey, string id, string email_address, array merge_vars, string email_type, boolean replace_interests)
Edit the email address, merge fields, and interest groups for a list member
- Section:
- List Related
- Parameters:
apikey a valid API Key for your user account. Get by calling login() id the list id to connect to. Get by calling lists() email_address the current email address of the member to update merge_vars array of new field values to update the member with. Use "EMAIL" to update the email address, "INTERESTS" to update the interest groups, "OPTINIP" to set the opt-in IP email_type change the email type preference for the member ("html" or "text"). Leave blank to keep the existing preference (optional) replace_interests flag to determine whether we replace the interest groups with the updated groups provided, or we add the provided groups to the member's interest groups (optional, defaults to true) - 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
- <?php
- /**
- This Example shows how to update a List Member's information using the MCAPI.php
- class and do some basic error checking.
- **/
- require_once 'inc/MCAPI.class.php';
- require_once 'inc/config.inc.php'; //contains apikey
- $retval = $api->listUpdateMember($listId, $my_email, $merge_vars, 'html', false);
- if ($api->errorCode){
- } else {
- }
Examples (1)
download example code[1] mcapi_listUpdateMember.php
|
Add New Note
User Contributed Notes for
listUpdateMember |
|---|
| No notes, yet... Will you be the first?? |