public function MailchimpLists::addMember in Mailchimp 8
Same name in this branch
- 8 lib/mailchimp-api-php/src/MailchimpLists.php \Mailchimp\MailchimpLists::addMember()
- 8 lib/mailchimp-api-php/tests/src/MailchimpLists.php \Mailchimp\Tests\MailchimpLists::addMember()
Adds a new member to a Mailchimp list.
Parameters
string $list_id: The ID of the list.
string $email: The email address to add.
array $parameters: Associative array of optional request parameters.
bool $batch: TRUE to create a new pending batch operation.
Return value
object
See also
http://developer.mailchimp.com/documentation/mailchimp/reference/lists/m...
1 call to MailchimpLists::addMember()
- MailchimpLists::addMember in lib/
mailchimp-api-php/ tests/ src/ MailchimpLists.php - @inheritdoc
1 method overrides MailchimpLists::addMember()
- MailchimpLists::addMember in lib/
mailchimp-api-php/ tests/ src/ MailchimpLists.php - @inheritdoc
File
- lib/
mailchimp-api-php/ src/ MailchimpLists.php, line 251
Class
- MailchimpLists
- Mailchimp Lists/Audiences library.
Namespace
MailchimpCode
public function addMember($list_id, $email, $parameters = [], $batch = FALSE) {
$tokens = [
'list_id' => $list_id,
];
$parameters += [
'email_address' => $email,
];
return $this
->request('POST', '/lists/{list_id}/members', $tokens, $parameters, $batch);
}