You are here

public function MailchimpCampaigns::schedule in Mailchimp 8

Schedule a Mailchimp campaign.

Parameters

string $campaign_id: The ID of the campaign.

schedule_time $schedule_time: The date and time in UTC to schedule the campaign for delivery.

bool $timewarp: Choose whether the campaign should use Timewarp when sending.

object $batch_delivery: Choose whether the campaign should use Batch Delivery. Cannot be set to true for campaigns using Timewarp.

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 225

Class

MailchimpCampaigns
Mailchimp Campaigns library.

Namespace

Mailchimp

Code

public function schedule($campaign_id, $schedule_time, $timewarp = FALSE, $batch_delivery = FALSE, $parameters = [], $batch = FALSE) {
  $tokens = [
    'campaign_id' => $campaign_id,
  ];
  $parameters += [
    'schedule_time' => $schedule_time,
    'timewarp' => $timewarp,
    'batch_delivery' => $batch_delivery,
  ];
  return $this
    ->request('POST', '/campaigns/{campaign_id}/actions/schedule', $tokens, $parameters, $batch);
}