title: mailchimp http error: you must specify a apikey
body: <p>I'm the using MailChimp 2.0 api and trying to post a lists/subscribe call using php.  The call is returning an error "You must specify a apikey value".</p>
  
  <p>Here's the code that makes the post:</p>
  
  <pre><code>  function json_post ($url, $params)
    {
      print '&lt;p&gt;url = ' . $url . '&lt;/p&gt;';
      $data = json_encode ($params);
      print '&lt;p&gt;data = ' . $data . '&lt;/p&gt;';
  
      $handle = curl_init ($url);
      curl_setopt ($handle, CURLOPT_CUSTOMREQUEST, "POST");
      curl_setopt ($handle, CURLOPT_POST_FIELDS, $data);
      curl_setopt ($handle, CURLOPT_RETURNTRANSFER, true);
      curl_setopt ($handle, CURLOPT_HTTPHEADER, array ('Content-Type: application/json',
                                                       'Content-Length: ' . strlen($data_string)));
  
      $result = curl_exec ($handle);
      print '&lt;p&gt;curl_error: ' . curl_errno ($handle) . '&lt;/p&gt;';
      return $result;
    }
  </code></pre>
  
  <p>The print statements show:</p>
  
  <pre><code>url = https://us10.api.mailchimp.com/2.0/lists/subscribe.json
  
  data = {"apikey":"...","id":"...","email":{"email":"test1@abc.com"},"merge_vars":{"groupings":{"name":"test"}}}
  
  curl_error: 0
  
  {"status":"error","code":-100,"name":"ValidationError","error":"You must specify a apikey value"}
  </code></pre>
  
  <p>I presume there's something wrong with the syntax.  The api key is cut &amp; pasted from my mailchimp account page.  I've tried it with and without the -us10 suffix.  Any ideas?</p>