I'm using this MailChimp api v3 wrapper https://github.com/drewm/mailchimp-api/tree/api-v3
Using the example I can add an email to my list but cannot add it to one of my interest groups.
This is the example code:
$MailChimp = new MailChimp('abc123abc123abc123abc123abc123-us1');
$result = $MailChimp->post('lists/b1234346/members', array(
'email_address' => '[email protected]',
'status' => 'subscribed',
'merge_fields' => array('FNAME'=>'Davy', 'LNAME'=>'Jones'),
'interests' => array( '2s3a384h' => true )
));
print_r($result);
My understanding is the key in that array entry for interests is the ID of the group. I created a group in MailChimp, which has a group title and group names. I can see an id when I hover over the group title edit button, and also the group name edit button. If I hover over the "0 subscribers" for a group name I can see that same id and a group_id. I've tried both values and I get this error:
Array ( [type] => http://kb.mailchimp.com/api/error-docs/400-invalid-resource [title] => Invalid Resource [status] => 400 [detail] => Invalid interest ID: '39561'. [instance] => 12c1ab46-a0b5-4014-8107-08cfa97a9a94 )
I've googled and still can't find the answer. Any help?
/lists/<id>/interest-categories/<id>/interests
– Turaco