3

I am trying to use the Mailchimp API 3.0 to insert a user into a list > group > group name with php.

I found a nice example using curl, here it is, but, as you can see, here he shows only to add a user into a list, and not in group > group name.

The problem is that I can't find documentation about adding or deleting a user from groups.

I've tried to add the group into the json data array with label 'interests' and also to add it in the $merge_fields array ( I think this is for v2.0 ), but without success.

ekad
  • 14,436
  • 26
  • 44
  • 46
somtam
  • 347
  • 1
  • 3
  • 10

1 Answers1

1

The way I understand it you need to make a call to a lists/{list-id}/member/{member-hash} endpoint with a body like this this:

   {
      "email_address": "someone@doamin.com",
      "status": "subscribed",
      "interests": {
          <interest_id>: true,
          <interest_id>: false
      }
   }

Mailchimp has some example JSON here: http://developer.mailchimp.com/documentation/mailchimp/reference/lists/members/#

jhut89
  • 83
  • 5