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.
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/#
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.