MailChimp resubscribe a deleted member causes the API to return a 400 bad request
Asked Answered
A

4

32

I've encountered a problem on MailChimp v3 API where it responds with a status 400 when I try to resubcribe a member. Here's the steps to reproduce the problem:

  1. Subscribe a member to a list then delete that member.
  2. Resubscribe using the API through endpoint PUT /lists/{list_id}/members/{subscriber_hash} returns a status 400

    { 'type': 'http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/', 'title': 'Forgotten Email Not Subscribed', 'status': 400, 'detail': '[email protected] was permanently deleted and cannot be re-imported. The contact must re-subscribe to get back on the list.' }

and the request is:

{
  email_address: '[email protected]',
  status_if_new: 'subscribed'
}

Based on the response the solution is the member must be resubscribed which I'm actually trying to do. Anyone encountered this problem?

Andrus answered 6/9, 2018 at 7:18 Comment(1)
Check https://mcmap.net/q/454520/-can-not-re-subscribe-deleted-member maybe?Globigerina
A
53

I've contact MC support and this is what they gave me:

Due to the GDPR requirements for EU, we recently added a new way to delete contacts from your list. At this time, you can delete and archive (which is a soft delete and keeps that contact in your reports) or you can delete and remove (which is a hard delete and removes those contacts from all reporting / etc). Seeing this error message means you are trying to re-add someone that had been previously permanently deleted. If you intend to delete someone and re-add them via the API, you want to use the delete and archive option.

The only confusing part for me was that I was asked to resubscribe when in fact it was the very thing I was doing, but the support team also told me that:

When seeing the message for 'resubscribe', this is referring to using a MailChimp signup form as opposed to using an API subscribe method. The MailChimp forms are the ultimate 'workaround' in which it can be used to resubscribe unsubscribers, cleaned addresses or permanently deleted addresses.

In summary, there is nothing wrong the code it's just how MC treats that request from their API which I believe shouldn't be as misleading as the error message says.

So there you go, I hope this helps someone who's been in the same painful path of discovering that there's nothing wrong with your code and that was just simply how their API worked. ¯_(ツ)_/¯

Andrus answered 17/9, 2018 at 22:31 Comment(1)
Official docs in case someone finds them helpful: mailchimp.com/help/delete-contacts/#Archive_vs._RemoveBaiss
P
7

There is exist the way to re-subscribe permanently deleted contacts. Mailchimp offers 2 ways: 1) via re-subcription using their form 2) via deleting the Audience

You can delete the entire audience as a whole, then create a brand new audience, and re import.

Here is the info from Mailchimp's knowledge base:

If all of your contacts were deleted and need to be re-imported, it is possible to delete the entire audience, then create a new audience, and re-import. These steps are to delete the audience container where contacts are stored so deleted contacts can be re added. This is only recommended when all contacts on the audience need to be deleted or have been deleted. Deleting the entire audience will result in a loss of activity for all contacts on the audience. If click, open, and other activity exists on the audience, this will be lost.

To permanently delete the entire audience: 1️⃣Navigate to the Audience tab. 2️⃣Click ‘Manage Audience’ and select ‘View Audiences’. 3️⃣Check the box next to the audience name and click ‘Delete’.

If you have sent to your audience in the last 7 days, you will need to wait that time period before being able to delete the audience. If you do not want to wait 7 days, the only other option is signing those subscribers up through the hosted signup form.

Padishah answered 30/10, 2019 at 20:11 Comment(1)
To test my setup I ended up re-creating the Audience. Very tedious though.Anteversion
H
2

It's not impossible to re-import the list member... just go into your MailChimp contacts and add the member that way. Granted, you won't be able to use the API/form on your Web site, but if that e-mail needs to be in the system, this is the only way I found.

You can also take an existing contact and change his/her e-mail to the one that's been permanently deleted. This is actually how I was able to re-import a perm deleted e-mail, as I haven't tried adding a new one, but I'm guessing it might work the same.

Holsworth answered 26/5, 2019 at 13:17 Comment(3)
Nice workaround. Not working to create new contact, but changing an existing contact seems to "reset" everything and then the email address is no longer permanently deleted.Mut
Yes indeed. Good thing their error checking doesn't include existing contacts. :)Holsworth
It does now. I tried both adding the subscriber and changing the e-mail of an existing one and it rejected both. Pretty dumb behavior if you ask me.Pregnant
P
0

I think you Permanently delete a list member and after that is impossible to re-import the list member.

Precis answered 10/9, 2018 at 12:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.