public function MailchimpCampaigns::addCampaign in Mailchimp 8
Adds a new campaign to the authenticated account.
Parameters
string $type: The campaign type. See CAMPAIGN_TYPE_* constants.
object $recipients: List settings for the campaign.
object $settings: The subject, from name, reply-to, etc settings for the campaign.
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/campaig...
File
- lib/
mailchimp-api-php/ src/ MailchimpCampaigns.php, line 73
Class
- MailchimpCampaigns
- Mailchimp Campaigns library.
Namespace
MailchimpCode
public function addCampaign($type, $recipients, $settings, $parameters = [], $batch = FALSE) {
$parameters += [
'type' => $type,
'recipients' => $recipients,
'settings' => $settings,
];
return $this
->request('POST', '/campaigns', NULL, $parameters, $batch);
}