Creating Campaigns

Creating Campaigns

I'm trying to create Campaigns and consistently get a 4500 error back when doing so.


Here's the basic PHP code:

   
  1.  $new = '<Campaigns>

        <row no="1">

          <fieldlabel value="Campaign Name">

            <![CDATA[Test #2]]>

    </fieldlabel>

        </row>

      </Campaigns>';



    $fields = array('xmlData'=>$new);



    $ch = curl_init();

    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

    curl_setopt($ch, CURLOPT_HEADER, false);

    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    curl_setopt($ch, CURLOPT_USERAGENT, 'CURL/MailChimp');

    curl_setopt($ch, CURLOPT_URL,
    'http://crm.zoho.com/crm/private/xml/Campaigns/insertRecords?loginName=MY_LOGIN&apikey=MY_APIKEY');

    curl_setopt($ch, CURLOPT_POST, true);

    curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);

    $xml = curl_exec($ch);

    echo $xml;













































I've tried putting my loginName and apikey in the POST parameters but receive 4831/Apikey required. I've also used all sorts of extra non-required Campaign data fields to no avail.

Anyone see anything wrong with that? Is there possibly a known issue with creating campaigns via the API?