Deleting member fail

Viewed 585

From our C# project, we're sending email addresses to mailchimp, so we can use these for a mailing.

We're using the 'MailChimp.Net.V3' from 'Brandon Seydel' (v 4.1.0)

Previous we'd created a new list and added the members to it. Unfortionally mailchimp didn't support lists anymore en uses audiences, which is very limited in number of audiences in the free version. So for now we try to get the current audience and remove the available members, so we can fill this audience with the new members. After the delete command, the error appears: "This list member cannot be removed. Please contact support." Why can't we remove the members in the audience?

We've searched in the mailchimp help files for this error message, but without any success. Manually inside mailchimp can the member be deleted, but we'd like to clear them automatic

var currentMembers = mailChimpManager.Members.GetAllAsync(myList.Id);
currentMembers.Wait();
if (currentMembers.Result != null)
{
    foreach (var currentMember in currentMembers.Result)
    {
        var deleteTask = mailChimpManager.Members.DeleteAsync(myList.Id, currentMember.EmailAddress);
        deleteTask.Wait();
    }
}
1 Answers

If that user is Cleaned (you can check it from mailchimp ui/website), you will get 405, saying "This list member cannot be removed".

Cleaned generally means either that email address is not valid or it is not used anymore. So even if you send an email to that address, it will not be delivered.

I don't know why they choose to do that way, but you can't remove a Cleaned member from your list/audience with a regular DELETE request.

If you really want to delete that record you can use delete-permanent. Check docs for more info:

https://mailchimp.com/developer/reference/lists/list-members/#post_/lists/-list_id-/members/-subscriber_hash-/actions/delete-permanent

Related