Dilhan Nakandala
Dilhan Nakandala

Reputation: 363

MailChimp API v3.0 Campaign Schedule Error

I'm using the MailChimp API v3.0 and trying a schedule a campaign but every time I schedule and then check from my account it is not getting scheduled properly.

Here's the code I have,

        if($camp_content){

            $camp_schedule = $MailChimp->post('campaigns/'. $camp["id"] .'/actions/schedule',array(
                "schedule_time" => "2016-03-31 10:00:00",
                "timewarp" => false

            ));
        }

When I check the output after schedule I get this,

Array ( [title] => MC_API30_ Exception [status] => 406 [detail] => This campaign cannot be scheduled: . [instance] => )

Upvotes: 6

Views: 2177

Answers (2)

Maha Dev
Maha Dev

Reputation: 3965

Your request for campaign schedule is 100% correct but the problem is with campaign.

After having 4 hours of debugging, I finally reached to the point. This error comes when your campaign is not ready 100%. For campaign debugging, use checklist url like this :

https://usX.api.mailchimp.com/3.0/campaigns/{campaing_id}/send-checklist?apikey=xxxxxxxxx

It will give you response like this:

http://prntscr.com/odyhaj

My error was the from_email.

Once you get true in this response, you will be able to schedule the cron. Make sure datetime should be multiple of 15 like: 00,15,30,45

Upvotes: 1

Brett
Brett

Reputation: 1

I had the same issue and changed the sending email to be one with the same domain as my site. This worked for me so I assume it has something to do with the email address you are SENDING with.

Upvotes: 0

Related Questions