title: Send mail using Mailchimp's API
body: <p>I created a mail campaign(chose "automated" and "API")</p>
  
  <p><a href="https://i.stack.imgur.com/ZkLfy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZkLfy.png" alt="enter image description here"></a></p>
  
  <p>When I try to send a test mail </p>
  
  <pre><code>post: https://us20.api.mailchimp.com/3.0/campaigns/{my_campaign_id}/actions/test
  </code></pre>
  
  <p>I get a <code>400</code>, "<strong>Cannot send this campaign because it is currently sending</strong>" error.</p>
  
  <p>And in the dashboard I can see the status of the campaign is "Sending".</p>
  
  <p><a href="https://i.stack.imgur.com/EjbGu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EjbGu.png" alt="enter image description here"></a></p>
  
  <p>The edit mode of the campaign there is only an option to pause the campaign.</p>
  
  <p>Here is the code(using Node.js) used to send the mail</p>
  
  <pre><code>const request = require('superagent');
  
  request.post(`https://us20.api.mailchimp.com/3.0/campaigns/${CAMPAIGN_ID}/actions/test`)
      .set('Content-Type', 'application/json;charset=utf-8')
      .set('Authorization', 'Basic ' + new Buffer('any:' + MAILCHIMP_API_KEY).toString('base64'))
      .send({
          test_emails: [ 'my_mail@gmail.com' ],
          send_type: 'html',
      })
      .end((error, response) =&gt; {
          if (error) {
              res.send({ error });
          } else {
              res.send({ data: response });
          }
      });
  </code></pre>
  
  <p>Could you guys point out how to fix the "sending" error.</p>
  
  <p>Thanks.</p>