Campaigns - marcocusano/mailchimp-php GitHub Wiki

Campaigns are how you send emails to your Mailchimp list. Use the Campaigns API calls to manage campaigns in your Mailchimp account. Organize your campaigns using folders.

create

Create a new Mailchimp campaign.

$params = array(
    "type" => "regular/plaintext/absplit/rss/variate",
    "recipients" => {
        "list_id" => "YOUR_LIST_ID",
        "segment_opts" => "This object should contain a saved_segment_id to use an existing segment, or you can create a new segment by including both match and conditions options."
    }
    ...
);
$mailchimp->campaigns->create($params);

delete

Remove a campaign from your Mailchimp account.

$mailchimp->campaigns->delete("CAMPAIGN_ID");

edit

Update some or all of the settings for a specific campaign.

$params = array(
    "recipients" => { ... },
    "settings" => { ... },
    ...
);
$mailchimp->campaigns->edit("CAMPAIGN_ID", $params);

get

Get all campaigns in an account: Get all campaigns or get information about a specific campaign passing a CAMPAIGN_ID.

// Send CAMPAIGN_ID if you are looking for a specific Campaign instead of a list of Campaigns.
$mailchimp->campaigns->get("CAMPAIGN_ID");

sendChecklist

Review the send checklist for a campaign, and resolve any issues before sending.

$mailchimp->campaigns->sendChecklist("CAMPAIGN_ID");